← All bricks

aws · Beginner

aws: AWS from the Command Line (Quick Start)

A fast on-ramp to the AWS CLI v2: authenticate in a minute, confirm who you are, then tour the everyday commands for S3, EC2, IAM and CloudWatch Logs.

The AWS console is fine for clicking around, but real work happens at the command line — it is scriptable, fast, and the same everywhere. This is the quick start, not the deep dive: we get you authenticated with a minimal configure, confirm your identity, learn to read output as JSON, a table or plain text, and pluck a single field with a light touch of query. Then we tour the commands you will actually type all day — listing and copying S3 objects, syncing folders, inspecting and starting EC2 instances, looking up IAM users, and tailing live logs. By the end you can open the help for any service and drive it yourself.

What you'll build

  • Authenticate the CLI with a minimal aws configure
  • Confirm your identity with sts get-caller-identity
  • Switch output between json, table and text
  • Pluck a single field with a light --query
  • Move objects and folders around S3
  • Inspect, start and stop EC2 instances
  • Look up IAM users and tail CloudWatch Logs
  • Use profiles, region overrides and the built-in help

Contents

  1. Check what you are running
  2. Get authenticated
  3. Confirm who you are
  4. Read it as a table
  5. Read it as plain text
  6. Pluck one field
  7. List your buckets
  8. Look inside a bucket
  9. Copy a file up
  10. Sync a whole folder
  11. Make a bucket
  12. Remove a bucket
  13. Look at your EC2 instances
  14. Tame it with a query
  15. Stop an instance
  16. Start it again
  17. List IAM users
  18. Look up one user
  19. Find your log groups
  20. Tail logs live
  21. Override the region
  22. Switch accounts with profiles
  23. See your effective settings
  24. Help is always there
  25. You can drive any service now