Last active
June 24, 2018 03:46
-
-
Save tkuchiki/7479beab3e8f0a0699d8399e2be9338f to your computer and use it in GitHub Desktop.
get ec2 security credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html | |
base_url="http://169.254.169.254/latest/meta-data/iam/security-credentials" | |
iam_role=`curl -s $base_url/` | |
curl -s "$base_url/$iam_role" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment