awscli-local
awscli-local copied to clipboard
`AWS_ENDPOINT_URL` overrides the endpoint URL of aws command
With the recent release of AWS CLI (v1.29.0 and v2.13.0), the environment variable AWS_ENDPOINT_URL is now being referenced by the aws commands as well. This release has caused a bug where setting AWS_ENDPOINT_URL to the endpoint of LocalStack results in the aws commands connecting to LocalStack instead.
I believe it is necessary to change the name of the environment variable used for awslocal.
https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst#L29
Hi @yoshizawa56 , thanks for the pointer! In fact, we've been following the progress around AWS_ENDPOINT_URL in the AWS SDKs very closely and been anticipating its introduction eagerly, as it is a key enabler to facilitate local testing.
We've deliberately introduced the AWS_ENDPOINT_URL configuration in awslocal a while ago, to allow for a smoother transition into the new standard configuration for AWS SDKs. In fact, we anticipate that the ability to configure AWS_ENDPOINT_URL in the AWS SDKs will over time make awslocal obsolete, as it is now easily possible to point the AWS tooling at a custom endpoint.
Can you please elaborate a bit on your use case - where do you see the need for the distinction between a custom local endpoint for awslocal and another custom endpoint that gets picked up by the AWS SDK (or by the aws CLI) directly? We'll be happy to find a solution that works for everyone, but would be good to understand the concrete requirements. 👍 Thanks!
@whummer Thank you for your response.
Here's my use case:
- I'm spinning up a separate localstack container in a VSCode devcontainer for development.
- By default, the connection destination with awslocal is localhost:4566, so I set AWS_ENDPOINT_URL to localstack:4566 in my .zshrc file.
- Inside the devcontainer, I'm also deploying to AWS using the CDK, and I need to check actual AWS resources after deployment using the AWS command. Therefore, I want the AWS command and awslocal to connect to separate endpoints.
Given this scenario, I think it's crucial to have the ability to distinguish between the endpoint for awslocal and the endpoint that the AWS command (or the AWS SDK) picks up directly. This is because while the localhost:4566 works perfectly for most local setups, in the context of the devcontainer, where I have to point it to localstack:4566 (since localstack is not technically on localhost), it creates a need for a different setup.
Hi @yoshizawa56, Just checking in that have this issue been resolved in the meantime or do you still need some assistance?
@yoshizawa56 I'll close this issue for now, please feel free to comment if this still is an issue for you.