Sign in
Home/AWS/Professional (SAP-C02)/Free questions

AWS Certified Solutions Architect - Professional (SAP-C02) — Free Practice Questions

10 free sample questions from a bank of 1025, with the correct answers and explanations. No signup required — start practising right now.

1A company needs to architect a hybrid DNS solution. This solution will use an Amazon Route 53 private hosted zone for the domain cloud.example.com for the resources stored within VPCs. The company has the following DNS resolution requirements: On-premises systems should be able to resolve and connect to cloud.example.com. All VPCs should be able to resolve cloud.example.com. There is already an AWS Direct Connect connection between the on-premises corporate network and AWS Transit Gateway. Which architecture should the company use to meet these requirements with the HIGHEST performance?
  • Associate the private hosted zone to all the VPCs. Create a Route 53 inbound resolver in the shared services VPC. Attach all VPCs to the transit gateway and create forwarding rules in the on-premises DNS server for cloud.example.com that point to the inbound resolver.
  • Associate the private hosted zone to all the VPCs. Deploy an Amazon EC2 conditional forwarder in the shared services VPC. Attach all VPCs to the transit gateway and create forwarding rules in the on-premises DNS server for cloud.example.com that point to the conditional forwarder.
  • Associate the private hosted zone to the shared services VPCreate a Route 53 outbound resolver in the shared services VPAttach all VPCs to the transit gateway and create forwarding rules in the on-premises DNS server for cloud.example.com that point to the outbound resolver.
  • Associate the private hosted zone to the shared services VPC. Create a Route 53 inbound resolver in the shared services VPC. Attach the shared services VPC to the transit gateway and create forwarding rules in the on-premises DNS server for cloud.example.com that point to the inbound resolver.
Answer: A

The short version

A — associate zone to all VPCs plus inbound resolver plus transit plus forwarding delivers highest performance. Local association keeps VPC queries fast while inbound serves on premises.

Key concepts in this question

  • Private hosted zone association: attaching cloud dot example dot com to every VPC enables local Route 53 resolution without hairpin.
  • Inbound resolver: Route 53 Resolver endpoint accepting DNS from on premises for private names.
  • Transit Gateway: central hub connecting all VPCs and Direct Connect for consistent routing.
  • Conditional forwarder: EC2 based DNS proxy that adds hops and management versus managed resolver.
  • Outbound direction: resolver for VPC to on premises lookups, wrong direction for on premises to AWS names.

Why A is correct

A is correct because it associates the private hosted zone to all VPCs so every VPC resolves cloud dot example dot com locally, places a Route 53 inbound resolver in shared services for on premises queries, attaches all VPCs to Transit Gateway, and points on premises forwarding for the domain to the inbound IPs. That gives short path resolution on both sides with managed scale. EC2 forwarders add fragility, outbound resolvers reverse direction, and single VPC attachment strands other VPCs.

Why the others are wrong

  • B. Wrong because EC2 conditional forwarder replaces managed inbound with self run hosts, hurting performance and resilience.
  • C. Wrong because outbound resolver serves VPC to on premises, not on premises to private hosted zone.
  • D. Wrong because associating only shared services VPC leaves other VPCs without local private zone resolution.

SAP-C02 exam tip

Hybrid private DNS plus highest performance equals zone to all VPCs plus inbound plus transit plus forward.

2A company is providing weather data over a REST-based API to several customers. The API is hosted by Amazon API Gateway and is integrated with different AWS Lambda functions for each API operation. The company uses Amazon Route 53 for DNS and has created a resource record of weather.example.com. The company stores data for the API in Amazon DynamoDB tables. The company needs a solution that will give the API the ability to fail over to a different AWS Region. Which solution will meet these requirements?
  • Deploy a new set of Lambda functions in a new Region. Update the API Gateway API to use an edge-optimized API endpoint with Lambda functions from both Regions as targets. Convert the DynamoDB tables to global tables.
  • Deploy a new API Gateway API and Lambda functions in another Region. Change the Route 53 DNS record to a multivalue answer. Add both API Gateway APIs to the answer. Enable target health monitoring. Convert the DynamoDB tables to global tables.
  • Deploy a new API Gateway API and Lambda functions in another Region. Change the Route 53 DNS record to a failover record. Enable target health monitoring. Convert the DynamoDB tables to global tables.
  • Deploy a new API Gateway API in a new Region. Change the Lambda functions to global functions. Change the Route 53 DNS record to a multivalue answer. Add both API Gateway APIs to the answer. Enable target health monitoring. Convert the DynamoDB tables to global tables.
