AdRoll / hologram

Easy, painless AWS credentials on developer laptops.
Apache License 2.0
803 stars 42 forks source link

Consider ECS Task role support #101

Open mpoindexter opened 5 years ago

mpoindexter commented 5 years ago

A while back AWS added support to their SDKs to support ECS Task roles. This mechanism basically allows for multiple roles to be active, and which role is used is controlled by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable. (see docs here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)

This would be nice for Hologram because it can be used to run multiple processes under different roles by setting an environment variable. It might be a better alternative to https://github.com/AdRoll/hologram/issues/61 and https://github.com/AdRoll/hologram/issues/51

I've implemented support for this in a local branch, and would be happy to submit a PR, but wanted to check first if there's any interest from the maintainers in merging this. My local branch has a number of unrelated changes on it (upgrade to Go 1.12/modules, upgrade to the latest version of the protobuf library, upgrade all the dependencies), so it would be a good bit of work to pluck out just this feature. I'm not going to go through the effort if it will never get merged. If there's interest from the maintainers I can backport my changes against the latest master (or, if there's interest in taking my whole fork with all the latest Go support happy to help with that too)