Skip to content

Conversation

@BenHarris
Copy link
Contributor

With reference to using amazon/amazon-ecs-local-container-endpoints for local development and continuing the discussion within PR #48 over there...

When used with docker, the special/static 169.254.170.2 IP requires that a custom network is created and each container is attached to this network and given an IP within this space. This creates significant bloat in docker-compose files which is essentially unnecessary. If we were able to pass in a hostname, it could then be resolved by docker irrespective of any other network configuration. The only configuration then required would be that of the ecs-local-endpoints container.

Description of changes:
By implementing a AWS_CONTAINER_CREDENTIALS_SERVER_URI environmental variable, we are able to pass in an internal hostname to better support the use of Amazon ECS Local Container Endpoints.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@jonathan-conder-sm
Copy link

jonathan-conder-sm commented Sep 8, 2021

Just FYI the Python and C++ SDKs seem to use AWS_CONTAINER_CREDENTIALS_FULL_URI for this purpose, might be worth using the same convention here. I've only tested with boto3 which only allows localhost (and 127.0.0.1) or 169.254.170.2.

@BenHarris BenHarris changed the title Add support for overriding SERVER_URI in EcsCredentialProvider Add AWS_CONTAINER_CREDENTIALS_FULL_URI support to EcsCredentialProvider Dec 3, 2021
@BenHarris
Copy link
Contributor Author

Thanks for the comment @jonathan-conder-sm, seems like a sensible suggestion.

Would it be possible for someone from AWS to chip in? @ajredniwja @SamRemis

@stobrien89
Copy link
Member

Hey @BenHarris,

Thanks a lot for the pull request! And sorry for the delay in contact. I know you've seen #2401 and we've decided to go with that since it better addresses our lack in ECS container support. Hoping to have it merged soon. Let us know if you have any questions.

@stobrien89 stobrien89 closed this Mar 14, 2022
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

Successfully merging this pull request may close these issues.

3 participants