Table of Contents

awscli command cheatsheet

awscli official documentation

aws cli-tool

create a new credentials profile in .aws

$ aws configure --profile prod-core

execute a command with a specific profile

$ aws --profile prod-core <command> <subCommand>

execute a command with a specific profile

$ aws --profile prod-core <command> <subCommand>

iam

list all available roles (store in file)

$ aws --profile prod-core iam list-roles > aws_available_iam_roles.json

list a specific role (by name) (store in file)

$ aws iam get-role --role-name some-role-name > some-role-name.json

s3 bucket

sync current local folder to remote s3 bucket

$ aws s3 sync . s3://kamaradski.com --exclude ".git" --exclude "_Store" --exclude "*.md"

parameter store

add (secure) item to parameter store

$ aws ssm put-parameter \
    --name "item-name" \
    --type "SecureString" \
    --value "item-content" \
    --overwrite \
    --profile stage-core

lightsail

list available blueprints in a file

$ aws lightsail get-blueprints > available_blueprints.json

get available bundles in a file

$ aws lightsail get-bundles > available_bundles.json