Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS_ENDPOINT_URL overrides the endpoint URL of aws command #76

Open
yoshizawa56 opened this issue Jul 11, 2023 · 3 comments
Open

AWS_ENDPOINT_URL overrides the endpoint URL of aws command #76

yoshizawa56 opened this issue Jul 11, 2023 · 3 comments

Comments

@yoshizawa56
Copy link

yoshizawa56 commented Jul 11, 2023

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

@whummer
Copy link
Member

whummer commented Jul 11, 2023

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!

@yoshizawa56
Copy link
Author

@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.

@lakkeger
Copy link
Contributor

Hi @yoshizawa56,
Just checking in that have this issue been resolved in the meantime or do you still need some assistance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants