Security, Cost & Well-Architected Frameworks

Cloud Security Architecture

4 min read

Security is non-negotiable in cloud architecture. Interviewers assess your ability to design secure systems while maintaining usability and performance.

Shared Responsibility Model

Understanding who secures what is fundamental.

AWS Shared Responsibility

AWS ResponsibilityCustomer Responsibility
Physical securityIAM policies
Network infrastructureSecurity groups/NACLs
HypervisorOS patching (EC2)
Managed service securityData encryption
Global infrastructureApplication security

Service-Specific Boundaries

Service TypeAWS ManagesCustomer Manages
IaaS (EC2)Hardware, hypervisorOS, apps, data
PaaS (RDS)OS, DB engineData, access
SaaS (S3)All infrastructureData, permissions

Identity and Access Management

IAM Best Practices

  1. Least Privilege Principle

    • Start with zero permissions
    • Add only what's needed
    • Use IAM Access Analyzer
  2. Role-Based Access

    • Prefer roles over users for services
    • Use cross-account roles
    • Implement temporary credentials
  3. MFA Everywhere

    • Root account: Hardware MFA
    • Admin users: Virtual MFA minimum
    • Programmatic: STS with MFA

Interview Question: IAM Design

Q: "Design an IAM strategy for a multi-account AWS organization."

A: Implement hub-and-spoke model:

Organization Root
├── Security Account (hub)
│   ├── IAM Identity Center
│   ├── CloudTrail aggregation
│   └── Security tooling
├── Production Account
│   └── Cross-account roles → Security
├── Development Account
│   └── Cross-account roles → Security
└── Sandbox Account
    └── Limited cross-account access

Key Decisions:

  • Centralized identity in Security account
  • Permission sets managed via IAM Identity Center
  • Break-glass procedures for emergencies
  • Service Control Policies (SCPs) at OU level

Network Security

Defense in Depth

Internet
[WAF] - Layer 7 filtering
[CloudFront] - DDoS protection
[ALB in Public Subnet] - SSL termination
[Security Group] - Stateful firewall
[Private Subnet] - Application tier
[NACL] - Stateless subnet firewall
[Security Group] - Database access
[Isolated Subnet] - Data tier

VPC Security Design

ComponentPurposeBest Practice
Security GroupsInstance firewallLeast privilege, reference by SG ID
NACLsSubnet firewallExplicit deny rules, logging
VPC Flow LogsNetwork monitoringEnable for all subnets
PrivateLinkService connectivityAvoid public internet
Transit GatewayMulti-VPC routingCentralized inspection

Interview Question: Zero Trust Architecture

Q: "How would you implement Zero Trust in AWS?"

A: Zero Trust principles in AWS:

  1. Verify Explicitly

    • IAM authentication for all requests
    • VPC endpoints for service access
    • mTLS for service-to-service
  2. Least Privilege Access

    • Fine-grained IAM policies
    • Security group microsegmentation
    • Time-limited credentials (STS)
  3. Assume Breach

    • Network segmentation
    • Encryption everywhere (TLS, KMS)
    • Continuous monitoring (GuardDuty)

Encryption Strategy

Encryption at Rest

ServiceDefaultRecommendedKey Management
S3NoneSSE-KMSCustomer CMK
EBSNoneKMS encryptedCustomer CMK
RDSOptionalEncryption enabledCustomer CMK
DynamoDBNoneKMS encryptionAWS or Customer CMK

Encryption in Transit

  • External traffic: TLS 1.2+ mandatory
  • Internal traffic: TLS between services
  • Database: SSL connections enforced
  • S3: Bucket policy requiring TLS

KMS Best Practices

  1. Key Hierarchy

    • Separate keys per environment
    • Cross-account key sharing via policies
    • Automatic key rotation (1 year)
  2. Key Policies

    • Explicit allow for key administrators
    • Separate usage from administration
    • Audit all key usage

Security Monitoring

Detection Services

ServiceDetection TypeUse Case
GuardDutyThreat detectionMalicious activity
InspectorVulnerability scanningEC2, Lambda, ECR
MacieData discoveryPII in S3
Security HubAggregationUnified dashboard
ConfigComplianceResource configuration

Incident Response

Preparation:

  • Runbooks for common incidents
  • IAM roles for incident responders
  • Forensic account for evidence

Detection → Analysis → Containment → Eradication → Recovery

Key Insight: Security in the cloud is about automation. Manual security processes don't scale—use AWS Config rules, automated remediation, and infrastructure as code.

Next, we'll explore cost optimization strategies. :::

Quick check: how does this lesson land for you?

Quiz

Module 5: Security, Cost & Well-Architected Frameworks

Take Quiz
FREE WEEKLY NEWSLETTER

Stay on the Nerd Track

One email per week — courses, deep dives, tools, and AI experiments.

No spam. Unsubscribe anytime.