Cloud fundamentals with AWS

The core services (compute, storage, databases, networking, identity) and the security and cost habits that apply on any cloud.

L2 · Mid-level engineer≈ 5 min read
Key points · the two-minute version
  1. Core services: EC2/ECS/Lambda (compute), S3 (objects), RDS (SQL), SQS/SNS/EventBridge (messaging), VPC (network), IAM (identity), KMS and Secrets Manager.
  2. Grant least privilege to roles (instance or task roles), not long-lived user keys. CI uses OIDC.
  3. Keep data private by default. Private buckets, databases in private subnets, encryption at rest and in transit.
  4. Use presigned URLs for direct uploads and downloads.
  5. Use infrastructure as code, and tag, budget and alert on everything.
You should be able to
  • Map an application onto core AWS services
  • Write least-privilege IAM policies
  • Keep data private by default and control cost

Why this matters

Most companies run on a public cloud, and AWS is the largest. You don't need every service; you need the dozen that everything else is built from, plus the security and cost habits. The same concepts exist on Google Cloud and Azure under other names.

The core services

Need AWS What to know
Virtual machines EC2 Instance types, AMIs, security groups, autoscaling groups
Containers ECS (Fargate), EKS Fargate runs containers without managing servers
Functions Lambda Event-driven, short-lived; cold starts; time limits
Object storage S3 Buckets private by default; encryption; presigned URLs for uploads/downloads
Relational DB RDS / Aurora Managed Postgres/MySQL, backups, read replicas
Queues & events SQS, SNS, EventBridge Decoupling; DLQs
Networking VPC, subnets, security groups, ALB Private subnets for databases; load balancers in public subnets
Identity IAM Roles, policies, least privilege
Secrets Secrets Manager, SSM Parameter Store Never in code or images
Keys KMS Encryption keys, per-tenant keys
Observability CloudWatch, CloudTrail Metrics and logs; audit trail of API calls
AI Bedrock (+ AgentCore) Managed model access and agent runtime (9.4)

How to do it: least privilege

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["s3:GetObject", "s3:PutObject"],
    "Resource": "arn:aws:s3:::clips-prod-private/uploads/*"
  }]
}

Attach policies to roles that services assume (an EC2 instance role, an ECS task role), not to long-lived user access keys. Grant exactly the actions and resources the service needs.

Habits that apply to every cloud

  • Private by default: buckets private, databases in private subnets, encryption at rest (KMS) and in transit (TLS).
  • Infrastructure as code: Terraform, CDK or CloudFormation, reviewed like application code.
  • Cost: tag resources by project; set budgets and alerts; rightsize instances after measuring; delete idle resources. Cost optimisation claims (like "cut AWS spend 35%") need a baseline and a mechanism, as every metric does.
  • Regions: pick one close to users and compatible with data-residency rules.

Common mistakes

  • "Action": "*" policies "for now".
  • Public S3 buckets for user uploads.
  • Long-lived access keys on laptops and in CI instead of roles and short-lived credentials (OIDC from CI).
  • Forgotten resources running for months.

Interview follow-ups

  • "ECS, EKS or Lambda?" Lambda for event-driven, short tasks; ECS/Fargate for containers without managing servers; EKS when you need Kubernetes' ecosystem and have a platform team.
  • "How do you give CI deploy access without long-lived keys?" OIDC federation from the CI provider to an IAM role with a trust policy scoped to the repository and branch.
  • "How would you cut a cloud bill?" Measure by tag first; rightsize instances, schedule non-prod off-hours, use savings plans for steady load, lifecycle policies on storage, remove idle resources. State savings with a baseline.

Check yourself

How should an EC2 or ECS service get permission to read from S3?

Through an IAM role attached to the instance or task, with a policy limited to the specific bucket prefix and actions it needs. No access keys in environment variables.

What's a presigned URL and why use one?

A time-limited URL granting one specific S3 operation on one object. Clients upload or download directly to S3 without your servers proxying the bytes, and without being given credentials.

Build it

In a free-tier account (or LocalStack): create a private bucket, an IAM role with access to one prefix only, and generate a presigned upload URL from your service.

What comes next

5.3 Deployment platforms.

Build it to remember

Two hands-on projects that exercise this lesson. Pick one, build it end to end, and keep it in your portfolio.

Project 1

Presigned upload service

A private bucket, a role scoped to one prefix, an API that issues presigned PUT/GET URLs, all in Terraform.

  • AWS S3
  • IAM
  • Python boto3
  • FastAPI
  • Terraform

Practises IAM scoping, S3 security, IaC.

Project 2

Serverless thumbnailer

An upload triggers a Lambda that makes thumbnails, with failures going to a DLQ and alarms on DLQ depth.

  • AWS Lambda
  • S3 events
  • SQS DLQ
  • CDK (TypeScript)

Practises Event-driven architecture and managed queues.

Can you answer every check-yourself question out loud without opening the answer?