I just followed these instructions (Link) to get AWS CloudWatch installed on my EC2 instance.
I checked the /var/log/awslogs.log file and it is repeatedly showing the error: EndpointConnectionError: Could not connect to the endpoint URL: "https://logs.us-west-2b.amazonaws.com/"
Should I be pointing at some other endpoint other than https://logs.us-west-2b.amazonaws.com/ ? If so, where is that configured?
Thanks in advance,
Graham
The reason the "Could not connect to the endpoint URL" error occurs is because an incorrect region code is set when running an AWS CLI command. In order to solve the "Could not connect to the endpoint URL" error, set the region to a valid AWS region code, e.g. us-east-1 .
An S3 bucket can be accessed through its URL. The URL format of a bucket is either of two options: http://s3.amazonaws.com/[bucket_name]/ http://[bucket_name].s3.amazonaws.com/
Testing the VPC Endpoint for S3 To check that your VPC Endpoint for S3 is working correctly, find the URL of your target bucket in the AWS console and use the hostname there as the target of a traceroute command on one of your virtual machines in your SDDC.
The awscli.conf expects the region and not the AZ.
Specify the region as us-west-2.
Here is the documentation from the reference page
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>
The error
EndpointConnectionError: Could not connect to the endpoint URL: "https://logs.us-west-2b.amazonaws.com/"
could be attributed to wrong specification of region.
The correct endpoint for the cloudwatch logs service in US-WEST-2 is
logs.us-west-2.amazonaws.com
.
Please refer to the following documentation for aws service endpoints http://docs.aws.amazon.com/general/latest/gr/rande.html#cwl_region
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With