復習シート
Design Resilient Architectures
この分野の要点を数画面にまとめました。試験の前に読み返すためのものです。
この復習シートは今のところ英語で表示しています。
2.1Loose coupling and messaging
- Loose coupling: hand off a message and move on. A slow or failed consumer does not stop the producer.
- Queue as buffer: SQS absorbs spikes. Scale consumers on queue depth per instance.
- SQS visibility timeout: 30 seconds by default, up to 12 hours. Set it above the processing time.
- SQS retention: 4 days by default, up to 14 days. Long polling: up to 20 seconds.
- Standard queue: at least once, best-effort order. FIFO: order per message group, no duplicates for 5 minutes.
- Consumers must be idempotent. A DLQ parks messages that keep failing.
- SNS fan-out: one topic, one SQS queue per consumer. Filter policies trim each subscriber’s feed.
2.1Loose coupling and messaging
- EventBridge: rules on a bus, up to 5 targets, archive and replay, Pipes, Scheduler, cross-account buses.
- Amazon MQ: managed ActiveMQ and RabbitMQ for apps that already use JMS, AMQP or MQTT.
Buffer work, one consumer per message
One message to many subscribers, SMS, email
Route events by content, SaaS events, schedules
Ordered stream, replay, many readers
Existing app with JMS or AMQP, no rewrite
Multi-step workflow with retries and approvals
| Need | Choose |
|---|---|
| Buffer work, one consumer per message | |
| One message to many subscribers, SMS, email | |
| Route events by content, SaaS events, schedules | |
| Ordered stream, replay, many readers | |
| Existing app with JMS or AMQP, no rewrite | |
| Multi-step workflow with retries and approvals |
1 / 2
Buffer work, one consumer per message
One message to many subscribers, SMS, email
Route events by content, SaaS events, schedules
| Need | Choose |
|---|---|
| Buffer work, one consumer per message | |
| One message to many subscribers, SMS, email | |
| Route events by content, SaaS events, schedules |
2 / 2
Ordered stream, replay, many readers
Existing app with JMS or AMQP, no rewrite
Multi-step workflow with retries and approvals
| Need | Choose |
|---|---|
| Ordered stream, replay, many readers | |
| Existing app with JMS or AMQP, no rewrite | |
| Multi-step workflow with retries and approvals |
2.1Scaling, caching and API design
- Scale out: more instances, no ceiling, no downtime, needs a stateless tier. Scale up: bigger instance, restart, ceiling.
- Stateless tier: sessions in ElastiCache or DynamoDB, files in S3 or EFS.
- Multi-tier: ALB in public subnets, app and database in private subnets, security groups chained tier to tier.
- ALB: path, host and header rules, instance, IP and Lambda targets, TLS offload, Cognito or OIDC login.
- ALB cross-zone is on by default. NLB cross-zone is off by default. Deregistration delay is 300 seconds.
- API Gateway: REST has caching, usage plans and validation. HTTP is cheaper. WebSocket is two-way.
2.1Scaling, caching and API design
- API Gateway: 10,000 requests per second. Timeout 29 seconds by default, more on Regional and private REST APIs. Cache TTL 300 seconds.
- Edge-optimized endpoints for global clients. Private endpoints need an interface VPC endpoint.
- Lazy loading fills the cache on a miss. Write-through updates it on every write. TTL limits staleness.
Static content, global users
API responses
Database reads, sessions
DynamoDB reads in microseconds
- DAX
| Where | Cache with |
|---|---|
| Static content, global users | |
| API responses | |
| Database reads, sessions | |
| DynamoDB reads in microseconds | DAX |
2.1Serverless and containers
- Serverless backend: API Gateway, Lambda, DynamoDB. File pipeline: S3 event starts Lambda.
- Lambda runs up to 30 minutes now (older exams: 15). Longer jobs go to Fargate or Step Functions.
- Amplify builds and hosts a web or mobile app from Git. Device Farm tests apps on real phones.
- Containers: make the app stateless, settings in environment variables or Secrets Manager, image in ECR.
- ECS is the simplest orchestrator. EKS is for Kubernetes. Fargate removes servers for both.
- Use EC2 capacity for GPUs, special hardware, or the lowest cost at a steady high load.
2.1Serverless and containers
- Step Functions Standard: up to 1 year, exactly once. Express: up to 5 minutes, at least once.
- Callback and .sync patterns work only in Standard workflows.
2.2Availability and disaster recovery
- Use at least two AZs. EC2, EBS, subnets and zonal NAT gateways are in one AZ. S3, DynamoDB, SQS and Lambda span AZs.
- One zonal NAT gateway per AZ, or one Regional NAT gateway. AZ IDs (use1-az1) are the same in every account. AZ names are not.
- RPO: data you can lose. RTO: time you can be down.
- Backup and restore, pilot light, warm standby, active-active: cost and speed both go up.
- Elastic Disaster Recovery: continuous block replication, RPO of seconds, RTO of minutes.
- AWS Backup is for scheduled copies and retention. AWS Transform MGN (earlier Application Migration Service) is for permanent moves.
2.2Availability and disaster recovery
- Route 53 failover needs a health check on the primary. Lower the TTL before a planned failover.
- Health checks: endpoint, calculated, CloudWatch alarm. Alias records work at the zone apex.
- Active-active across Regions: DynamoDB global tables, Route 53 latency routing.
Backup and restore
- RPO and RTO
- Hours, hours
- What runs
- Backups only
- Cost
- Lowest
Pilot light
- RPO and RTO
- Minutes, tens of minutes
- What runs
- Data live, servers off
- Cost
- Low
Warm standby
- RPO and RTO
- Seconds to minutes, minutes
- What runs
- Small full copy
- Cost
- Medium
Active-active
- RPO and RTO
- Near zero, near zero
- What runs
- Full copies in 2+ Regions
- Cost
- Highest
| Strategy | RPO and RTO | What runs | Cost |
|---|---|---|---|
| Backup and restore | Hours, hours | Backups only | Lowest |
| Pilot light | Minutes, tens of minutes | Data live, servers off | Low |
| Warm standby | Seconds to minutes, minutes | Small full copy | Medium |
| Active-active | Near zero, near zero | Full copies in 2+ Regions | Highest |
1 / 2
Backup and restore
- RPO and RTO
- Hours, hours
- What runs
- Backups only
- Cost
- Lowest
Pilot light
- RPO and RTO
- Minutes, tens of minutes
- What runs
- Data live, servers off
- Cost
- Low
| Strategy | RPO and RTO | What runs | Cost |
|---|---|---|---|
| Backup and restore | Hours, hours | Backups only | Lowest |
| Pilot light | Minutes, tens of minutes | Data live, servers off | Low |
2 / 2
Warm standby
- RPO and RTO
- Seconds to minutes, minutes
- What runs
- Small full copy
- Cost
- Medium
Active-active
- RPO and RTO
- Near zero, near zero
- What runs
- Full copies in 2+ Regions
- Cost
- Highest
| Strategy | RPO and RTO | What runs | Cost |
|---|---|---|---|
| Warm standby | Seconds to minutes, minutes | Small full copy | Medium |
| Active-active | Near zero, near zero | Full copies in 2+ Regions | Highest |
2.2Routing and databases
- Route 53 policies: weighted for canaries, latency for speed, geolocation for country rules, failover for standby.
- Multivalue answer returns up to 8 healthy records. IP-based routes by client IP range.
- RDS Multi-AZ instance: synchronous standby, not readable, DNS switch on failover.
- RDS Multi-AZ cluster: two readable standbys in three AZs.
- Aurora: shared storage across 3 AZs. Up to 15 replicas are failover targets and serve reads.
- Aurora Global Database: secondary Regions, usually under 1 second behind.
- Read replicas are asynchronous. Promoting one across Regions can lose recent writes.
2.2Routing and databases
- DynamoDB global tables write in every Region.
RDS Multi-AZ instance
- Readable?
- No
- Covers
- AZ failure
RDS Multi-AZ cluster
- Readable?
- Yes
- Covers
- AZ failure
Aurora cluster
- Readable?
- Yes
- Covers
- AZ failure
Aurora Global Database
- Readable?
- Yes
- Covers
- Region failure
RDS cross-Region replica
- Readable?
- Yes
- Covers
- Region, some data loss
| Option | Readable? | Covers |
|---|---|---|
| RDS Multi-AZ instance | No | AZ failure |
| RDS Multi-AZ cluster | Yes | AZ failure |
| Aurora cluster | Yes | AZ failure |
| Aurora Global Database | Yes | Region failure |
| RDS cross-Region replica | Yes | Region, some data loss |
1 / 2
RDS Multi-AZ instance
- Readable?
- No
- Covers
- AZ failure
RDS Multi-AZ cluster
- Readable?
- Yes
- Covers
- AZ failure
Aurora cluster
- Readable?
- Yes
- Covers
- AZ failure
| Option | Readable? | Covers |
|---|---|---|
| RDS Multi-AZ instance | No | AZ failure |
| RDS Multi-AZ cluster | Yes | AZ failure |
| Aurora cluster | Yes | AZ failure |
2 / 2
Aurora Global Database
- Readable?
- Yes
- Covers
- Region failure
RDS cross-Region replica
- Readable?
- Yes
- Covers
- Region, some data loss
| Option | Readable? | Covers |
|---|---|---|
| Aurora Global Database | Yes | Region failure |
| RDS cross-Region replica | Yes | Region, some data loss |
2.2Durability, deployments and visibility
- S3 Standard: eleven nines durability, 3 or more AZs. One Zone classes lose data if the AZ is lost.
- S3 replication needs versioning on both buckets. It is not retroactive: use Batch Replication.
- S3 RTC: 99.9 percent of objects within 15 minutes. EBS snapshots can be copied across Regions.
- Immutable infrastructure: golden AMI, launch template, replace instances. No patching in place.
- Blue/green switches traffic between two environments and rolls back at once. Instance refresh replaces in batches.
- CloudFormation: change sets preview, drift detection finds manual edits, DeletionPolicy Retain or Snapshot keeps data.
2.2Durability, deployments and visibility
- StackSets deploy to many accounts and Regions. The same template builds a DR Region.
- CloudWatch: composite alarms cut noise. The EC2 recover action moves an instance to new hardware.
- X-Ray traces a request across services. Service quotas are per Region: raise them in the DR Region too.
- Well-Architected: reliability means automatic recovery and horizontal scaling. The Tool lists risks. Health Dashboard events go to EventBridge.
- Migration: rehost is lift and shift with AWS Transform MGN. Discovery Service lists servers and dependencies, and is closed to new customers.
A single server can fail, code fixed
Local data must be shared across AZs
Clients need a fixed IP, with failover
App cannot handle database reconnects
Find the slow microservice
| Problem | Use |
|---|---|
| A single server can fail, code fixed | |
| Local data must be shared across AZs | |
| Clients need a fixed IP, with failover | |
| App cannot handle database reconnects | |
| Find the slow microservice |
1 / 2
A single server can fail, code fixed
Local data must be shared across AZs
Clients need a fixed IP, with failover
| Problem | Use |
|---|---|
| A single server can fail, code fixed | |
| Local data must be shared across AZs | |
| Clients need a fixed IP, with failover |
試験のひっかけ
- “Decouple so no orders are lost” → SQS queue, not a direct call or SNS alone
- “One message to many consumers” → SNS fan-out to SQS, not one SQS queue
- “Route events from AWS or SaaS by content” → EventBridge, not SNS
- “Existing app with JMS or AMQP, no code change” → Amazon MQ, not SQS
- “Limit each customer’s requests” → API Gateway usage plan, not WAF
- “Same worker gets the message twice” → raise the SQS visibility timeout, not the retention
- “Job runs for hours” → Fargate or Step Functions, not Lambda (30 minutes limit)
試験のひっかけ
- “Survive an AZ failure” → Multi-AZ, not a read replica
- “Survive a Region failure” → Aurora Global Database or global tables, not Multi-AZ
- “RPO of seconds for servers, recovery in minutes” → Elastic Disaster Recovery, not AWS Backup
- “Recover instance on new hardware, no code change” → CloudWatch recover action, not a reboot
- “DR Region cannot launch enough instances” → raise service quotas in that Region
- “Quick Git-based hosting plus a backend for a web app” → Amplify, not hand-built servers
試験のひっかけ
- “Test on many real phones” → Device Farm, not an emulator fleet on EC2
- “Move servers with no code change” → rehost, not refactor
- “React to an AWS maintenance event automatically” → AWS Health events in EventBridge, not a CloudWatch alarm