Skip to content

Instantly share code, notes, and snippets.

@abdennour
Last active December 9, 2017 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdennour/acb4c9dd1a03de7935e2aded3368524b to your computer and use it in GitHub Desktop.
Save abdennour/acb4c9dd1a03de7935e2aded3368524b to your computer and use it in GitHub Desktop.
Display AMI role metedata associated to the running EC2 : access key, secret access key, token, last rotation, .. so on.
#!/bin/bash
ENDPOINT=http://169.254.169.254/latest/meta-data/iam/security-credentials/;
curl -s $ENDPOINT`curl -s $ENDPOINT`
@abdennour
Copy link
Author

abdennour commented Nov 3, 2017

Or :

curl -s -L https://gist.githubusercontent.com/abdennour/acb4c9dd1a03de7935e2aded3368524b/raw/40b366ba4aa5c81528caab8b018db74f3c6074fa/cat-role.sh | bash

Or

curl -s -L https://goo.gl/GXLySy | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment