AWS CLI Setup
1
Install the AWS CLI
Download and install AWS CLI v2 for your platform.
2
Configure credentials
Run the interactive setup. You’ll need an Access Key ID and Secret from IAM.Credentials are stored in
~/.aws/credentials; config in ~/.aws/config.3
Use named profiles
Managing multiple accounts is much cleaner with named profiles.
4
Verify the active identity
Key Services Quick Reference
EC2
Virtual machines in the cloud. Choose instance families based on workload:
t3/t4g for burstable dev, m6i for general-purpose, c6i for compute-heavy, r6i for memory-intensive apps.S3
Object storage with 11 nines durability. Used for backups, static sites, data lakes, Lambda deployment packages, Terraform state, and log archives.
IAM
Identity and Access Management controls who can do what across all AWS services. Covers users, groups, roles, and policies (identity-based and resource-based).
VPC
Your private network in AWS. Define subnets (public/private), route tables, internet gateways, NAT gateways, security groups, and NACLs.
Lambda
Serverless compute. Run code in response to events (API Gateway, S3, SQS, EventBridge). Billed per invocation and duration (100ms increments).
RDS
Managed relational databases: PostgreSQL, MySQL, MariaDB, Oracle, SQL Server, and Aurora. Handles backups, patching, and failover automatically.
CloudWatch
Metrics, logs, alarms, and dashboards. Use metric filters to turn log patterns into actionable alerts, and Container Insights for ECS/EKS observability.
CloudTrail
API audit log for every call made to your account. Essential for security investigations, compliance, and change tracking. Enable in all regions.
IAM Best Practices
Good IAM hygiene is the single highest-leverage security practice in AWS. These are the principles I apply on every account I manage.Least Privilege — grant only what is needed
Least Privilege — grant only what is needed
Start with a deny-all posture and add only the permissions required. Use IAM Access Analyzer and the last-accessed data in IAM to identify and remove unused permissions over time.
Roles over Users for workloads
Roles over Users for workloads
EC2 instances, Lambda functions, ECS tasks, and CI/CD pipelines should all authenticate via IAM roles, not static access keys. Roles use temporary credentials rotated automatically by STS.
Enforce MFA on human users
Enforce MFA on human users
Require MFA for the root account immediately. Enforce MFA on all IAM users via an SCP (if using AWS Organizations) or a conditional IAM policy.
Use permission boundaries and SCPs
Use permission boundaries and SCPs
Permission boundaries cap the maximum permissions a role or user can have, even if their attached policies are overly broad. Service Control Policies (SCPs) in AWS Organizations apply account-wide guardrails — great for preventing region sprawl or blocking specific risky actions.
Never use the root account for day-to-day work. Lock it down with MFA, delete or disable root access keys, and only access it for tasks that genuinely require root (a very short list).
S3 Operations
- Bucket Management
- File Operations
- Access & Permissions
- Lifecycle Rules
EC2 Instance Management
1
Find the right AMI
2
Launch an instance
3
Common instance operations
4
Connect with SSM Session Manager
Skip bastion hosts and open SSH ports entirely. SSM Session Manager gives browser or CLI shell access through IAM authentication.
CloudWatch Essentials
Useful One-Liners
Related Notes
Terraform
Provision and manage AWS resources as code with Terraform — state, modules, and real-world patterns.
FinOps & Cost Management
AWS Cost Explorer, Budgets, rightsizing, and tooling notes for keeping cloud spend under control.
GCP & Azure Reference
Quick reference for GCP and Azure CLI, key services, and cross-cloud comparisons.
Kubernetes
Container orchestration on EKS and beyond — deployments, networking, and operations.