Account structure and the Well-Architected framework
Start with an AWS Organizations structure — a management account, separate member accounts per environment or workload, and SCPs (Service Control Policies) to enforce guardrails. Apply the Well-Architected pillars (operational excellence, security, reliability, performance, cost optimisation, sustainability) as a review checklist, not a one-off. Tag every resource for cost allocation and enable AWS Cost Anomaly Detection.
- AWS Organizations with SCPs for guardrails
- Separate accounts per environment (dev/prod) or per workload
- Mandatory tagging policy via Tag Policies
- Cost Anomaly Detection and monthly budget alerts
EC2 instances and management
Right-size EC2 instances using Compute Optimiser recommendations. Use launch templates and Auto Scaling groups for elasticity, spread across multiple Availability Zones for HA. Prefer IMDSv2 on every instance (IMDSv1 is a known SSRF vector). Use EBS volumes with the right type (gp3 for general, io2 for high IOPS) and enable encryption by default at the account level.
aws ec2 run-instances \
--image-id ami-0abcdef1234567890 \
--instance-type t3.medium \
--key-name prod-key \
--subnet-id subnet-0abc123 \
--security-group-ids sg-0abc123 \
--metadata-options "HttpTokens=required,HttpPutResponseHopLimit=1" \
--tag-specifications "ResourceType=instance,Tags=[{Key=env,Value=prod},{Key=owner,Value=infra}]"S3 storage and lifecycle policies
S3 is the object storage backbone. Enable versioning and MFA delete on critical buckets, default encryption with SSE-KMS, and block public access at the account level. Use lifecycle policies to transition objects to Infrequent Access, then Glacier, then expire — this is where most S3 cost savings live. Use S3 Intelligent-Tiering for access patterns you cannot predict.
| Storage class | Use case | Cost vs Standard |
|---|---|---|
| S3 Standard | Frequently accessed data | Baseline |
| S3 Standard-IA | Infrequent access, rapid retrieval | Lower storage, higher retrieval |
| S3 Glacier Instant Retrieval | Archive, ms retrieval | Lower than IA |
| S3 Glacier Flexible | Archive, minutes–hours retrieval | Much lower |
| S3 Glacier Deep Archive | Long-term retention, 12h retrieval | Lowest |
VPC networking and security
Design VPCs with public and private subnets across at least two AZs. Put workloads in private subnets with no direct internet path; use a NAT Gateway for outbound and a load balancer in the public subnet for inbound. Security Groups are stateful and the primary control — default-deny, allow least privilege. NACLs are stateless and useful as broad subnet-level guards.
- Workloads in private subnets; NAT Gateway for outbound
- Security Groups default-deny, least-privilege ingress
- VPC Flow Logs to S3/CloudWatch for audit
- VPC Endpoints (PrivateLink) for AWS service traffic — no public internet
RDS database solutions
Amazon RDS gives managed SQL Server, PostgreSQL, MySQL and others. Use Multi-AZ deployment for HA (synchronous standby), read replicas for read scaling, and automated backups with a retention window that meets your RPO. Enable encryption at rest with KMS and use IAM database authentication where supported. For Aurora workloads, Aurora Serverless v2 scales capacity with demand.
Lambda serverless computing
Lambda is the serverless compute layer — pay per invocation, no idle cost. Use it for event-driven workloads (S3 triggers, API Gateway, EventBridge), scheduled tasks and API backends. Keep handlers idempotent, set conservative timeouts, and use Provisioned Concurrency for latency-sensitive paths. Layer dependencies to keep deployment packages small.
aws lambda create-function \
--function-name process-upload \
--runtime nodejs20.x \
--zip-file fileb://function.zip \
--handler index.handler \
--role arn:aws:iam::123456789012:role/lambda-exec \
--timeout 30 \
--memory-size 512 \
--environment Variables={ENV=prod,LOG_LEVEL=info}CloudFront CDN and Route 53 DNS
CloudFront is the CDN and edge — cache static assets, terminate TLS at the edge, and use Lambda@Edge or CloudFront Functions for request manipulation. Point Route 53 at CloudFront with alias records, use health checks for failover routing, and enable DNSSEC. For S3-backed origins, use Origin Access Control (OAC) so the bucket is never public.
Lessons learned
- Enforce IMDSv2 and encryption-by-default at the account level
- S3 lifecycle policies are the single biggest cost lever
- Workloads in private subnets; never expose RDS to the internet
- Use CloudFront + OAC so S3 origins stay private
Written by
Jamshed Alam
Global MSP & IT Infrastructure Consultant with 20 years across Exchange, Microsoft 365, Azure, security and automation. Available for project and contract work worldwide.