Skip to main content

AWS Cheatsheet

· One min read
Carlos Angulo Mascarell
Senior Platform Engineer

This post contains some useful AWS commands and scripts.

AWS Commands

Command
aws sts get-caller-identity

Filtering command output

  • --query PROP_PATH. Like you're using jq for querying JSON string. You can save the initial .
  • --output text|json. Output as text print values without quotes.

Most used commands

  • aws sts get-caller-identity --query Arn --output text get current user ARN

Script to verify credentials

current_credentials=$(aws sts get-caller-identity --query Arn --output text)
expected_credentials="arn:aws:iam::{ACCOUNT_ID}}:user/{USER_NAME}"

if [[ "${current_credentials}" != "${expected_credentials}" ]]; then
echo "\033[31m INVALID CREDENTIALS \033[0m" # PRINT THIS IN RED
return
fi

About me

I'm a Senior Platform Engineer. I build and evolve Internal Developer Platforms — golden paths, self-service tooling, and paved roads spanning AWS governance, CI/CD standardization, and developer enablement — so engineering teams ship faster, safer, and more autonomously, with less cognitive load. My core stack is AWS, Terraform, and GitHub Actions, and I'm an AWS Certified Solutions Architect. I care deeply about paved roads, productivity, and documenting implementations so knowledge scales with the team (yes, I'm an engineer who likes to document 🧑‍💻).

You can check my experience here.

Personal Blog - cangulo.github.io GitHub - Carlos Angulo Mascarell - cangulo
LinkedIn - Carlos Angulo Mascarell

Did you like it? Share It!


Comments