cloudyr / aws.signature

Amazon Web Services Request Signatures
https://cloud.r-project.org/package=aws.signature
31 stars 33 forks source link

Support for IAM roles for ECS tasks #23

Closed razvanm closed 6 years ago

razvanm commented 6 years ago

A task in ECS can use a role that is different from the VMs that are part of the ECS cluster. If a task is configured with a task role then the environment variable will be populated with a AWS_CONTAINER_CREDENTIALS_RELATIVE_URI variable that which can be used like this to retrieve a set of temporary credentials:

curl 169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI

Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html

leeper commented 6 years ago

Do you want a function to be able to grab these or do you want it to happen automatically on function calls?

razvanm commented 6 years ago

I would expect both locate_credentials to return them and also for the downstream functions (the ones from aws.s3 for example) to start working.

leeper commented 6 years ago

Makes sense.