Skip to content

Instantly share code, notes, and snippets.

@jqtrde
Created May 30, 2015 03:09
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 jqtrde/cf98c8fad0badc9d4def to your computer and use it in GitHub Desktop.
Save jqtrde/cf98c8fad0badc9d4def to your computer and use it in GitHub Desktop.
Interacting with AWS via the CLI

AWS gets easier once you learn the cli commands relevant to your workflow. That said, remembering some of the lengthier (and more useful) commands can be tough. Here's what I tend to use:

# Create an SSH keypair and save the key locally.
aws ec2 create-key-pair --key-name <KEYNAME> --profile default --query 'KeyMaterial' --output text > ~/.ssh/<KEYNAME>.pem

# Delete a keypair
aws ec2 delete-key-pair --key-name <KEYNAME> --profile default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment