gpt4 book ai didi

amazon-web-services - AWS CloudWatch : EndpointConnectionError: Could not connect to the endpoint URL

转载 作者:行者123 更新时间:2023-12-04 08:17:53 26 4
gpt4 key购买 nike

我只是按照这些说明 ( Link ) 在我的 EC2 实例上安装了 AWS CloudWatch。

  • 我更新了我的存储库: sudo yum update -y
  • 我安装了 awslogs 包:sudo yum install -y awslogs
  • 我编辑了/etc/awslogs/awscli.conf,在 EC2 页面上确认我的可用区是 us-west-2b
  • 我保留了/etc/awslogs/awslogs.conf 文件的默认配置,确认默认路径确实有日志写入其中
  • 我检查了/var/log/awslogs.log 文件,它反复显示错误:
    EndpointConnectionError: 无法连接到端点 URL:“https://logs.us-west-2b.amazonaws.com/
  • 我没有按预期在 CloudWatch 控制台中看到任何新创建的日志组和日志流。我在这里缺少什么?

  • 我应该指向除 https://logs.us-west-2b.amazonaws.com/ 之外的其他端点吗? ?如果是这样,那是在哪里配置的?

    提前致谢,

    格雷厄姆

    最佳答案

    awscli.conf 需要区域而不是 AZ。

    将区域指定为 us-west-2。

    这是引用页面中的文档

    Edit the /etc/awslogs/awscli.conf file and in the [default] section, specify the region where you want to view log data and add your credentials.

    region = us-east-1
    aws_access_key_id = <YOUR ACCESS KEY>
    aws_secret_access_key = <YOUR SECRET KEY>

    错误 EndpointConnectionError: Could not connect to the endpoint URL: "https://logs.us-west-2b.amazonaws.com/"可能归因于错误的区域规范。

    US-WEST-2 中 cloudwatch 日志服务的正确端点是 logs.us-west-2.amazonaws.com .

    aws 服务端点请引用以下文档
    http://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region

    关于amazon-web-services - AWS CloudWatch : EndpointConnectionError: Could not connect to the endpoint URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37493873/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com