Bug Fix: Invalid endpoint
Troubleshooting for ValueError: Invalid endpoint
Last updated
Troubleshooting for ValueError: Invalid endpoint
Last updated
After updating the environment variables for the backend-flask
container in the docker-compose
file, I would keep running into this issue:
Invalid endpoint: https://logs..amazonaws.com
The most logical guess would be something is wrong with the AWS region configuration. The CloudWatch logs are sent over to AWS through thie CW service endpoint, which has the following structure:
logs.<YOUR_AWS_REGION>.amazonaws.com
I use us-east-1
(N. Virginia) so it should be:
logs.us-east-1.amazonaws.com
I tried echoing
all the variables I added to the env variables for the backend
in docker-compose
. It turns out, AWS_DEFAULT_REGION
has no value set to it.
You can assign values to environmental variables in Linux as follows:
I restarted the docker-compose
, however, this wouldn't fix the issue. In case you are using Gitpod, it is highly recommended that you create a brand new workspace, as this issue with updated env variables often happens with Gitpod workspaces.
After ticking all the boxes of the list suggested in the step 2. Analysis, the CloudWatch agent correctly created a log group called cruddur
.
The CloudWatch agent is diligently working on our Cruddur backend and sending over http requests to AWS CloudWatch.