Skip to content

Instantly share code, notes, and snippets.

@mikepietruszka
Created January 1, 2020 21:49
Show Gist options
  • Save mikepietruszka/132d9f52e39790707bfe4a6e74294544 to your computer and use it in GitHub Desktop.
Save mikepietruszka/132d9f52e39790707bfe4a6e74294544 to your computer and use it in GitHub Desktop.
get AWS account ID from within an EC2 instance
curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq .accountId | sed 's/"//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment