You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?
Cloud with AWS commands
One page per command. What it does, when to use it, how risky it is.
Sign in and profiles
aws sts get-caller-identityShows who you are right now: your account number and your ARN.Risk: Safeaws sso loginSigns in through IAM Identity Center and keeps short-lived badges for the CLI.Risk: Safeaws loginUses your console sign-in to give the CLI short-lived keys (AWS CLI 2.32.0 or newer).Risk: Safeaws configure list-profilesLists the profiles the CLI knows about.Risk: Safeaws account enable-regionSwitches on an opt-in Region, like Malaysia (ap-southeast-5), for your account.Risk: Safe
Keys and guards (IAM)
aws iam create-roleMakes a role from a trust policy: who may borrow it.Risk: Safeaws iam attach-role-policyClips a managed policy onto a role, so the role gets its keys.Risk: Carefulaws iam list-access-keysLists a user's access keys and whether each is Active or Inactive. It never shows the secret.Risk: Safeaws iam update-access-keySwitches an access key off (Inactive) or on (Active). The key is kept.Risk: Carefulaws iam delete-access-keyDeletes an access key for good. There is no undo.Risk: Can lose work
Network and servers
aws ec2 create-vpcFences off a new VPC: your own plot of addresses.Risk: Safeaws ec2 create-subnetAdds a row of units (a subnet) inside your VPC.Risk: Safeaws ec2 create-routeAdds a road sign to a route table.Risk: Carefulaws ec2 delete-nat-gatewayDeletes a NAT gateway, which bills every hour it exists.Risk: Carefulaws ec2 authorize-security-group-ingressAdds an allow rule to a security group: who may come in, on which port.Risk: Carefulaws ec2 run-instancesRents a new server (an EC2 instance).Risk: Carefulaws ec2 stop-instancesPauses a server. Compute stops billing; its disks and Elastic IPs do not.Risk: Carefulaws ec2 terminate-instancesDeletes a server for good. Its root disk goes too, by default.Risk: Can lose workaws elbv2 describe-target-healthShows which servers behind a load balancer pass their health check.Risk: Safeaws cloudfront create-invalidationTells CloudFront's kiosks to forget old copies of some pages.Risk: Safe
Storage (S3)
aws s3 mbMakes a new S3 bucket: a storeroom for files.Risk: Safeaws s3api get-public-access-blockShows the four Block Public Access locks of a bucket.Risk: Safeaws s3 rbDeletes a bucket. With --force, it deletes every file inside first.Risk: Can lose work
Containers
aws ecr get-login-passwordGets a short-lived ECR password and hands it to docker login.Risk: Safeaws ecr create-repositoryMakes a private image shelf (repository) in ECR.Risk: Safeaws ecr delete-repositoryDeletes a shelf. With --force, every image on it goes too.Risk: Can lose workaws ecs list-tasksLists the tasks running in an ECS cluster.Risk: Safeaws ecs run-taskStarts a task once, for example on Fargate.Risk: Carefulaws ecs delete-serviceDeletes an ECS service. Its tasks stop.Risk: Carefulaws eks update-kubeconfigAdds an EKS cluster to your kubeconfig, so kubectl can reach it.Risk: Safeaws rds stop-db-instanceStops a database for a while. Storage and backups still bill.Risk: Carefulaws secretsmanager delete-secretDeletes a secret after a recovery window, so you can still undo it.Risk: Careful
Budgets and clean-up
aws budgets create-budgetCreates a budget: a line on the bill, with emails when spending passes it.Risk: Safe