swipely / iam-docker

Use different IAM roles for each Docker container on an EC2 instance
MIT License
211 stars 22 forks source link

Support IAM_ROLE environment variable #12

Closed willglynn closed 8 years ago

willglynn commented 8 years ago

Some non-ECS environments make it difficult to specify Docker labels but easy to specify environment variables. This commit makes iam-docker look for the IAM_ROLE environment variable if no label is available.

Incidentally, this change also allows iam-docker to act as a drop-in replacement for lyft/metadataproxy.

nahiluhmot commented 8 years ago

@willglynn Thanks for the contributions! This looks good. Out of curiosity, which environments don't natively support Docker labels? Kubernetes or something else?

willglynn commented 8 years ago

As of this writing, I believe neither Kubernetes nor Marathon provide for the creation of Docker labels, though both have their own internal concepts of labels.

nahiluhmot commented 8 years ago

Good to know.