SAP-C02 · LESSON 2
Design for New Solutions29% · 6 topics
Learn to design deployment strategies, business continuity, security, reliability, performance and cost for new solutions.
2.1Design a deployment strategy to meet business requirements
2.1 Design a deployment strategy to meet business requirements.
Concept
Deployment strategies include in-place, rolling, blue/green, canary and linear. To eliminate downtime and roll back quickly, use blue/green (Route 53, ALB weighting, CodeDeploy); to validate with limited impact, use canary. Use CloudFormation StackSets to deploy the same foundation to multiple accounts and Regions, and CodePipeline for application pipelines.
How it works / steps
- Confirm requirements for acceptable downtime and rollback speed
- Choose a deployment method that fits the requirements
- Define infrastructure as IaC and deploy it to all organization accounts with StackSets
- Switch gradually with CodeDeploy, Lambda aliases or ECS blue/green
- Roll back automatically when CloudWatch alarms detect anomalies
Workplace example
Release a new payment API version as a 10% canary with a Lambda alias, monitor the error rate for 10 minutes, and switch fully if there are no problems.
Common confusions and exam tips
- Blue/green temporarily needs twice the resources
- Even with blue/green, DB schema changes must be backward compatible
- With service-managed permissions, StackSets can deploy automatically to new accounts
Mini quiz
Q1. An ECS service is deployed blue/green with CodeDeploy. If errors increase in the new version, you want to revert to the old version without human intervention. Which method is most appropriate?
- Stop blue/green, switch to all-at-once deployment, and re-release a fix immediately when errors occur
- Greatly increase client-side retry counts so errors are absorbed by retries
- Have staff check logs hourly after deployment and redeploy the old task definition if errors are high
- Associate CloudWatch alarms with the deployment group and enable automatic rollback on alarm
Show answer and explanation
Answer: D Associate CloudWatch alarms with the deployment group and enable automatic rollback on alarm
If an alarm fires during deployment or the wait period, CodeDeploy can automatically roll back and return traffic to the original task set.
Q2. Right after switching traffic to the new version in a blue/green deployment, the error rate alarm fired. The old environment still exists. What is the most appropriate first step?
- Switch traffic back to the old environment (blue) to stop the impact, then investigate the new version
- Delete the old environment to cut costs, then work on fixing and re-releasing the new version
- Keep traffic switched until all logs from the erroring new version are collected and analyzed
- Add instances to the new environment and watch for a while to see if errors decrease
Show answer and explanation
Answer: A Switch traffic back to the old environment (blue) to stop the impact, then investigate the new version
The advantage of blue/green is immediate rollback. First stop the impact on users, then investigate the cause. Keep the old environment until things are stable.
Reference links
2.2Design a solution to ensure business continuity
2.2 Design a solution to ensure business continuity.
Concept
Ensure business continuity with backups (AWS Backup cross-Region and cross-account copies, Vault Lock) and multi-Region architectures. Aurora Global Database can target an RPO under one second and an RTO of about one minute, and DynamoDB global tables allow multi-Region active/active writes.
How it works / steps
- Copy backups of critical data to another account and Region
- Prevent deletion with AWS Backup Vault Lock as a ransomware defense
- Use Aurora Global Database for DBs needing a short RPO
- Use DynamoDB global tables if multi-Region writes are needed
- Automate and drill the switchover procedure
Workplace example
Make an e-commerce order DB an Aurora Global Database; if the primary Region fails, promote the secondary and resume writes in about a minute.
Common confusions and exam tips
- Keeping backups only in the same account means losing them if the account is compromised
- Global tables resolve conflicts with last writer wins
- Regularly test restoring backups too
Mini quiz
Q1. The operations team spends a lot of time every month patching and backing up self-managed MySQL on EC2. You want to reduce operational burden in the new system. What is the most appropriate choice?
- Move MySQL to Windows Server and let Windows Update automatic updates handle database patches too
- Stop patching and update the OS and database together only when a problem is found
- Increase EC2 instances to run multiple MySQL servers and patch them manually one at a time
- Use a managed database such as Amazon Aurora MySQL and leave patching and backups to AWS
Show answer and explanation
Answer: D Use a managed database such as Amazon Aurora MySQL and leave patching and backups to AWS
To reduce provisioning and patching burden, adopt managed services. Aurora and RDS provide patching in maintenance windows and automated backups.
Q2. You want to automate backups of EBS, RDS and DynamoDB in multiple accounts, keep costs down while enabling restore in another Region, and prevent deletion by ransomware. Which configuration is most appropriate?
- Take no backups and handle ransomware deletion with just Multi-AZ databases and EBS encryption
- Configure copies to another Region and transition to cold storage in an AWS Backup plan, and enable Vault Lock
- Store all backups in the same account and Region as production, prioritizing restore speed
- Have staff take snapshots manually every day in each service's console and manage them with dates in the names
Show answer and explanation
Answer: B Configure copies to another Region and transition to cold storage in an AWS Backup plan, and enable Vault Lock
AWS Backup centrally manages taking, retaining and copying backups, and lifecycle rules lower costs. Vault Lock prevents deletion of stored backups or shortening of retention periods.
Reference links
2.3Determine security controls based on requirements
2.3 Determine security controls based on requirements.
Concept
For a new system's security, choose controls from requirements (regulation, data sensitivity, exposure). Defend the perimeter with WAF, Shield Advanced (DDoS response team and cost protection) and AWS Network Firewall (stateful inspection and domain filtering of VPC traffic); protect data with KMS or CloudHSM (when a dedicated HSM is required); patch with Systems Manager Patch Manager; and authenticate with Cognito (end users) or IAM Identity Center (employees).
How it works / steps
- Identify required controls from regulations and data classification
- Place WAF and Shield at the public perimeter and Network Firewall on VPC ingress/egress traffic
- Use CloudHSM if dedicated FIPS 140 Level 3 keys are required; otherwise KMS
- Define patch baselines and patching windows with Patch Manager
- Authenticate users with Cognito and require MFA
Workplace example
To allow outbound traffic from internal servers only to approved domains, restrict it with a Network Firewall domain list and deny everything else.
Common confusions and exam tips
- Security groups cannot filter by domain name (use Network Firewall)
- Shield Advanced includes protection against cost increases caused by DDoS
- CloudHSM is for when full key control is required; the operational burden is large
Mini quiz
Q1. For a large web app used worldwide, you want to block most attacks at the edge and prevent direct access to the origin ALB. Which configuration is most appropriate?
- Expose the ALB directly to the internet and avoid attacks by making the ALB's DNS name long and hard to guess
- Associate WAF with CloudFront, and allow the ALB security group only from the CloudFront managed prefix list
- Require all users to register their source IP addresses in advance and manage an allow list on the ALB manually
- Without CloudFront, always keep several times peak capacity of EC2 behind the ALB to absorb all the load from attack requests
Show answer and explanation
Answer: B Associate WAF with CloudFront, and allow the ALB security group only from the CloudFront managed prefix list
Block attacks at the edge with CloudFront and WAF, and restrict direct access to the origin with a security group allowing only the CloudFront prefix list (sometimes combined with custom header verification).
Q2. You are designing attack protection for a large website. Thousands of login attempts in 5 minutes are repeated from specific IP addresses. Which is the most suitable?
- AWS WAF managed rule groups
- AWS WAF rate-based rules
- AWS Shield Advanced
- CloudFront geographic restrictions
Show answer and explanation
Answer: B AWS WAF rate-based rules
Rate-based rules count requests per source IP or similar and block sources exceeding the threshold for a period.
Reference links
2.4Design a strategy to meet reliability requirements
2.4 Design a strategy to meet reliability requirements.
Concept
Reliability design combines shrinking the blast radius (cell-based architecture, shuffle sharding), loosely coupling dependencies (SQS, EventBridge), retries (exponential backoff and jitter) with timeouts and circuit breakers, and monitoring and raising quotas (Service Quotas).
How it works / steps
- Identify single points of failure and make them redundant across multiple AZs
- Add timeouts and asynchrony so a slow dependency does not stop everything
- Retry with exponential backoff and jitter, and make operations idempotent
- Alarm when approaching Service Quotas limits and raise them in advance
- Remove unhealthy resources automatically with health checks
Workplace example
When an external payment API slows down, timeouts and a circuit breaker keep order intake running, and payments are queued in SQS for later processing.
Common confusions and exam tips
- Retries alone add load during failures (retry storms); backoff is required
- Retrying non-idempotent operations causes duplicate processing
- Quota limits are a common cause of outages
Mini quiz
Q1. Which statement about disaster recovery (DR) drills is incorrect?
- Feed procedural gaps and quota or permission shortfalls found in drills into improvements
- Run drills using methods that do not affect production (such as launching the recovery environment in an isolated network)
- Because drills may affect production, it is best never to run them and only maintain runbooks
- Run drills regularly and measure whether actual RTO and RPO meet targets
Show answer and explanation
Answer: C Because drills may affect production, it is best never to run them and only maintain runbooks
Untested DR procedures often fail in a real disaster. Drill regularly using methods that do not affect production, and verify targets are met.
Q2. Before releasing a new service company-wide, you want to prevent it from stopping by hitting limits during a sudden increase in usage. What is the most appropriate measure?
- Service quotas increase automatically and without limit with usage, so no preparation is needed
- Estimate needed service quotas, request increases in advance and monitor utilization with CloudWatch alarms
- After release, contact AWS Support each time a limit error occurs to have it raised
- Keep users limited to a few departments to avoid hitting limits and postpone the company-wide release indefinitely
Show answer and explanation
Answer: B Estimate needed service quotas, request increases in advance and monitor utilization with CloudWatch alarms
Service quotas have limits, and many can be raised by request. Estimate and raise them in advance, and monitor utilization with Service Quotas and CloudWatch.
Reference links
2.5Design a solution to meet performance objectives
2.5 Design a solution to meet performance objectives.
Concept
Meet performance objectives (latency, throughput) with caching (CloudFront, ElastiCache, DAX, API Gateway caching), database choice (purpose-built DBs), compute choice (instance types, GPUs, Graviton), asynchrony and global placement (edge, multiple Regions). Confirm the objectives with load testing.
How it works / steps
- Define performance objectives numerically (such as p99 latency)
- Choose purpose-built DBs that fit the access patterns
- Cache repeatedly read data
- Make heavy processing asynchronous to speed up responses
- Confirm objectives are met with load testing
Workplace example
To respond to users worldwide within 200 ms at p99, serve static content from CloudFront and API reads from each Region with DynamoDB global tables and DAX.
Common confusions and exam tips
- Look at tail latency such as p99, not just averages
- Caching trades off against consistency (stale data)
- Using purpose-built DBs requires designing data synchronization
Mini quiz
Q1. In an Aurora failover drill, the DB switched in 30 seconds, but app connection errors continued for several minutes. The app cached DNS results for a long time. What is the most appropriate next step?
- Point the app at the reader endpoint
- Use the cluster endpoint with short DNS caching (or use RDS Proxy)
- Fix the app to the primary instance's endpoint
- Review the Aurora failover priority tiers
Show answer and explanation
Answer: B Use the cluster endpoint with short DNS caching (or use RDS Proxy)
On failover, the cluster endpoint's DNS points to the new primary. If the app caches DNS for a long time it keeps using the old target, so shorten the TTL or manage connections with RDS Proxy. [Other options] The reader endpoint is read-only. A fixed instance endpoint points at the old instance after failover. Tiers set failover order and don't fix app DNS caching.
Q2. Which configuration best meets the requirements for this portal?
- Always run environments of the same size in two Regions and write to both databases simultaneously every time
- Build web, app and DB on EC2 yourselves with the same configuration as on-premises, and operate the OS and middleware yourselves
- Configure CloudFront, ALB, ECS on Fargate and Aurora Serverless v2 across multiple AZs
- Put the web server and database together on one large EC2 instance and take EBS snapshots every night
Show answer and explanation
Answer: C Configure CloudFront, ALB, ECS on Fargate and Aurora Serverless v2 across multiple AZs
A managed, serverless-leaning configuration can be operated by two people, with costs that grow and shrink with load. Multiple AZs provide availability. A single instance is a single point of failure, and always-on multi-Region does not fit first-year cost.
Reference links
2.6Determine a cost optimization strategy
2.6 Determine a cost optimization strategy to meet solution goals and objectives.
Concept
In new systems, reduce operating costs by adopting managed and serverless services, and build purchase options (Savings Plans, Spot), storage classes, low-data-transfer architectures and right-sizing into the design stage. Compare cost estimates per requirement so you can explain the trade-offs.
How it works / steps
- Determine the minimum configuration the requirements need
- Reduce operational effort and idle costs with managed and serverless services
- Use Savings Plans for steady parts and Spot for interruptible processing
- Review data transfer paths (NAT, cross-Region)
- Set up tags and budgets from the start
Workplace example
Design an internal request system used only a few times a month as serverless with API Gateway, Lambda and DynamoDB instead of always-on EC2, cutting costs by 90%.
Common confusions and exam tips
- The cheapest configuration does not necessarily meet requirements (availability, performance)
- Serverless can become expensive at very high request volumes; check the break-even point
- Also compare license costs (BYOL vs. license-included)
Mini quiz
Q1. Three months after go-live, Fargate usage has stabilized. What is the most appropriate way to further lower first-year costs?
- Repurchase a 3-year Savings Plan at peak usage, retroactive to the first day of operation
- Use no discounts and fix the CPU and memory allocated to tasks at the minimum values
- Stop using Fargate and rebuild everything to run all tasks on Spot EC2
- Determine the always-used amount from actual usage and purchase Compute Savings Plans for just that amount
Show answer and explanation
Answer: D Determine the always-used amount from actual usage and purchase Compute Savings Plans for just that amount
Committing only to the always-used baseline based on actual usage gives discounts without waste. Compute Savings Plans also apply to Fargate.
Q2. You are designing attack protection for a large website. To prepare for large-scale DDoS attacks, you want 24/7 support from a specialist team and protection against usage charges increased by attacks. Which is the most suitable?
- AWS WAF managed rule groups
- AWS WAF rate-based rules
- AWS Shield Advanced
- CloudFront geographic restrictions
Show answer and explanation
Answer: C AWS Shield Advanced
Shield Advanced is a paid service providing advanced DDoS protection plus support from the Shield Response Team and protection against cost increases caused by attacks.
Reference links
Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.
Notes (unofficial, original questions, no pass guarantee)
- The questions on this site are original practice questions written by this site based on publicly available skills outlines and exam guides. They are not actual exam questions.
- Amazon Web Services, AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. This site is not affiliated with or endorsed by AWS.
- This content is a study aid and does not guarantee a pass. Exam content, format and prerequisites may change without notice; always check the latest information on the official page before taking the exam.
- Your accuracy on the mock exam cannot be converted to the official (scaled) score and does not predict a pass or fail.
- Progress is saved only in this browser (localStorage) unless you sign in with Google to sync it. You can delete it from the Cookie & storage settings page (Japanese).