Answer: C

The short version

C — second region API plus failover DNS plus global tables enables regional failover. Health checked failover routes to healthy API while data replicates.

Key concepts in this question

  • Failover routing: Route 53 record shifting weather dot example dot com to secondary on primary failure.
  • Health monitoring: target checks that trigger promotion of standby when primary degrades.
  • Global tables: DynamoDB multi region replication keeping API data consistent across regions.
  • Edge optimized hazard: single API with cross region Lambdas does not isolate regional failure cleanly.
  • Multivalue limits: weighted answers spread load rather than enforcing active passive failover.

Why C is correct

C is correct because deploying API Gateway plus Lambda in another region, changing DNS to a failover record with health monitoring, and converting tables to global tables creates a true active passive design. Traffic stays primary until checks fail, then moves to the second API with shared data. Edge plus dual Lambdas blurs failure domains, multivalue balances instead of failing over, and global function wording misstates Lambda scope. Only failover plus global tables meets the stated need.

Why the others are wrong

  • A. Wrong because edge optimized with dual region targets keeps one API fate shared, not clean regional failover.
  • B. Wrong because multivalue answers distribute responses rather than enforcing ordered failover.
  • D. Wrong because Lambda has no global function construct and multivalue still avoids strict failover semantics.

SAP-C02 exam tip

API failover equals second stack plus Route 53 failover plus global tables, not edge or multivalue.

3A company uses AWS Organizations with a single OU named Production to manage multiple accounts. All accounts are members of the Production OU. Administrators use deny list SCPs in the root of the organization to manage access to restricted services. The company recently acquired a new business unit and invited the new unit’s existing AWS account to the organization. Once onboarded, the administrators of the new business unit discovered that they are not able to update existing AWS Config rules to meet the company’s policies. Which option will allow administrators to make changes and continue to enforce the current policies without introducing additional long-term maintenance?
  • Remove the organization’s root SCPs that limit access to AWS Config. Create AWS Service Catalog products for the company’s standard AWS Config rules and deploy them throughout the organization, including the new account.
  • Create a temporary OU named Onboarding for the new account. Apply an SCP to the Onboarding OU to allow AWS Config actions. Move the new account to the Production OU when adjustments to AWS Config are complete.
  • Convert the organization’s root SCPs from deny list SCPs to allow list SCPs to allow the required services only. Temporarily apply an SCP to the organization’s root that allows AWS Config actions for principals only in the new account.
  • Create a temporary OU named Onboarding for the new account. Apply an SCP to the Onboarding OU to allow AWS Config actions. Move the organization’s root SCP to the Production OU. Move the new account to the Production OU when adjustments to AWS Config are complete.
Answer: D

The short version

D — onboarding OU plus moved root SCP isolates new account without long term drag. Temporary scope lets Config adjust while production stays guarded.

Key concepts in this question

  • Deny list SCPs: root attached guards blocking restricted services everywhere including new members.
  • Onboarding OU: temporary container where tailored allowances apply only to the joining account.
  • Production OU: steady state home where standard deny guards belong long term.
  • Config adjustment need: one time updates to rules that root denies currently prevent.
  • Maintenance goal: avoid permanent exceptions or allow list rewrites that burden operations.

Why D is correct

D is correct because creating a temporary Onboarding OU with an allow for Config actions, moving the organization root SCP to Production OU, and returning the account to Production after adjustment lets admins fix rules while preserving enforcement elsewhere. It avoids permanent root edits and avoids rewriting deny to allow list. Temporary OU plus SCP move confines exception in time and scope, satisfying change plus continued policy without lasting maintenance.

Why the others are wrong

  • A. Wrong because removing root Config limits plus Service Catalog rollout is heavy and alters baseline protection.
  • B. Wrong because onboarding allowance alone leaves root deny still blocking, since root applies to all OUs.
  • C. Wrong because converting to allow list plus temporary root exception creates lasting maintenance and broad risk.

SAP-C02 exam tip

New account blocked by root SCP equals temp OU plus move root to Production, then rehome.

4A company is running a two-tier web-based application in an on-premises data center. The application layer consists of a single server running a stateful application. The application connects to a PostgreSQL database running on a separate server. The application’s user base is expected to grow significantly, so the company is migrating the application and database to AWS. The solution will use Amazon Aurora PostgreSQL, Amazon EC2 Auto Scaling, and Elastic Load Balancing. Which solution will provide a consistent user experience that will allow the application and database tiers to scale?
  • Enable Aurora Auto Scaling for Aurora Replicas. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled.
  • Enable Aurora Auto Scaling for Aurora writers. Use an Application Load Balancer with the round robin routing algorithm and sticky sessions enabled.
  • Enable Aurora Auto Scaling for Aurora Replicas. Use an Application Load Balancer with the round robin routing and sticky sessions enabled.
  • Enable Aurora Scaling for Aurora writers. Use a Network Load Balancer with the least outstanding requests routing algorithm and sticky sessions enabled.
Answer: C

The short version

C — Aurora replica autoscaling plus ALB round robin plus sticky keeps stateful users consistent. Read scale plus session affinity preserves experience.

Key concepts in this question

  • Stateful app tier: user context lives on a specific EC2 host, requiring same host return during session.
  • Sticky sessions: ALB cookie binding users to one target while Auto Scaling adjusts capacity.
  • Aurora replica scaling: adding readers for PostgreSQL compatible load while writer stays single.
  • Writer scaling fallacy: writers do not scale out for this workload; replicas absorb reads.
  • NLB versus ALB: network versus application balancing with different routing plus stickiness behavior.

Why C is correct

C is correct because enabling Aurora Auto Scaling for replicas, using an Application Load Balancer with round robin plus sticky sessions, lets app and database tiers scale while preserving consistent user experience. Replicas grow read throughput, ALB spreads new sessions evenly, and stickiness pins stateful users to their server. Writer scaling misstates Aurora topology, while NLB least outstanding requests changes routing without the required HTTP stickiness pairing.

Why the others are wrong

  • A. Wrong because Network Load Balancer with least outstanding requests is not the settled HTTP sticky pairing for this app.
  • B. Wrong because Aurora writer scaling is invalid; scale comes from replicas while writer remains primary.
  • D. Wrong because it pairs invalid writer scaling with NLB routing that misses required ALB stickiness.

SAP-C02 exam tip

Stateful web plus Aurora equals replica scale plus ALB sticky: never scale writers.

5A company uses a service to collect metadata from applications that the company hosts on premises. Consumer devices such as TVs and internet radios access the applications. Many older devices do not support certain HTTP headers and exhibit errors when these headers are present in responses. The company has configured an on-premises load balancer to remove the unsupported headers from responses sent to older devices, which the company identified by the User-Agent headers. The company wants to migrate the service to AWS, adopt serverless technologies, and retain the ability to support the older devices. The company has already migrated the applications into a set of AWS Lambda functions. Which solution will meet these requirements?
  • Create an Amazon CloudFront distribution for the metadata service. Create an Application Load Balancer (ALB). Configure the CloudFront distribution to forward requests to the ALB. Configure the ALB to invoke the correct Lambda function for each type of request. Create a CloudFront function to remove the problematic headers based on the value of the User-Agent header.
  • Create an Amazon API Gateway REST API for the metadata service. Configure API Gateway to invoke the correct Lambda function for each type of request. Modify the default gateway responses to remove the problematic headers based on the value of the User-Agent header.
  • Create an Amazon API Gateway HTTP API for the metadata service. Configure API Gateway to invoke the correct Lambda function for each type of request. Create a response mapping template to remove the problematic headers based on the value of the User-Agent. Associate the response data mapping with the HTTP API.
  • Create an Amazon CloudFront distribution for the metadata service. Create an Application Load Balancer (ALB). Configure the CloudFront distribution to forward requests to the ALB. Configure the ALB to invoke the correct Lambda function for each type of request. Create a Lambda@Edge function that will remove the problematic headers in response to viewer requests based on the value of the User-Agent header.
Answer: A

The short version

A — CloudFront plus ALB to Lambda plus CloudFront function strips headers by User-Agent. Edge compute near viewers fixes old devices serverlessly.

Key concepts in this question

  • Older device constraint: missing header support signaled by User-Agent, requiring per device response shaping.
  • CloudFront function: lightweight edge logic ideal for header removal based on request attributes.
  • ALB to Lambda: target integration invoking correct function per request type after CloudFront.
  • API Gateway limits: default responses and mapping templates lack the settled edge header surgery.
  • Lambda at Edge cost: heavier viewer request functions where simple CloudFront function suffices.

Why A is correct

A is correct because CloudFront distribution fronting an ALB that invokes Lambda, with a CloudFront function removing problematic headers based on User-Agent, retains old device support while staying serverless. Edge function inspects User-Agent and strips unsupported headers before delivery, matching prior on premises load balancer behavior. API paths cannot shape headers the same way, and Lambda at Edge is heavier than needed for this header task.

Why the others are wrong

  • B. Wrong because REST API default responses cannot remove headers conditionally by User-Agent as required.
  • C. Wrong because HTTP API mapping templates do not deliver the settled User-Agent header removal.
  • D. Wrong because Lambda at Edge for viewer requests is heavier than CloudFront function for simple header strip.

SAP-C02 exam tip

Strip headers by User-Agent serverlessly equals CloudFront function, not API mapping or heavy edge.

6A retail company needs to provide a series of data files to another company, which is its business partner. These files are saved in an Amazon S3 bucket under Account A, which belongs to the retail company. The business partner company wants one of its IAM users, User_DataProcessor, to access the files from its own AWS account (Account B). Which combination of steps must the companies take so that User_DataProcessor can access the S3 bucket successfully? (Choose two.)
AWS Certified Solutions Architect - Professional (SAP-C02) question 6AWS Certified Solutions Architect - Professional (SAP-C02) question 6AWS Certified Solutions Architect - Professional (SAP-C02) question 6AWS Certified Solutions Architect - Professional (SAP-C02) question 6
  • Turn on the cross-origin resource sharing (CORS) feature for the S3 bucket in Account A.
  • In Account A, set the S3 bucket policy to the following:
  • In Account A, set the S3 bucket policy to the following:
  • In Account B, set the permissions of User_DataProcessor to the following:
  • In Account B, set the permissions of User_DataProcessor to the following:
Answer: C

The short version

C — bucket policy in Account A must grant the Account B user access to the objects. Cross account S3 needs resource policy plus identity permission.

Key concepts in this question

  • Cross account S3: bucket owner Account A must authorize external principal User_DataProcessor from Account B.
  • Bucket policy: resource based grant naming the external user plus allowed S3 actions on the bucket and keys.
  • CORS scope: browser cross origin sharing, irrelevant to IAM user object reads.
  • Image based policies: option set where only the correct resource plus identity pairing succeeds.
  • Single versus pair: some stems need two steps, but settled key here selects the decisive bucket policy.

Why C is correct

C is correct because Account A bucket policy shown in the settled image grants User_DataProcessor from Account B the S3 permissions needed on the retail bucket. Without that resource grant, identity side permissions alone cannot cross the account boundary. CORS controls browsers, and incorrect policy images either miss the principal or grant wrong actions. The bucket policy is the gate that makes cross account reads succeed.

Why the others are wrong

  • A. Wrong because CORS enables browser sharing, not IAM cross account object access.
  • B. Wrong because its bucket policy image does not grant the correct external principal and actions.
  • D. Wrong because identity policy in Account B alone cannot cross boundary without bucket grant.
  • E. Wrong because its user permission image is not the settled effective grant for the access.

SAP-C02 exam tip

Cross account S3 equals bucket grant plus user allow: bucket side opens, CORS never opens IAM.

7A company is running a traditional web application on Amazon EC2 instances. The company needs to refactor the application as microservices that run on containers. Separate versions of the application exist in two distinct environments: production and testing. Load for the application is variable, but the minimum load and the maximum load are known. A solutions architect needs to design the updated application with a serverless architecture that minimizes operational complexity. Which solution will meet these requirements MOST cost-effectively?
  • Upload the container images to AWS Lambda as functions. Configure a concurrency limit for the associated Lambda functions to handle the expected peak load. Configure two separate Lambda integrations within Amazon API Gateway: one for production and one for testing.
  • Upload the container images to Amazon Elastic Container Registry (Amazon ECR). Configure two auto scaled Amazon Elastic Container Service (Amazon ECS) clusters with the Fargate launch type to handle the expected load. Deploy tasks from the ECR images. Configure two separate Application Load Balancers to direct traffic to the ECS clusters.
  • Upload the container images to Amazon Elastic Container Registry (Amazon ECR). Configure two auto scaled Amazon Elastic Kubernetes Service (Amazon EKS) clusters with the Fargate launch type to handle the expected load. Deploy tasks from the ECR images. Configure two separate Application Load Balancers to direct traffic to the EKS clusters.
  • Upload the container images to AWS Elastic Beanstalk. In Elastic Beanstalk, create separate environments and deployments for production and testing. Configure two separate Application Load Balancers to direct traffic to the Elastic Beanstalk deployments.
Answer: B

The short version

B — ECR plus two Fargate ECS clusters plus two ALBs gives cost effective serverless containers. Autoscaled pay per use compute handles known min max across envs.

Key concepts in this question

  • Serverless containers: Fargate removes EC2 management while scaling tasks to load.
  • ECS versus EKS: ECS has lower control plane overhead than Kubernetes when orchestration needs are modest.
  • Separate envs: production plus testing isolated by cluster and ALB for safety.
  • Known bounds: min plus max load known, fitting autoscaling with right sizing.
  • Lambda container limits: function packaging has execution constraints less suited to full microservices.

Why B is correct

B is correct because uploading images to ECR, running two autoscaled ECS Fargate clusters for prod and test, and fronting with two ALBs minimizes operational complexity while matching variable load cost effectively. Fargate bills per task, autoscaling tracks bounds, and ECS avoids Kubernetes overhead. Lambda containers add invocation limits, EKS adds cluster complexity, and Beanstalk reintroduces server management. The settled least overhead serverless container path is ECS Fargate.

Why the others are wrong

  • A. Wrong because Lambda container functions impose execution model limits unsuited to full microservices.
  • C. Wrong because EKS Fargate adds Kubernetes complexity beyond the needed container orchestration.
  • D. Wrong because Beanstalk manages servers, contrary to serverless minimal operations goal.

SAP-C02 exam tip

Serverless microservices with known bounds equals ECS Fargate: EKS when K8s needed, Lambda not for services.

8A company has a multi-tier web application that runs on a fleet of Amazon EC2 instances behind an Application Load Balancer (ALB). The instances are in an Auto Scaling group. The ALB and the Auto Scaling group are replicated in a backup AWS Region. The minimum value and the maximum value for the Auto Scaling group are set to zero. An Amazon RDS Multi-AZ DB instance stores the application’s data. The DB instance has a read replica in the backup Region. The application presents an endpoint to end users by using an Amazon Route 53 record. The company needs to reduce its RTO to less than 15 minutes by giving the application the ability to automatically fail over to the backup Region. The company does not have a large enough budget for an active-active strategy. What should a solutions architect recommend to meet these requirements?
  • Reconfigure the application’s Route 53 record with a latency-based routing policy that load balances traffic between the two ALBs. Create an AWS Lambda function in the backup Region to promote the read replica and modify the Auto Scaling group values. Create an Amazon CloudWatch alarm that is based on the HTTPCode_Target_5XX_Count metric for the ALB in the primary Region. Configure the CloudWatch alarm to invoke the Lambda function.
  • Create an AWS Lambda function in the backup Region to promote the read replica and modify the Auto Scaling group values. Configure Route 53 with a health check that monitors the web application and sends an Amazon Simple Notification Service (Amazon SNS) notification to the Lambda function when the health check status is unhealthy. Update the application’s Route 53 record with a failover policy that routes traffic to the ALB in the backup Region when a health check failure occurs.
  • Configure the Auto Scaling group in the backup Region to have the same values as the Auto Scaling group in the primary Region. Reconfigure the application’s Route 53 record with a latency-based routing policy that load balances traffic between the two ALBs. Remove the read replica. Replace the read replica with a standalone RDS DB instance. Configure Cross-Region Replication between the RDS DB instances by using snapshots and Amazon S3.
  • Configure an endpoint in AWS Global Accelerator with the two ALBs as equal weighted targets. Create an AWS Lambda function in the backup Region to promote the read replica and modify the Auto Scaling group values. Create an Amazon CloudWatch alarm that is based on the HTTPCode_Target_5XX_Count metric for the ALB in the primary Region. Configure the CloudWatch alarm to invoke the Lambda function.
Answer: B

The short version

B — health checked failover DNS plus Lambda promotion meets sub fifteen minute RTO cheaply. Standby scales to zero until Route 53 flips.

Key concepts in this question

  • Pilot light economy: backup ALB plus ASG at zero plus replica keeps cost low until failover.
  • Failover policy: Route 53 sending users to backup ALB only when primary health fails.
  • Lambda promotion: read replica promotion plus ASG scale out on health failure signal.
  • Latency versus failover: latency splits traffic always on, failover keeps standby idle for budget.
  • Global Accelerator: always on traffic management that exceeds active passive budget.

Why B is correct

B is correct because Lambda in backup to promote the read replica and scale the ASG, driven by Route 53 health checks with SNS, plus a failover record to backup ALB, delivers automatic recovery under fifteen minutes without active active spend. Latency routing would run both sides hot, CloudWatch plus Global Accelerator variants add cost or complexity. The settled economical automation is health check plus SNS plus Lambda plus failover DNS.

Why the others are wrong

  • A. Wrong because latency routing keeps both regions serving, violating active passive budget.
  • C. Wrong because running backup ASG hot plus snapshot replication breaks low cost plus RTO pairing.
  • D. Wrong because Global Accelerator with weighted targets is active leaning and costlier than failover DNS.

SAP-C02 exam tip

Cheap sub fifteen failover equals pilot light plus Route 53 failover plus Lambda promote.

9A company is hosting a critical application on a single Amazon EC2 instance. The application uses an Amazon ElastiCache for Redis single-node cluster for an in-memory data store. The application uses an Amazon RDS for MariaDB DB instance for a relational database. For the application to function, each piece of the infrastructure must be healthy and must be in an active state. A solutions architect needs to improve the application's architecture so that the infrastructure can automatically recover from failure with the least possible downtime. Which combination of steps will meet these requirements? (Choose three.)
  • Use an Elastic Load Balancer to distribute traffic across multiple EC2 instances. Ensure that the EC2 instances are part of an Auto Scaling group that has a minimum capacity of two instances.
  • Use an Elastic Load Balancer to distribute traffic across multiple EC2 instances. Ensure that the EC2 instances are configured in unlimited mode.
  • Modify the DB instance to create a read replica in the same Availability Zone. Promote the read replica to be the primary DB instance in failure scenarios.
  • Modify the DB instance to create a Multi-AZ deployment that extends across two Availability Zones.
  • Create a replication group for the ElastiCache for Redis cluster. Configure the cluster to use an Auto Scaling group that has a minimum capacity of two instances.
  • Create a replication group for the ElastiCache for Redis cluster. Enable Multi-AZ on the cluster.
Answer: A, D, F

The short version

ADF — ELB plus ASG plus Multi-AZ DB plus Redis replication group removes single points. Each tier gains automatic recovery with minimal downtime.

Key concepts in this question

  • EC2 redundancy: load balanced Auto Scaling with min two ensures host failure does not stop app.
  • RDS Multi-AZ: synchronous standby in second zone with automatic failover for MariaDB engine.
  • Redis replication: Multi-AZ replication group with automatic failover for in memory store.
  • Read replica fallacy: same zone replica needs manual promotion, not automatic recovery.
  • Unlimited mode and ASG confusion: CPU credit or compute scaling that does not fix Redis availability.

Why ADF is correct

ADF is correct because A adds ELB across two EC2 instances in Auto Scaling, D converts RDS to Multi-AZ deployment across zones, and F creates ElastiCache replication with Multi-AZ. Together every required piece self heals: compute replaces, database fails over, cache fails over. Same zone replicas need manual steps, unlimited mode addresses bursting, and Redis ASG wording misstates cache scaling. The settled trio covers all three single points.

Why the others are wrong

  • B. Wrong because unlimited mode manages CPU credits, not high availability for EC2.
  • C. Wrong because same zone read replica needs manual promotion, lacking automatic recovery.
  • E. Wrong because Redis with ASG min two misstates cache availability; replication plus Multi-AZ is needed.

SAP-C02 exam tip

Kill every single point: ELB plus ASG for EC2, Multi-AZ for RDS, replication plus Multi-AZ for Redis.

10A retail company is operating its ecommerce application on AWS. The application runs on Amazon EC2 instances behind an Application Load Balancer (ALB). The company uses an Amazon RDS DB instance as the database backend. Amazon CloudFront is configured with one origin that points to the ALB. Static content is cached. Amazon Route 53 is used to host all public zones. After an update of the application, the ALB occasionally returns a 502 status code (Bad Gateway) error. The root cause is malformed HTTP headers that are returned to the ALB. The webpage returns successfully when a solutions architect reloads the webpage immediately after the error occurs. While the company is working on the problem, the solutions architect needs to provide a custom error page instead of the standard ALB error page to visitors. Which combination of steps will meet this requirement with the LEAST amount of operational overhead? (Choose two.)
  • Create an Amazon S3 bucket. Configure the S3 bucket to host a static webpage. Upload the custom error pages to Amazon S3.
  • Create an Amazon CloudWatch alarm to invoke an AWS Lambda function if the ALB health check response Target.FailedHealthChecks is greater than 0. Configure the Lambda function to modify the forwarding rule at the ALB to point to a publicly accessible web server.
  • Modify the existing Amazon Route 53 records by adding health checks. Configure a fallback target if the health check fails. Modify DNS records to point to a publicly accessible webpage.
  • Create an Amazon CloudWatch alarm to invoke an AWS Lambda function if the ALB health check response Elb.InternalError is greater than 0. Configure the Lambda function to modify the forwarding rule at the ALB to point to a public accessible web server.
  • Add a custom error response by configuring a CloudFront custom error page. Modify DNS records to point to a publicly accessible web page.
Answer: A, E

The short version

AE — S3 static page plus CloudFront custom error covers ALB 502 with least ops. Origin errors map to friendly hosted content at edge.

Key concepts in this question

  • Intermittent 502: malformed headers from ALB that resolve on reload, needing temporary user friendly cover.
  • S3 static hosting: durable low ops home for custom error pages.
  • CloudFront custom error: mapping ALB origin errors to S3 page without DNS gymnastics.
  • Lambda plus alarm churn: modifying forwarding rules on metrics adds moving parts and risk.
  • DNS fallback: record changes propagate slowly and add operational weight.

Why AE is correct

AE is correct because creating an S3 bucket hosting the static error page and adding a CloudFront custom error response serves friendly content whenever the ALB origin returns 502, with minimal upkeep. CloudWatch plus Lambda rule rewrites and Route 53 health fallbacks both add automation and propagation complexity for a temporary cover. The settled least overhead pairing is S3 plus CloudFront error mapping.

Why the others are wrong

  • B. Wrong because alarm driven Lambda forwarding rewrites add fragile automation for a static page need.
  • C. Wrong because DNS health fallback is heavy and slow for presenting a custom error page.
  • D. Wrong because internal error alarm plus Lambda rule change is also over engineered versus edge mapping.

SAP-C02 exam tip

Custom error with least ops equals S3 page plus CloudFront custom error, never DNS or Lambda rewrite.

Want the full bank of 1025 questions for AWS Certified Solutions Architect - Professional (SAP-C02)? See all practice exams.