Skip to content

Instantly share code, notes, and snippets.

@szepnapot
Created February 11, 2019 10:16
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 szepnapot/f3ee6fba21b6201eb81d5a058e97f2a2 to your computer and use it in GitHub Desktop.
Save szepnapot/f3ee6fba21b6201eb81d5a058e97f2a2 to your computer and use it in GitHub Desktop.
AWS stuffs

Install the CLI

sudo apt-get install python-pip
sudo pip install awscli

# upgrade
sudo pip install --upgrade awscli

Test the CLI

aws ec2  describe-regions

Stop every instance with env=dev tag

aws ec2 stop-instances --instance-ids `aws ec2 describe-instances --filters "Name=tag:env,Values=dev" --query 'Reservations[].Instances[].InstanceId' --output text

Signup via Cognito

aws cognito-idp sign-up \
  --region eu-west-1 \
  --client-id 73f261op587kdm6ae80p88aroo \
  --username admin@example.com \
  --password Passw0rd!

Verify signup

aws cognito-idp admin-confirm-sign-up \
  --region eu-west-1 \
  --user-pool-id eu-west-1_2gyIcQHE0 \
  --username admin@example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment