Skip to content

Instantly share code, notes, and snippets.

@ghsatpute
Created June 21, 2020 14:55
Show Gist options
  • Save ghsatpute/bbd870ec5b9a76f23f1125b290a67dc1 to your computer and use it in GitHub Desktop.
Save ghsatpute/bbd870ec5b9a76f23f1125b290a67dc1 to your computer and use it in GitHub Desktop.
AWS Command cheatsheet

IAM

Get MFA Token

$ aws --profile my-profile sts  get-session-token --serial-number arn:aws:iam::{account}:mfa/{user-id} --token-code {user-token}

CloudFormation

Deploy stack

   aws --profile my-profile-mfa cloudformation create-stack --stack-name \
            ${StackName} --template-body file://`pwd`/service-infra.template --parameters file://`pwd`/service-infra-parameters.json

Wait for stack

aws --profile my-profile-mfa cloudformation wait stack-create-complete --stack-name ${StackName}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment