Skip to content

Instantly share code, notes, and snippets.

@antweiss
Created January 21, 2023 15:06
Show Gist options
  • Save antweiss/15f645186703ae07d86eb6bdf5bdb149 to your computer and use it in GitHub Desktop.
Save antweiss/15f645186703ae07d86eb6bdf5bdb149 to your computer and use it in GitHub Desktop.
AWS cli - get account id
#assign to an env variable:
export ACCOUNT_ID=$(aws sts get-caller-identity --query "Account" --output text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment