Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

IAM role credentials support #221

Closed
2xmax opened this issue Feb 13, 2015 · 1 comment
Closed

IAM role credentials support #221

2xmax opened this issue Feb 13, 2015 · 1 comment

Comments

@2xmax
Copy link

2xmax commented Feb 13, 2015

At this moment, aws.go supports explicit Key, Secret pair access only.

If you use IAM role you can get the temporary credentials without explicit configuration. This credential contain extra "token" field.

IAM_ROLE=$(curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/)
# will return (key, secret, token) triple
curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/${IAM_ROLE}

By the way, it is exactly the same way how aws s3 cli, s3cmd tool works: it will use your IAM account by default.

Does it makes sense to add IAM roles authentication feature?

# to aws.go:
func IamAuth()
``

@2xmax 2xmax closed this as completed Feb 13, 2015
@2xmax
Copy link
Author

2xmax commented Feb 13, 2015

Sorry, found this issue in another fork. Seems it has already been implemented.

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

No branches or pull requests

1 participant