Courseiva

CCNA Continuous Improvement for Existing Solutions Questions

75 of 228 questions · Page 2/4 · Continuous Improvement for Existing Solutions · Answers revealed

76
MCQmedium

A company runs a critical web application on a fleet of Amazon EC2 instances behind an Application Load Balancer (ALB). The operations team notices that during peak traffic, the ALB reports a high number of HTTP 5xx errors, and CloudWatch metrics show that the target group's HealthyHostCount drops significantly. The application logs indicate that the instances are running out of memory and becoming unresponsive. The company wants to improve the reliability of the application with minimal operational overhead. Which solution should a solutions architect recommend?

A.Increase the instance size of the EC2 instances in the Auto Scaling group to a larger memory-optimized instance type.
B.Create a scheduled scaling policy that increases the desired capacity of the Auto Scaling group during known peak hours.
C.Configure an Auto Scaling group with a target tracking scaling policy based on memory utilization, using the CloudWatch agent to publish memory metrics.
D.Enable ELB health checks and set a shorter health check interval so that unhealthy instances are replaced faster.
AnswerC

Publishing memory metrics via the CloudWatch agent and using a target tracking policy on memory utilization allows the Auto Scaling group to add instances when memory pressure rises, directly addressing the root cause of unresponsiveness. This approach is fully managed, requires no custom logic, and scales automatically, meeting the minimal operational overhead requirement.

Why this answer

The application becomes unresponsive due to memory exhaustion under peak load. A target tracking scaling policy based on memory utilization, fed by CloudWatch agent metrics, automatically adjusts capacity to maintain a target memory level. This directly addresses the root cause and is fully managed, requiring minimal operational effort.

Other options either do not scale dynamically or do not react to memory pressure.

Exam trap

The trap here is assuming that a larger instance type or scheduled scaling solves the problem, when the core issue is the lack of dynamic scaling based on the actual resource bottleneck.

77
MCQhard

A company runs a critical database on an RDS for MySQL Multi-AZ DB instance. The database is experiencing high read latency. The application is read-heavy and uses many complex joins. The company needs to improve read performance with minimal application changes. Which solution is MOST appropriate?

A.Migrate the database to Amazon DynamoDB Global Tables.
B.Create one or more RDS read replicas and direct read queries to the replica endpoint.
C.Implement Amazon ElastiCache in front of the database to cache query results.
D.Increase the DB instance class to a larger size with more vCPUs.
AnswerB

Read replicas offload read traffic from the primary via MySQL's asynchronous replication, and the application only needs its read connection string repointed to the replica endpoint. This satisfies the minimal-application-change constraint while relieving the primary of complex join reads.

Why this answer

RDS read replicas offload read traffic from the primary instance by asynchronously replicating data, and the application only needs to change its read connection string to point at the replica endpoint — a minimal-change solution. This directly addresses read-heavy workloads with complex joins because the replica runs the same MySQL engine and can execute the same queries. It also preserves the existing Multi-AZ failover posture for the primary.

Exam trap

SAP-C02 often tests whether candidates over-engineer with caching or NoSQL when a simpler managed feature (read replicas) solves the problem — the trap is picking ElastiCache or DynamoDB because they sound more 'scalable' despite requiring significant application changes.

How to eliminate wrong answers

Option A is wrong because DynamoDB is a NoSQL key-value/document store that does not support complex SQL joins, and migrating would require a full application rewrite — the opposite of 'minimal application changes.' Option C is wrong because ElastiCache caches query results but does not help with complex joins that vary by parameters, and it introduces cache invalidation complexity plus application code changes. Option D is wrong because scaling up the primary instance increases both read and write capacity but does not isolate read traffic — it is more expensive and does not scale reads horizontally, and it still leaves the primary handling all read load.

78
MCQeasy

A company uses AWS CloudFormation to deploy infrastructure. A Solutions Architect needs to update a stack that includes an RDS DB instance. The update requires modifying the DB instance's storage type from gp2 to io1. What change should be made to the CloudFormation template to minimize downtime?

A.Modify the StorageType property in the CloudFormation template and perform a stack update.
B.Add an UpdateReplacePolicy attribute to the RDS resource.
C.Create a new stack with the updated storage type and migrate data.
D.Set the DeletionPolicy to Retain for the RDS resource.
AnswerA

Changing StorageType from gp2 to io1 is a supported modification that can be done without replacement, minimizing downtime.

Why this answer

Modifying the StorageType property of an RDS DB instance (e.g., from gp2 to io1) can be done without replacing the resource. When the CloudFormation stack is updated with this change, AWS performs an in-place modification that typically causes only a brief downtime (a few minutes). This is the standard approach to minimize downtime.

Option B is incorrect because UpdateReplacePolicy is not a valid CloudFormation attribute; the correct attribute is UpdatePolicy, but it does not apply to RDS storage type changes. Option C is incorrect because creating a new stack and migrating data would cause significantly more downtime and effort. Option D is incorrect because DeletionPolicy controls what happens when a resource is deleted from the stack, not during an update.

79
MCQeasy

A startup runs a stateless REST API on a fleet of Amazon EC2 instances in an Auto Scaling group. The API stores session tokens in a local in-memory cache on each instance. During a scaling event, users are randomly logged out because their session token is not present on the new instance that serves their request. The team wants sessions to survive instance replacement and scale-out without changing the API code significantly. Which change should the solutions architect recommend?

A.Increase the Auto Scaling group's minimum capacity so instances are not replaced during traffic spikes.
B.Move session state to an Amazon ElastiCache for Redis cluster and have the API read and write tokens there.
C.Store session tokens in an Amazon S3 bucket and have each instance read the token on every request.
D.Enable sticky sessions on the Application Load Balancer target group so each user is always routed to the same instance.
AnswerB

ElastiCache for Redis provides a shared, highly available session store that all instances can access, so sessions survive instance replacement and scale-out. The API change is limited to replacing the local cache client with a Redis client. This directly removes the dependency on instance-local memory and supports horizontal scaling.

Why this answer

Session state stored in instance memory cannot survive scale-out or instance replacement. Moving tokens to ElastiCache for Redis gives all instances a shared, low-latency store, so any instance can validate a session. The API change is minimal because only the cache client is swapped, and the fleet becomes truly stateless.

Exam trap

The trap here is relying on load balancer stickiness to preserve sessions, when stickiness only pins a user to an instance and does not survive that instance being replaced.

80
MCQmedium

A company uses AWS CloudTrail to log API activity. The compliance team requires that logs be stored for 7 years and be immediately accessible for the first 90 days, after which access can take up to 12 hours. Which storage solution meets these requirements cost-effectively?

A.Store logs in Amazon S3 Standard for 90 days, then transition to Amazon S3 Glacier for the remainder.
B.Store logs in Amazon S3 One Zone-Infrequent Access for 90 days, then delete.
C.Store logs in Amazon S3 Standard for 90 days, then transition to Amazon S3 Glacier Deep Archive.
D.Store logs in Amazon S3 Standard-Infrequent Access for 90 days, then transition to Amazon S3 Standard.
AnswerC

S3 Lifecycle transitions objects from S3 Standard to Glacier Deep Archive after 90 days, satisfying the immediate-access requirement for the first 90 days and the 12-hour retrieval tolerance thereafter. Deep Archive is the cheapest S3 class for 7-year retention, meeting the cost-effectiveness constraint.

Why this answer

S3 Standard provides immediate access for the first 90 days, and then transitioning to S3 Glacier Deep Archive (retrieval time up to 12 hours) meets the 7-year retention requirement at the lowest cost. Option A is wrong: while S3 Glacier can also provide retrieval within 12 hours (via its Bulk retrieval option), S3 Glacier Deep Archive is more cost-effective for long-term archival with comparable retrieval times. Option B is wrong: S3 One Zone-Infrequent Access is not durable enough for compliance (single Availability Zone) and deleting after 90 days does not satisfy the 7-year retention requirement.

Option D is wrong: S3 Standard-Infrequent Access is for infrequent access but transitioning to S3 Standard is more expensive, and the lifecycle policy does not achieve the 7-year retention.

Exam trap

The key trap is confusing the cost and retrieval time trade-offs between S3 Glacier and S3 Glacier Deep Archive. While both can achieve up to 12 hours retrieval (Glacier via Bulk, Deep Archive via Standard retrieval), Deep Archive is significantly cheaper for long-term storage, making it the most cost-effective choice when such retrieval times are acceptable.

81
MCQmedium

A company uses Amazon CloudFront with an S3 origin to serve static content. They recently updated the content in S3, but users still see the old files. What is the MOST likely reason?

A.The CloudFront distribution's cache TTL is too long
B.S3 versioning is enabled and the objects are not updated
C.CloudFront is not configured to forward the Cache-Control header
D.S3 Transfer Acceleration is disabled
AnswerA

CloudFront serves objects from edge locations until the cached object's TTL expires, so an excessively long TTL means updated S3 content is not fetched. This satisfies the stem's scenario: users still receive stale files despite the origin being refreshed.

Why this answer

CloudFront caches objects at edge locations based on the cache TTL. If the TTL is set to a long duration, CloudFront continues to serve the cached old version even after the S3 origin is updated. The most likely reason users see old files is that the cached objects have not expired.

To resolve, you can invalidate the objects or use versioned filenames.

Exam trap

SAP-C02 often tests whether candidates incorrectly blame S3 versioning or missing header forwarding for stale CloudFront content, when the root cause is usually the cache TTL or lack of invalidation.

How to eliminate wrong answers

Option B is wrong because S3 versioning does not prevent CloudFront from serving the latest version; CloudFront fetches the current object version unless a specific version ID is requested. Option C is wrong because CloudFront does not need to forward the Cache-Control header to respect it; it reads the header from the origin response and caches accordingly. Option D is wrong because S3 Transfer Acceleration speeds up uploads to S3, not CloudFront cache updates, and has no effect on stale content.

82
MCQmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores user session data in a self-managed Redis cluster on a single EC2 instance. Users report being logged out intermittently, especially during peak traffic. The company wants to improve the reliability and scalability of session management with minimal application changes. Which solution should a solutions architect recommend?

A.Migrate the session store to Amazon ElastiCache for Redis with cluster mode enabled and Multi-AZ.
B.Configure the application to store session data in Amazon S3 and use S3 Transfer Acceleration.
C.Enable sticky sessions on the ALB and continue using the single Redis instance.
D.Replace the Redis session store with an Amazon DynamoDB table and use DAX for caching.
AnswerA

ElastiCache for Redis with cluster mode and Multi-AZ provides a highly available, scalable session store that can handle peak traffic and automatic failover. It is compatible with Redis, so minimal application changes are needed. This directly addresses the intermittent logouts caused by the single-instance Redis and improves reliability and scalability.

Why this answer

The single Redis instance is a bottleneck and single point of failure, causing intermittent logouts. Migrating to ElastiCache for Redis with cluster mode and Multi-AZ provides a scalable, highly available session store that is compatible with Redis, requiring minimal application changes. Sticky sessions or alternative stores either don't fix the root cause or demand significant rework.

Exam trap

The trap here is thinking that sticky sessions or a different database will solve session reliability, but the core issue is the single Redis instance's lack of high availability and scalability.

83
MCQhard

A startup runs a containerized microservices application on Amazon ECS with Fargate. They use an Application Load Balancer to distribute traffic. The application consists of 10 services, each with its own ECS service. Recently, the startup launched a marketing campaign and traffic increased 10x. The application started returning HTTP 503 errors. The ECS service metrics show that the number of running tasks is at the maximum desired count for each service. The ALB target group health checks are failing intermittently. The startup needs to handle the increased traffic and prevent 503 errors. What should they do?

A.Increase the desired count and maximum number of tasks for each ECS service.
B.Increase the CPU and memory limits for each task definition.
C.Decrease the health check interval to detect failures faster.
D.Add additional Application Load Balancers and split traffic across them.
AnswerA

Running tasks sit at the maximum desired count, so ECS cannot scale further; raising both desired count and maximum task limit lets the service launch additional Fargate tasks behind the ALB, absorbing the 10x traffic and clearing the 503 errors.

Why this answer

The ECS services are already at their maximum desired count, so the Auto Scaling group cannot add more tasks even though demand has increased 10x. Raising both the desired count and the maximum number of tasks per service allows ECS to scale out further, relieving the overload that causes intermittent health check failures and 503s. This directly addresses the capacity ceiling.

Exam trap

SAP-C02 often tests the misconception that increasing task resources (CPU/memory) or adding load balancers solves a capacity problem, when the real ceiling is the ECS service's maximum desired task count.

How to eliminate wrong answers

Option B is wrong because increasing CPU/memory limits per task does not add capacity if the task count is capped at maximum; it may even reduce the number of tasks that fit on available Fargate capacity. Option C is wrong because shortening health check intervals only detects failures faster and can increase false positives; it does not add capacity to handle the traffic. Option D is wrong because adding more ALBs does not help when the backend ECS services are already maxed out; the bottleneck is task capacity, not load balancer throughput.

84
Multi-Selectmedium

A company wants to reduce costs for a batch processing workload that runs nightly on Amazon EMR. The workload is fault-tolerant and can handle interruptions. Which TWO strategies should they implement? (Choose TWO.)

Select 2 answers
A.Use On-Demand Instances for all nodes.
B.Right-size the cluster by analyzing resource utilization metrics.
C.Purchase Reserved Instances for the cluster.
D.Use Dedicated Instances to improve performance.
E.Use Spot Instances for task nodes.
AnswersB, E

Right-sizing analyses CloudWatch metrics such as CPU, memory and HDFS utilisation to select appropriate instance types and task-node counts, eliminating over-provisioned capacity. Since the workload is fault-tolerant, smaller correctly sized clusters cut nightly EMR costs without affecting completion.

Why this answer

Option B is correct because right-sizing the cluster based on CloudWatch resource utilization metrics (such as CPU, memory, and disk I/O) eliminates over-provisioned nodes, directly lowering EMR costs for a nightly batch workload. Option E is correct because Spot Instances can be used for task nodes in EMR, and since the workload is fault-tolerant and interruption-tolerant, the steep Spot discounts (up to ~90% off On-Demand) reduce costs substantially without risking data loss on core/HDFS nodes. Option A is wrong because On-Demand Instances for all nodes is the most expensive purchasing model and ignores the workload's tolerance for interruption.

Option C is wrong because Reserved Instances require a 1- or 3-year commitment and are better suited to steady-state, predictable usage rather than a nightly batch job that may not run continuously. Option D is wrong because Dedicated Instances address tenancy/compliance requirements and typically cost more; they do not improve performance or reduce cost for this scenario.

Exam trap

SAP-C02 often tests the misconception that Reserved Instances are always cost-saving, but for intermittent workloads like nightly batch, Spot Instances and right-sizing are more effective; candidates may overlook that task nodes are fault-tolerant.

85
MCQmedium

A company has a multi-tier application running on AWS. The web tier uses an Application Load Balancer (ALB) with an Auto Scaling group of EC2 instances. The application tier runs on a separate Auto Scaling group of EC2 instances. The database tier uses Amazon RDS for MySQL. During a recent load test, the application became unresponsive. Monitoring showed that the database's CPU utilization was at 100% and the number of database connections was at the maximum limit. The application tier instances were healthy, but the web tier instances were returning 503 errors. The Solutions Architect determined that the application tier was making too many database connections because each request opened a new connection and did not close it properly. The team wants to fix the issue with minimal changes to the application code. Which solution should the Solutions Architect recommend?

A.Migrate the database from RDS MySQL to Amazon Aurora MySQL with read replicas.
B.Increase the max_connections parameter in the RDS parameter group to allow more connections.
C.Scale the application tier horizontally by increasing the desired capacity of the Auto Scaling group.
D.Configure Amazon RDS Proxy to pool database connections from the application tier.
AnswerD

RDS Proxy maintains a pool of established connections to the MySQL database and multiplexes application requests across them, capping total connections below the instance limit. This resolves the connection exhaustion causing 100% CPU and 503 errors, requiring only an endpoint change rather than code rewrites.

Why this answer

Amazon RDS Proxy provides connection pooling, allowing the application to reuse existing connections rather than opening new ones. This reduces the number of simultaneous connections to the database, alleviating CPU and connection limit pressure. It requires minimal code changes.

Option A is incorrect because migrating to Aurora does not address the connection management problem; it may still require RDS Proxy. Option B is incorrect because increasing max_connections does not fix the root cause of unclosed connections and can lead to resource contention. Option C is incorrect because scaling the application tier horizontally would increase the number of connections, worsening the issue.

86
MCQmedium

A company is using AWS CodePipeline to automate deployments. They want to add a manual approval step before deploying to production. How should they configure this?

A.Add a manual approval action in the pipeline stage with an SNS topic for notification.
B.Use Amazon CloudWatch Events to trigger an SNS topic for approval.
C.Create a custom action using AWS CodeDeploy.
D.Add a Lambda function that sends an email and pauses the pipeline until a token is provided.
AnswerA

A manual approval action pauses the pipeline stage until a nominated person approves, and attaching an SNS topic notifies approvers when action is required. This satisfies the stem's need to gate production deployment behind human authorisation within CodePipeline.

Why this answer

AWS CodePipeline provides a built-in manual approval action that can be added to a pipeline stage, which sends an SNS notification to approvers. Option B is incorrect because CloudWatch Events is used for event-driven automation, not for manual approvals. Option C is incorrect because AWS CodeDeploy is a deployment service, not for approval steps.

Option D is incorrect because while a Lambda function could be used, CodePipeline has a native approval action that is simpler and more appropriate.

87
MCQhard

A company runs a production application on Amazon ECS with Fargate launch type. The application uses an Application Load Balancer (ALB) to distribute traffic to tasks. The company has configured an Auto Scaling target tracking policy based on average CPU utilization. During a marketing campaign, traffic spikes cause the ALB to return 503 errors. The ECS service dashboard shows that the number of tasks scaled out to the maximum allowed but the CPU utilization remained high. What is the MOST likely cause of the 503 errors?

A.The ECS service scaled out to the maximum number of tasks, but the new tasks are not yet registered as healthy with the ALB, or the existing tasks are overwhelmed.
B.The target tracking scaling policy takes too long to trigger, and the service cannot scale quickly enough.
C.The Fargate tasks have exhausted their elastic network interface (ENI) limits.
D.The ALB connection limit has been exceeded due to the traffic spike.
AnswerA

Scaling out does not instantly add capacity: new Fargate tasks need time to pass ALB health checks and register, so the ALB returns 503 while existing tasks stay saturated. CPU remained high because demand exceeded the maximum task count.

Why this answer

The most likely cause is that the ECS service scaled out to the maximum number of tasks, but the new tasks are not yet registered as healthy with the ALB, or the existing tasks are overwhelmed. During a traffic spike, even if tasks scale out, there is a delay before they become healthy and can serve traffic. Meanwhile, the existing tasks may be overloaded, leading to 503 errors from the ALB.

Exam trap

SAP-C02 often tests the misconception that scaling out immediately resolves traffic spikes; candidates might overlook the delay in task registration and health checks, leading to 503 errors.

How to eliminate wrong answers

Option B is wrong because although scaling policies can have delays, the scenario states that tasks scaled out to the maximum, so the issue is not the scaling trigger but the readiness of new tasks or capacity of existing ones. Option C is wrong because Fargate tasks do not have ENI limits that would cause 503 errors; ENI limits are per task and are not typically exhausted in this manner. Option D is wrong because ALB connection limits are high and not the likely cause; 503 errors from ALB usually indicate no healthy targets.

88
MCQmedium

A company operates a web application on Amazon EC2 instances behind an Application Load Balancer. The application stores session state in a self-managed Redis cluster on EC2. During a recent marketing campaign, the Redis cluster became a bottleneck, causing session timeouts and poor user experience. The company wants to improve the solution's scalability and resilience with minimal operational overhead. Which solution should a solutions architect recommend?

A.Replace the self-managed Redis cluster with an Amazon DynamoDB table using on-demand capacity mode and DAX.
B.Migrate the session store to Amazon ElastiCache for Redis with cluster mode enabled and automatic failover.
C.Configure the EC2 instances to store session state in Amazon S3 with Transfer Acceleration enabled.
D.Enable sticky sessions on the Application Load Balancer and store session state in instance memory.
AnswerB

ElastiCache for Redis with cluster mode enabled provides horizontal scaling, automatic sharding, and failover, directly addressing the bottleneck and resilience needs. It is a fully managed service, reducing operational overhead compared to self-managed Redis on EC2. The application can continue using the Redis protocol with minimal code changes, and the solution scales read/write capacity as demand grows.

Why this answer

Migrating to Amazon ElastiCache for Redis with cluster mode enabled provides a managed, scalable, and highly available session store. It eliminates the operational burden of self-managed Redis while offering automatic sharding and failover. This directly resolves the bottleneck and improves resilience.

Other options either require significant application changes, introduce latency, or do not address scalability.

Exam trap

The trap here is assuming that any managed database service will automatically reduce operational overhead without considering application compatibility and specific workload characteristics.

89
Multi-Selectmedium

A company is deploying a web application that uses an Application Load Balancer and an Auto Scaling group of EC2 instances. The application must be able to handle sudden spikes in traffic. Which TWO actions should the Solutions Architect take to improve scalability and reduce latency? (Choose two.)

Select 2 answers
A.Enable HTTP/2 on the Application Load Balancer.
B.Increase the default cooldown period for the Auto Scaling group.
C.Use larger EC2 instance types for the Auto Scaling group.
D.Configure the Auto Scaling group to use a predictive scaling policy.
E.Increase the health check interval on the Application Load Balancer.
AnswersA, D

HTTP/2 multiplexes many requests over a single TCP connection, cutting head-of-line blocking and connection overhead during sudden traffic spikes. This directly reduces latency for the web application behind the Application Load Balancer, satisfying the stem's requirement to handle bursts efficiently without adding capacity.

Why this answer

Option A is correct because enabling HTTP/2 on the Application Load Balancer allows multiplexed, concurrent requests over a single TCP connection and header compression, which reduces latency and improves throughput during traffic spikes. Option D is correct because a predictive scaling policy in the Auto Scaling group uses machine learning to forecast demand and pre-provision capacity ahead of anticipated spikes, improving responsiveness and reducing latency compared to reactive scaling alone. Option B is incorrect because increasing the default cooldown period delays subsequent scaling actions, making the group slower to react to sudden traffic increases.

Option C is incorrect because simply using larger instance types does not improve elasticity or latency during spikes and can reduce the granularity of scaling. Option E is incorrect because increasing the health check interval slows detection of unhealthy targets and does not improve scalability or latency.

90
Multi-Selecteasy

A company is using an AWS Lambda function to process records from an Amazon Kinesis stream. The function stores results in an Amazon DynamoDB table. The team notices that the Lambda function sometimes fails due to throttling from DynamoDB. Which TWO actions should the team take to improve the continuous processing of records? (Choose TWO.)

Select 2 answers
A.Increase the number of shards in the Kinesis stream to reduce data per Lambda invocation.
B.Configure reserved concurrency for the Lambda function to limit its maximum concurrency.
C.Increase the concurrency limit for the Lambda function to allow more parallel executions.
D.Switch the DynamoDB table to on-demand capacity mode.
E.Enable DynamoDB auto scaling for the table to adjust read/write capacity automatically.
AnswersD, E

On-demand mode eliminates throttling by scaling automatically.

Why this answer

Switching the DynamoDB table to on-demand capacity mode eliminates the need to provision read/write capacity, allowing the table to automatically scale to handle any throttling caused by sudden spikes in Lambda writes. This directly addresses the throttling issue without requiring manual capacity management.

Exam trap

The trap here is that candidates often choose to increase Lambda concurrency or shards, thinking more parallelism will improve processing, but they fail to recognize that the bottleneck is DynamoDB capacity, and increasing Lambda concurrency only worsens the throttling.

91
MCQmedium

A company runs a critical application on Amazon RDS for PostgreSQL. The database performance has degraded over time. The Solutions Architect notices that read queries are slow and the DB instance's ReadIOPS metric is consistently high. Which action would improve read performance with minimal operational overhead?

A.Increase the allocated storage of the DB instance.
B.Enable Multi-AZ deployment for the DB instance.
C.Migrate the database to Amazon Aurora with PostgreSQL compatibility.
D.Create an RDS read replica and redirect read queries to it.
AnswerD

A read replica offloads read queries to a separate DB instance, relieving the primary's consistently high ReadIOPS. RDS replicates asynchronously with no application rewrite, satisfying the minimal-operational-overhead constraint while directly improving read performance for PostgreSQL.

Why this answer

Creating an RDS read replica (Option D) offloads read traffic from the primary instance, reducing ReadIOPS and improving read query performance. This requires minimal operational overhead because Amazon RDS manages the replica. Option A is incorrect: increasing storage can help with IOPS limits but does not directly reduce read load.

Option B is incorrect: Multi-AZ provides high availability, not read scalability. Option C is incorrect: migrating to Aurora involves more effort and is not the simplest solution.

92
Multi-Selectmedium

A company runs a production AWS environment with Amazon EC2 instances managed by Auto Scaling groups. The operations team notices that after a recent deployment, the application is returning higher error rates. Which TWO steps should the team take to enable a quick rollback and improve future deployments?

Select 2 answers
A.Configure Auto Scaling lifecycle hooks to automatically terminate new instances if health checks fail.
B.Implement canary deployments using AWS CodeDeploy to shift traffic gradually and monitor error rates.
C.Use AWS CloudFormation change sets to automatically roll back failed deployments.
D.Use AWS Elastic Beanstalk to perform a blue/green deployment, swapping the environment URL after testing.
E.Enable AWS CloudTrail to track deployment API calls and automatically revert if errors exceed a threshold.
AnswersB, D

CodeDeploy canary shifts a small percentage of traffic to the new revision first, then promotes it only if error rates stay acceptable. This directly satisfies the gradual-shift and monitoring requirement, and rollback is a redeployment of the last known-good revision.

Why this answer

Option B is correct because AWS CodeDeploy canary deployments shift a small percentage of traffic to the new version first, letting the team monitor error rates and abort or roll back the deployment before all instances are affected. Option D is correct because Elastic Beanstalk blue/green deployments create a separate environment with the new version, and the environment URL (CNAME swap) is only switched after testing, so a failed deployment can be reverted by swapping back to the original environment. Option A is not correct because lifecycle hooks only pause instance launch/termination for custom actions and do not provide application-level rollback of a bad deployment.

Option C is not correct because CloudFormation change sets preview infrastructure changes and do not automatically roll back application deployments based on error rates. Option E is not correct because CloudTrail only records API activity for auditing; it does not automatically revert deployments when error thresholds are exceeded.

Exam trap

SAP-C02 often tests whether candidates can distinguish deployment strategies (canary, blue/green) from monitoring/auditing services (CloudTrail) and infrastructure tools (CloudFormation change sets), which do not provide automatic application rollback.

93
MCQhard

Refer to the exhibit. A CloudFormation template is used to create an S3 bucket with versioning enabled and a DeletionPolicy of Retain. The stack is deleted. What happens to the bucket and its objects?

A.The bucket and all its objects are deleted
B.The bucket and its objects are retained
C.The bucket is deleted only if it is empty
D.The bucket is deleted, but versioning information is retained
AnswerB

DeletionPolicy: Retain overrides CloudFormation's default delete behaviour, so the S3 bucket survives stack deletion along with every versioned object inside it. Versioning is irrelevant here; the retention guarantee comes solely from the DeletionPolicy attribute, satisfying the stem's requirement that both bucket and objects persist.

Why this answer

When a CloudFormation stack is deleted, the resource with DeletionPolicy set to Retain is preserved. Since the S3 bucket has DeletionPolicy: Retain, the bucket and all its objects (including versioned objects) are retained. Option A is incorrect because the bucket is not deleted.

Option C is incorrect because DeletionPolicy overrides stack deletion behavior regardless of contents. Option D is incorrect because versioning information is also retained along with the bucket.

94
MCQeasy

A company is using Amazon CloudFront to deliver static content from an S3 bucket. The company wants to ensure that users can only access content through CloudFront and not directly from the S3 bucket. What should the company do?

A.Use CloudFront Origin Access Control (OAC) and update the bucket policy to only allow access from the CloudFront distribution.
B.Set S3 Object Ownership to BucketOwnerPreferred.
C.Configure the S3 bucket policy to allow public read access.
D.Generate CloudFront key pairs and require signed URLs for all content.
AnswerA

Origin Access Control signs CloudFront requests to S3 and pairs with a bucket policy permitting only that distribution, blocking direct S3 URLs. This satisfies the requirement that content be reachable solely through CloudFront, replacing the older, less secure origin access identity approach.

Why this answer

CloudFront Origin Access Control (OAC) is the current AWS-recommended mechanism to restrict S3 bucket access to a specific CloudFront distribution. By creating an OAC, associating it with the distribution's origin, and updating the S3 bucket policy to allow only that OAC's service principal, direct access to the S3 bucket is blocked while CloudFront can still fetch objects.

Exam trap

SAP-C02 often tests whether candidates confuse signed URLs (which control end-user access to CloudFront) with OAC (which controls CloudFront's access to S3) — the requirement to block direct S3 access specifically demands OAC plus a restrictive bucket policy.

How to eliminate wrong answers

Option B is wrong because S3 Object Ownership (BucketOwnerPreferred) only affects ownership of objects uploaded by other accounts; it has no bearing on restricting access to CloudFront. Option C is wrong because allowing public read access on the S3 bucket does the opposite of the requirement — it would let users bypass CloudFront and access objects directly. Option D is wrong because CloudFront signed URLs control who can access content through CloudFront, but they do not prevent direct access to the S3 bucket if the bucket itself is publicly accessible or has permissive policies.

95
MCQmedium

A company runs a high-traffic web application on an EC2 Auto Scaling group behind an Application Load Balancer. The operations team notices that during sudden traffic spikes, new instances take several minutes to become healthy and serve traffic, causing elevated latency. The team wants to reduce the time from instance launch to serving traffic. Which change should a solutions architect recommend?

A.Increase the size of the Auto Scaling group's maximum capacity so more instances can launch simultaneously.
B.Attach an additional target group to the load balancer and register the same instances in both target groups.
C.Create a launch template that specifies a pre-baked Amazon Machine Image (AMI) with the application fully installed and configured, and use it in the Auto Scaling group.
D.Change the Auto Scaling group health check type from EC2 to ELB and reduce the health check grace period to zero.
AnswerC

A pre-baked AMI eliminates the need to install and configure the application at boot, so new instances reach a healthy state much faster. This directly addresses the slow scale-out during traffic spikes and is a standard pattern for reducing launch-to-serve time in Auto Scaling groups.

Why this answer

Using a pre-baked AMI removes the time-consuming installation and configuration steps that occur at instance launch. The application is already present and configured, so the instance can pass health checks and serve traffic much sooner. Other options do not address the underlying bootstrapping delay and may even introduce new problems.

Exam trap

The trap here is assuming that scaling out more aggressively or adjusting health check settings will fix slow instance initialization, when the real issue is the time spent installing and configuring the application at boot.

96
Multi-Selecthard

A company has a serverless application using AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. The application experiences occasional timeouts during peak hours. After reviewing AWS X-Ray traces, the team finds that DynamoDB queries are slow. Which THREE actions should the team take to improve performance and continuously optimize the solution?

Select 3 answers
A.Optimize DynamoDB queries by using global secondary indexes and reducing the number of separate queries.
B.Configure DynamoDB auto scaling to adjust read and write capacity based on demand.
C.Use Amazon ElastiCache for Redis to cache DynamoDB query results.
D.Implement Lambda function warmers to keep containers initialized and reduce cold starts.
E.Enable Amazon DynamoDB Accelerator (DAX) for read-heavy workloads.
AnswersA, B, E

Optimize DynamoDB queries by using global secondary indexes and reducing the number of separate queries. This reduces query latency and the number of round trips.

Why this answer

Option A is correct because DynamoDB slowness is often caused by inefficient access patterns such as Scan operations or multiple sequential queries; using global secondary indexes (GSIs) allows efficient Query operations against alternate partition/sort keys, and consolidating separate queries reduces cumulative latency and consumed read capacity. Option B is correct because DynamoDB auto scaling adjusts provisioned read/write capacity automatically in response to traffic patterns, preventing throttling and ProvisionedThroughputExceededException during peak hours, which directly addresses the timeout symptom. Option E is correct because DynamoDB Accelerator (DAX) is an in-memory write-through cache purpose-built for DynamoDB that delivers microsecond read latency for read-heavy workloads, offloading repeated reads from the table and reducing query response times.

Option C is not the best fit because ElastiCache for Redis requires custom cache-invalidation logic and adds architectural complexity, whereas DAX is the native DynamoDB caching solution. Option D does not belong because Lambda cold starts affect function initialization latency, not DynamoDB query execution time identified in the X-Ray traces.

Exam trap

SAP-C02 often tests whether candidates confuse Lambda cold-start mitigation with DynamoDB read latency, or pick ElastiCache over DAX when the workload is specifically DynamoDB read-heavy.

97
Multi-Selectmedium

A company has a web application running on Amazon EC2 instances in an Auto Scaling group. The application writes logs to local instance storage. The operations team wants to centralize log analysis and enable near-real-time monitoring for errors. They also want to archive logs for long-term compliance. The logs are generated continuously and can be large in volume. Which two actions should a solutions architect take to meet these requirements? (Choose two.)

Select 2 answers
A.Use AWS CloudTrail to capture log data from the instances and store it in an S3 bucket.
B.Enable detailed monitoring on the EC2 instances to capture application logs and store them in CloudWatch Logs.
C.Configure the CloudWatch agent to also send logs to Amazon S3 for long-term archival.
D.Create a CloudWatch Logs subscription filter to stream logs to Amazon Kinesis Data Firehose, which delivers them to Amazon S3 for archival.
E.Install and configure the Amazon CloudWatch agent on each instance to send logs to CloudWatch Logs.
AnswersD, E

CloudWatch Logs subscription filters can stream log events to Kinesis Data Firehose, which can then deliver them to Amazon S3 for durable, long-term storage. This provides a scalable and reliable archival solution. It complements the near-real-time monitoring in CloudWatch Logs and meets the compliance requirement for log retention in S3.

Why this answer

To centralize and monitor logs in near-real-time, the CloudWatch agent should be installed to send logs to CloudWatch Logs. For long-term archival, a subscription filter can stream logs to Kinesis Data Firehose, which delivers to S3. CloudTrail and detailed monitoring do not capture application logs, and the CloudWatch agent does not send logs directly to S3.

Exam trap

The trap here is assuming that CloudTrail or detailed monitoring can capture application logs, or that the CloudWatch agent can send logs directly to S3, when in fact CloudWatch Logs is the central service for log ingestion and S3 archival requires an additional streaming mechanism.

98
MCQhard

A company runs a stateful web application on a single Amazon EC2 instance with an attached Amazon EBS volume. The application stores session data locally on the instance's root volume. The company wants to make the application highly available across multiple Availability Zones with minimal application changes. The application must continue to function if an Availability Zone fails. Which solution should a solutions architect recommend?

A.Create an Auto Scaling group that spans multiple Availability Zones, and configure the application to replicate session data across instances using a peer-to-peer protocol.
B.Create an Auto Scaling group that spans multiple Availability Zones, and configure the application to store session data in an Amazon ElastiCache for Redis cluster with Multi-AZ enabled.
C.Create an Auto Scaling group that spans multiple Availability Zones, and store session data on an Amazon EFS file system mounted to all instances.
D.Create an Auto Scaling group that spans multiple Availability Zones, and configure the application to use sticky sessions on the Application Load Balancer.
AnswerB

Moving session state to ElastiCache for Redis with Multi-AZ provides a highly available, shared session store that survives AZ failures. The Auto Scaling group can then launch instances across multiple AZs, and any instance can handle requests because session data is externalized. This requires minimal application changes—only the session store configuration needs updating—and achieves high availability.

Why this answer

To achieve high availability across AZs with minimal changes, session state must be externalized to a highly available store. ElastiCache for Redis with Multi-AZ automatically replicates data and provides failover, so sessions survive AZ failures. The Auto Scaling group can then distribute instances across AZs.

Other options either do not externalize state, add complexity, or use unsuitable storage for session data.

Exam trap

The trap here is assuming that sticky sessions or shared file storage can provide high availability without modifying the application, when they either lose state on failure or introduce performance and complexity issues.

99
MCQmedium

A company runs a production web application on EC2 instances in an Auto Scaling group behind an ALB. The application logs are stored on an EBS volume attached to each instance. The operations team notices that the logs are not being sent to a central location. What is the MOST efficient way to centralize log collection with minimal code changes?

A.Modify the application to use the AWS SDK to send logs to CloudWatch Logs via PutLogEvents API.
B.Use Amazon Kinesis Agent to send logs to Kinesis Data Firehose and then to S3.
C.Set up an S3 bucket with a lifecycle policy to transition logs to Glacier.
D.Install the CloudWatch Logs agent on each EC2 instance and configure it to stream the log files to CloudWatch Logs.
AnswerD

The CloudWatch Logs agent runs on each instance and tails the existing log files on the EBS volume, streaming them to CloudWatch Logs. This centralises collection without application code changes, unlike custom logging or instance-store approaches.

Why this answer

The CloudWatch Logs agent can be installed on each EC2 instance and configured to stream log files from the EBS volume to CloudWatch Logs without modifying application code. This centralizes logs efficiently and is the standard AWS approach for EC2 log collection. It requires only agent installation and configuration, meeting the minimal-code-change requirement.

Exam trap

SAP-C02 often tests 'minimal code changes' vs 'centralized logging': candidates pick SDK modification or Kinesis pipelines, overlooking that the CloudWatch Logs agent is the lowest-effort, agent-based solution for EC2 log centralization.

How to eliminate wrong answers

Option A is wrong because modifying the application to use the AWS SDK requires code changes and redeployment, which is not minimal effort. Option B is wrong because Kinesis Agent to Firehose to S3 adds complexity and is better suited for streaming data pipelines, not simple log centralization. Option C is wrong because an S3 bucket with lifecycle policies does not collect logs from EC2 instances; it only manages objects already in S3.

100
MCQmedium

A company runs a monolithic application on a single EC2 instance. The application is critical and must be highly available. The company wants to migrate to a containerized architecture on Amazon ECS with minimal downtime. Which approach should the company take?

A.Launch a new ECS cluster with the containerized application and use Route 53 weighted routing to shift traffic.
B.Deploy the monolith as a single task in ECS and update the task definition with new container versions.
C.Use AWS CodeStar to automatically deploy the application to ECS with blue/green deployments.
D.Use an Application Load Balancer with blue/green deployment using AWS CodeDeploy and ECS.
AnswerD

An Application Load Balancer with blue/green deployment via CodeDeploy shifts traffic between two ECS task sets, satisfying the minimal-downtime constraint. New tasks reach healthy status before the ALB reroutes production traffic, and instant rollback is possible if verification fails. This avoids the outage inherent in stopping the monolith before starting containers.

Why this answer

Option D is correct because using an Application Load Balancer (ALB) with blue/green deployment via AWS CodeDeploy and ECS allows you to shift traffic gradually from the old (blue) environment to the new (green) environment with minimal downtime. CodeDeploy orchestrates the deployment, and the ALB routes traffic to the appropriate target group. This approach provides high availability and rollback capability.

Exam trap

SAP-C02 often tests the misconception that Route 53 weighted routing or simple task definition updates provide blue/green deployments; candidates must recognize that CodeDeploy with ALB and ECS is the AWS-recommended approach for minimal-downtime container deployments.

How to eliminate wrong answers

Option A is wrong because Route 53 weighted routing can shift traffic, but it operates at the DNS level and does not provide the fine-grained control or health checks needed for containerized blue/green deployments; it also may not achieve minimal downtime due to DNS caching. Option B is wrong because deploying the monolith as a single task in ECS and updating the task definition does not provide a blue/green deployment; it would cause downtime during the update unless you have multiple tasks and a load balancer, but the option does not mention that. Option C is wrong because AWS CodeStar is a development service that provides templates and CI/CD pipelines, but it does not inherently provide blue/green deployments for ECS; you would still need CodeDeploy and an ALB.

101
MCQmedium

A company uses AWS CloudFormation to deploy infrastructure. The operations team notices that stack updates frequently fail because of updates to resources that are not supported for updates. What is the BEST way to handle this?

A.Use AWS Config rules to prevent updates.
B.Delete the stack and create a new one for each update.
C.Use AWS Service Catalog to enforce version control.
D.Use a change set to review the proposed changes before executing the update.
AnswerD

Change sets preview exactly which resources CloudFormation will replace, modify or leave untouched, exposing unsupported-update resources before execution. Reviewing this plan lets the operations team detect and correct problematic resource definitions ahead of the update, directly preventing the frequent stack-update failures described in the stem.

Why this answer

The best practice is to use a change set to preview changes and identify unsupported updates before executing the update.

102
MCQmedium

A company uses Amazon RDS for MySQL with Multi-AZ deployment. The database experiences occasional read replica lag of up to 5 seconds. The application requires read-after-write consistency. Which action should the company take to improve the solution?

A.Modify the application to always read from the primary instance.
B.Increase the number of read replicas to distribute the load.
C.Implement Amazon ElastiCache to cache read results.
D.Use Amazon RDS Proxy to route read queries to the read replica.
AnswerA

Read replicas are asynchronously updated, so lag of up to 5 seconds can return stale data. Directing all reads to the primary instance guarantees read-after-write consistency, because the primary always reflects the committed write, eliminating replica lag exposure.

Why this answer

Reading from the primary instance ensures read-after-write consistency. Since the application requires strong consistency, all reads must be directed to the primary, as read replicas may have lag. Option B is incorrect because increasing the number of read replicas does not reduce replication lag.

Option C is incorrect because Amazon ElastiCache is a caching layer, not a solution for consistency. Option D is incorrect because Amazon RDS Proxy helps manage connections but does not eliminate read replica lag.

103
MCQmedium

A company has an existing web application that stores user-uploaded images in an Amazon S3 bucket. The bucket has S3 Standard storage and versioning enabled. Over time, storage costs have increased because many old object versions are never accessed after 30 days, but they must be retained for 1 year for compliance. The security team requires that no object version be permanently deleted before 365 days. Which solution is the MOST cost-effective while meeting the compliance requirement?

A.Enable S3 Intelligent-Tiering on the bucket and rely on it to move noncurrent versions to the archive access tier.
B.Disable versioning on the bucket and use S3 Standard-Infrequent Access for all objects after 30 days.
C.Create an S3 Lifecycle policy that transitions noncurrent versions to S3 Glacier Deep Archive after 30 days and expires them after 365 days.
D.Configure a bucket policy that denies s3:DeleteObjectVersion unless the object is older than 365 days, and manually delete older versions.
AnswerC

Noncurrent version transition to Glacier Deep Archive after 30 days moves rarely accessed old versions to the lowest-cost storage class, and expiration at 365 days satisfies the retention requirement. S3 Lifecycle policies operate automatically without application changes, reducing storage cost while ensuring compliance. This is the most cost-effective option for long-term retention of noncurrent versions.

Why this answer

A lifecycle rule that transitions noncurrent versions to Glacier Deep Archive after 30 days and expires them at 365 days automatically lowers storage costs while guaranteeing retention for the compliance period. Intelligent-Tiering, bucket policies with manual deletion, and disabling versioning do not achieve the same automated, compliant cost reduction.

Exam trap

The trap here is assuming that S3 Intelligent-Tiering automatically manages noncurrent versions and enforces retention, when it only optimizes access-based tiers for current objects.

104
MCQhard

A company runs a critical workload on a fleet of Amazon EC2 instances behind an Application Load Balancer. The workload is latency-sensitive and the operations team wants to continuously improve performance without changing the application code. They have enabled detailed monitoring and AWS X-Ray tracing. Which solution will provide the MOST actionable, near-real-time insight into which downstream dependencies are causing increased response times?

A.Enable VPC Flow Logs on the instances' subnets and query the logs with Amazon Athena to find the slowest network flows.
B.Configure Amazon CloudWatch detailed monitoring for the EC2 instances and create dashboards for CPU and memory utilization.
C.Use AWS X-Ray service maps and trace analytics to identify latency contributions from downstream services and analyze response time distributions.
D.Enable AWS CloudTrail data events on the load balancer and analyze the logs with Amazon CloudWatch Logs Insights.
AnswerC

X-Ray service maps visualize each downstream call and segment latency, letting the team pinpoint which dependency adds the most time. Trace analytics aggregates response time distributions and error rates, so improvements can be prioritized without code changes. This directly satisfies near-real-time insight into downstream dependencies and is the intended use of X-Ray tracing already enabled.

Why this answer

X-Ray tracing already enabled in the environment produces service maps and trace analytics that attribute latency to specific downstream calls. This lets the team continuously identify and improve the slowest dependencies without modifying application code. Host-level metrics, flow logs, and API audit trails do not provide the needed request-level timing detail.

Exam trap

The trap here is assuming that infrastructure metrics or network flow logs can substitute for request-level tracing when the goal is to identify slow downstream dependencies.

105
MCQeasy

A company uses AWS CloudFormation to deploy resources. The operations team notices that some stack updates fail due to resource conflicts. What is the BEST practice to minimize such failures?

A.Enable termination protection on the stack.
B.Use AWS CloudFormation change sets before updating the stack.
C.Use AWS CloudFormation nested stacks.
D.Use stack policies to protect critical resources.
AnswerB

Change sets generate a preview of proposed resource modifications by comparing the updated template against the deployed stack, exposing replacement or conflict-causing changes before execution. This satisfies the requirement to minimise failed updates, since the operations team can review and correct problematic resource alterations prior to committing the stack update.

Why this answer

Change sets let you preview exactly what CloudFormation will add, modify, or delete before executing the update, so you can catch resource conflicts, replacement issues, or unintended changes before they cause a failed stack update. This is the AWS-recommended best practice for minimizing update failures and understanding impact.

Exam trap

SAP-C02 often tests whether candidates confuse preventive controls (stack policies, termination protection) with diagnostic tools (change sets) — change sets are the right answer when the goal is to preview and avoid update conflicts, not to block changes.

How to eliminate wrong answers

Option A is wrong because termination protection only prevents accidental stack deletion — it has no effect on update failures caused by resource conflicts. Option C is wrong because nested stacks improve modularity and reuse but don't inherently prevent update conflicts; they can even complicate troubleshooting. Option D is wrong because stack policies protect specific resources from being updated or replaced, which can actually cause update failures rather than prevent them — they're a guardrail, not a conflict-avoidance tool.

106
Multi-Selecteasy

Which TWO AWS services can be used to monitor and troubleshoot network connectivity issues between EC2 instances? (Choose two.)

Select 2 answers
A.Amazon Inspector.
B.AWS CloudTrail.
C.AWS Config.
D.VPC Reachability Analyzer.
E.VPC Flow Logs.
AnswersD, E

VPC Reachability Analyzer performs static configuration analysis across ENIs, security groups, NACLs, route tables and gateways, tracing the exact hop where connectivity breaks without sending traffic. This satisfies the stem's troubleshooting requirement by pinpointing misconfigured components between EC2 instances, rather than merely reporting packet loss or flow logs.

Why this answer

VPC Reachability Analyzer (D) is correct because it performs static analysis of the VPC configuration and traces the path between a source and destination (such as two EC2 instances) to determine whether packets can reach the target, identifying blocking components like security groups, NACLs, route tables, and gateways. VPC Flow Logs (E) is correct because it captures IP traffic metadata (source/destination IP, ports, protocol, ACCEPT/REJECT) for ENIs, subnets, or VPCs, which is used to diagnose connectivity and traffic-filtering issues between EC2 instances. Amazon Inspector (A) is wrong because it is a vulnerability management service that scans workloads for software vulnerabilities and unintended network exposure, not a connectivity troubleshooting tool.

AWS CloudTrail (B) is wrong because it records API activity and account actions for auditing, not packet-level or path-level network reachability. AWS Config (C) is wrong because it evaluates resource configuration compliance and changes over time, not live network connectivity between instances.

107
Multi-Selecteasy

A company runs a web application on EC2 instances behind an ALB. They want to improve the security posture by implementing defense in depth. Which TWO measures should they implement? (Choose TWO.)

Select 2 answers
A.Store static assets in a public S3 bucket.
B.Place EC2 instances in public subnets for easier management.
C.Allow direct internet access to the EC2 instances.
D.Configure security groups to restrict traffic to only necessary ports.
E.Use AWS WAF to filter common web exploits.
AnswersD, E

Security groups act as stateful virtual firewalls at the instance level, permitting only required ports and protocols. Restricting inbound rules to necessary ports removes unnecessary exposure, forming one layer of defence in depth alongside load balancer and network controls.

Why this answer

Option D is correct because security groups act as stateful virtual firewalls at the instance/ENI level, and restricting inbound rules to only the ports and protocols the application actually needs (for example, 443 from the ALB's security group rather than 0.0.0.0/0) enforces least privilege and shrinks the attack surface as part of a defense-in-depth strategy. Option E is correct because AWS WAF integrates with the Application Load Balancer to inspect HTTP/HTTPS requests and block common web exploits such as SQL injection and cross-site scripting using managed rule groups, adding a layer of protection that security groups cannot provide since they only filter at L3/L4. Option A is not appropriate because a public S3 bucket exposes static assets to unauthenticated access and weakens, rather than strengthens, the security posture; static content should be served via CloudFront with an origin access control or kept private.

Option B is not appropriate because placing EC2 instances in public subnets gives them routable public IPs and needlessly exposes them to the internet; they should sit in private subnets behind the ALB. Option C is not appropriate because allowing direct internet access to the instances bypasses the ALB and WAF protections, contradicting the defense-in-depth goal.

Exam trap

SAP-C02 often tests the confusion between network-layer controls (security groups, NACLs) and application-layer controls (WAF), tempting candidates to pick redundant or exposure-increasing options instead of complementary layers.

108
MCQmedium

A company has a microservices application running on Amazon ECS with the EC2 launch type. Each service runs as an ECS service with a desired count of 4 tasks across two Availability Zones. The operations team wants to reduce cost during predictable low-traffic nights while maintaining availability. They also want to ensure that a sudden traffic spike during the day does not cause outages. Which solution should a solutions architect recommend?

A.Configure ECS Service Auto Scaling with target tracking on CPU utilization, and schedule scaling actions to reduce the minimum capacity at night.
B.Deploy the services on AWS Fargate and use scheduled scaling to set the desired count to 2 at night and 8 during the day.
C.Create a second ECS cluster for night-time traffic and use Amazon Route 53 weighted routing to shift traffic between clusters.
D.Use AWS Auto Scaling to scale the EC2 container instances in the cluster based on CPU, and set the ECS service desired count to a fixed value of 4.
AnswerA

ECS Service Auto Scaling supports target tracking on metrics like CPU utilization and scheduled scaling actions. A scheduled action can lower the minimum task count at night, while target tracking scales out quickly during a daytime spike. This combination reduces cost during predictable low traffic and maintains availability during demand surges, meeting both requirements.

Why this answer

ECS Service Auto Scaling with target tracking plus scheduled scaling actions directly adjusts task count based on demand and predictable schedules. This reduces cost at night and scales out during spikes. Scaling only the EC2 instances, migrating to Fargate, or using multiple clusters do not provide the required responsive task-level scaling.

Exam trap

The trap here is confusing EC2 Auto Scaling of container instances with ECS Service Auto Scaling, assuming that adding instances automatically adjusts the number of running tasks.

109
MCQmedium

A company is using Amazon RDS for MySQL and notices that read replicas are falling behind the primary. The primary instance is experiencing high write traffic. What is the best solution to reduce replica lag?

A.Increase the instance class of the read replica.
B.Enable Multi-AZ on the primary instance.
C.Disable binary logging on the primary.
D.Move the read replica to the same AWS Region as the primary.
AnswerA

Replica lag under high write traffic often stems from the replica's insufficient compute to apply the primary's binary log changes. Increasing the read replica's instance class gives it more CPU and memory to replay writes faster, reducing lag.

Why this answer

Read replica lag under high write traffic on the primary is most often caused by the replica's inability to apply the relay log fast enough — i.e., insufficient CPU/IOPS on the replica itself. Increasing the replica instance class gives it more vCPU, memory, and baseline EBS throughput, allowing the SQL thread to apply binlog events faster and close the gap. This directly addresses the bottleneck (replica apply capacity) without touching the primary's write path.

Exam trap

SAP-C02 often tests the misconception that Multi-AZ or Region placement affects read replica performance, when in fact replica lag is a function of the replica's own compute/IO capacity and the primary's write volume.

How to eliminate wrong answers

Option B is wrong because Multi-AZ creates a synchronous standby in a different AZ for failover only — the standby does not serve reads and has zero effect on read replica lag. Option C is wrong because disabling binary logging on the primary breaks replication entirely (replicas rely on the binlog stream) and would also break point-in-time recovery; it is never a valid lag fix. Option D is wrong because cross-Region replicas are not inherently slower than same-Region ones for apply throughput — the lag is driven by replica resources and write volume, not geography, and moving the replica does not add CPU or IOPS.

110
MCQmedium

A company is using Amazon CloudFront with an S3 origin. They notice that users are receiving outdated content. What configuration change should be made to ensure users always get the latest content?

A.Use signed URLs to serve content.
B.Create an invalidation for the objects.
C.Enable compression on the S3 bucket.
D.Reduce the TTL to 0 in the CloudFront distribution.
AnswerB

An invalidation removes cached objects from CloudFront edge locations before their TTL expires, forcing subsequent requests to fetch the current version from the S3 origin. This satisfies the stem's requirement that users always receive the latest content.

Why this answer

CloudFront caches objects at edge locations based on the origin's cache headers and the distribution's TTL settings. When content at the S3 origin is updated but the cached object has not yet expired, users continue to receive the stale version. Creating an invalidation explicitly removes the specified objects from all edge caches, forcing CloudFront to fetch the fresh version from S3 on the next request.

This is the standard, immediate remediation for serving outdated content.

Exam trap

The trap here is confusing access control mechanisms (signed URLs) or performance tuning (compression, TTL) with cache invalidation, when the actual problem is stale cached content at the edge.

How to eliminate wrong answers

Option A is wrong because signed URLs only control access/authorization to content; they do not affect cache freshness or force CloudFront to re-fetch updated objects. Option C is wrong because compression reduces payload size for transfer efficiency and has no bearing on cache staleness or object versioning. Option D is wrong because setting TTL to 0 disables caching benefits entirely and is a blunt, performance-degrading workaround rather than a targeted fix; it also does not guarantee immediate refresh of already-cached objects the way an invalidation does.

111
MCQmedium

A developer notices that CloudWatch Logs for a Lambda function show no logs after a recent deployment. The function is invoked successfully. What is the most likely cause?

A.The Lambda function is exceeding the CloudWatch Logs API rate limits.
B.The Lambda execution role does not have permissions to write to CloudWatch Logs.
C.The log group retention policy is set to 7 days, which expired old logs.
D.The log group was deleted and not recreated.
AnswerB

Lambda writes logs to CloudWatch Logs using its execution role's permissions. If that role lacks logs:CreateLogStream and logs:PutLogEvents, invocations succeed but emit nothing. This directly explains the stem's constraint: successful invocations with no log output after deployment.

Why this answer

Lambda writes logs to CloudWatch Logs using the function's execution role. If that role lacks logs:CreateLogGroup, logs:CreateLogStream, and logs:PutLogEvents permissions, invocations succeed but no log events appear. This is the most common cause of silent logging after a deployment that changed IAM roles.

Exam trap

The trap is assuming that a successful invocation implies logging works; candidates forget that logging is a separate IAM-authorized API call that can fail independently of the function's business logic.

How to eliminate wrong answers

Option A is wrong because CloudWatch Logs API rate limits would produce throttling errors in the function's response or in CloudWatch metrics, not a complete absence of logs. Option C is wrong because a 7-day retention policy only deletes logs older than 7 days; it does not prevent new logs from being written. Option D is wrong because if the log group were deleted, Lambda would recreate it automatically on the next invocation (assuming the role has CreateLogGroup permission), so logs would still appear.

112
MCQmedium

A company runs a nightly batch job on a single Amazon EC2 instance that reads 2 TB of data from Amazon S3, transforms it, and writes results back to S3. The job currently takes 9 hours and must finish within a 4-hour maintenance window. The instance is a compute-optimized type with 10 Gbps network bandwidth, and CloudWatch shows the CPU is never above 35%. Which change should a solutions architect make to shorten the runtime?

A.Move the job to an AWS Lambda function with 10 GB of memory and a 15-minute timeout.
B.Change the instance type to a larger compute-optimized size with 25 Gbps network bandwidth and keep the single-instance design.
C.Redesign the job to process data in parallel across multiple EC2 instances using S3 multipart uploads and range-based GET requests.
D.Enable S3 Transfer Acceleration on the bucket and rerun the job unchanged on the same instance.
AnswerC

The instance is CPU-idle and network-bound, so the bottleneck is throughput to and from S3 rather than compute. Partitioning the dataset and processing shards concurrently across several instances multiplies aggregate bandwidth, and range-based GETs plus multipart uploads make full use of each instance's network path. This directly attacks the real constraint and can bring a 9-hour job within the 4-hour window.

Why this answer

Low CPU utilization with high data volume points to a network and concurrency bottleneck rather than insufficient compute. Sharding the dataset and processing shards concurrently across multiple instances multiplies aggregate S3 bandwidth, and range-based GETs with multipart uploads let each worker fully use its network path. Vertical scaling and Transfer Acceleration leave the sequential processing model intact.

Exam trap

The trap here is reading 10 Gbps network bandwidth and assuming the instance is already network-saturated, when a single sequential reader rarely achieves that ceiling without concurrent requests.

113
Multi-Selecthard

A company uses Amazon DynamoDB for a gaming application. The table has a partition key of user_id and a sort key of timestamp. During a new game launch, the table experiences throttling on a few partitions. The company wants to improve the partition distribution. Which action should the company take?

Select 1 answer
A.Add a random suffix to the partition key to distribute writes more evenly.
B.Use DAX (DynamoDB Accelerator) to cache read-heavy workloads.
C.Increase the read capacity units for the table.
D.Implement write sharding by using a composite partition key.
E.Switch the table to on-demand capacity mode.
AnswersD

Write sharding spreads writes across multiple partition key values by appending a calculated suffix to the partition key, distributing load that a single hot partition would otherwise absorb. This directly improves partition distribution when many writes target the same user_id.

Why this answer

The root cause is a hot partition caused by low partition key cardinality: many writes land on the same user_id value. The correct fix is write sharding, which increases the number of distinct partition key values so writes spread across more physical partitions. Option D describes this correctly by using a composite partition key (e.g., user_id#shard).

Option A is not correct: appending a random suffix to the existing partition key changes the key schema and destroys the ability to query by user_id, and it is the same sharding concept as D rather than a separate remediation. B is incorrect because DAX only accelerates reads and does not relieve write-side hot partitions. C is incorrect because increasing RCUs adds read throughput and cannot fix write throttling on a hot partition.

E is incorrect because on-demand capacity mode changes billing/capacity management but does not change partition key distribution or eliminate hot partitions.

Exam trap

The trap is reaching for capacity or caching solutions (DAX, more RCUs, on-demand mode) when the real issue is partition key cardinality and distribution. The exam tests whether you diagnose the root cause (hot partition from low-cardinality key) rather than the symptom (throttling), and whether you recognize that write sharding and adding a random suffix to the partition key are the same technique rather than two independent actions.

114
MCQhard

An IAM policy attached to a user allows s3:GetObject and s3:PutObject on my-bucket, but denies all actions on the confidential/ prefix. The user reports that they can still upload objects to the confidential/ folder. Why?

A.The Allow statement appears before the Deny statement in the policy.
B.The Deny statement is not explicit enough to override the Allow.
C.The Deny statement is in a separate policy that is not attached to the user.
D.The Deny statement's resource ARN does not match the confidential folder objects.
AnswerC

An explicit Deny only takes effect when the policy containing it is attached to the principal. Because that policy is unattached, the Allow in the attached policy governs, so s3:PutObject on the confidential/ prefix succeeds despite the intended restriction.

Why this answer

In AWS IAM, an explicit Deny only takes effect if the policy containing it is actually attached to the principal (user, group, or role). If the Deny statement lives in a separate policy that was never attached to the user, IAM evaluates only the attached policies — the Allow for s3:PutObject on my-bucket therefore grants access to the confidential/ prefix. The fix is to attach the policy containing the Deny to the user (or a group the user belongs to).

Exam trap

SAP-C02 often tests the misconception that an explicit Deny anywhere in the account automatically applies, when in fact the Deny must be in a policy that is actually attached to the principal to be evaluated.

How to eliminate wrong answers

Option A is wrong because IAM does not evaluate statements by order of appearance — all statements in all attached policies are evaluated together with explicit Deny always winning regardless of position. Option B is wrong because an explicit Deny does override an Allow in IAM; the issue is not the strength of the Deny but whether it is attached at all. Option D is wrong because the question states the Deny targets the confidential/ prefix, and even if the ARN were slightly off, the primary reported symptom (uploads still succeeding) is explained by the policy not being attached, not by ARN mismatch.

115
MCQmedium

A company uses Amazon S3 to store backups. The backup process uploads objects with a prefix 'backups/' and sets the storage class to STANDARD_IA. The company wants to automatically move objects older than 30 days to GLACIER. What is the most efficient way to achieve this?

A.Use an AWS Lambda function triggered by S3 events to change the storage class.
B.Use S3 Batch Operations to copy objects to a new bucket with GLACIER storage class.
C.Create an S3 Lifecycle rule that transitions objects with prefix 'backups/' to GLACIER after 30 days.
D.Enable S3 Intelligent-Tiering on the bucket.
AnswerC

S3 Lifecycle rules natively transition objects between storage classes based on age, so a rule scoped to the 'backups/' prefix moves them to GLACIER after 30 days without custom code or manual intervention. This is the most efficient mechanism for the stated transition.

Why this answer

S3 Lifecycle rules are designed to automatically transition objects between storage classes based on age and prefix. Creating a rule that targets the 'backups/' prefix and transitions objects to GLACIER after 30 days is the most efficient, server-side, and cost-effective method. It requires no custom code or manual intervention.

Exam trap

SAP-C02 often tests the difference between lifecycle policies and Intelligent-Tiering, and candidates may choose Intelligent-Tiering thinking it moves data to GLACIER, but it only moves between frequent and infrequent access tiers.

How to eliminate wrong answers

Option A is wrong because using Lambda to change storage class is inefficient, requires custom code, and incurs Lambda execution costs; lifecycle rules are native and simpler. Option B is wrong because S3 Batch Operations is for one-time bulk actions, not automated ongoing transitions. Option D is wrong because Intelligent-Tiering automatically moves data between access tiers but does not transition to GLACIER; it is for unknown or changing access patterns, not a fixed 30-day rule.

116
MCQmedium

A company runs a critical application on an Amazon RDS for PostgreSQL DB instance. The database experiences periodic slowdowns. The team notices that the DB instance has a large number of connections in an idle state. What is the BEST way to address this issue?

A.Migrate the database to Amazon Aurora.
B.Configure AWS Lambda to manage database connections.
C.Use an RDS Proxy to pool database connections.
D.Increase the max_connections parameter in the DB parameter group.
AnswerC

RDS Proxy pools and reuses established connections, so idle sessions no longer consume backend resources on the DB instance. This directly resolves the connection exhaustion causing periodic slowdowns, since the proxy multiplexes many client connections onto fewer database connections without application changes.

Why this answer

Amazon RDS Proxy pools and reuses database connections, reducing the number of idle connections held by the application and smoothing connection churn. This directly addresses the slowdown caused by many idle connections, improving database performance without application changes. It also handles failover and credentials via Secrets Manager.

Exam trap

The trap is thinking 'more connections' solves connection-related slowdowns; candidates pick increasing max_connections when the real issue is idle connection waste, which pooling addresses.

How to eliminate wrong answers

Option A is wrong because migrating to Aurora is a major architectural change and does not inherently solve idle connection buildup. Option B is wrong because Lambda managing connections adds complexity and does not pool connections for the existing application. Option D is wrong because increasing max_connections allows more connections but does not reduce idle ones — it can worsen resource contention.

117
Multi-Selecteasy

A company has an AWS Lambda function that processes messages from an SQS queue. The function is experiencing timeouts. Which TWO changes could help resolve the timeout issue? (Choose 2)

Select 2 answers
A.Increase the batch size in the SQS event source mapping.
B.Enable SQS queue encryption.
C.Increase the Lambda function timeout.
D.Increase the Lambda function memory allocation.
E.Decrease the SQS visibility timeout.
AnswersC, D

Raising the function's configured timeout directly addresses the stem's timeout constraint: Lambda terminates execution once the limit is reached, so a longer duration lets genuinely slow processing finish. This suits the SQS-triggered workload, though it only helps when the function's actual runtime exceeds the current limit rather than being stuck.

Why this answer

Option C is correct because the Lambda function timeout setting defines the maximum execution time before Lambda terminates the invocation; if the function legitimately needs more time to process messages, raising the timeout (up to 15 minutes) directly prevents timeout errors. Option D is correct because Lambda allocates CPU and network bandwidth proportionally to memory, so increasing the memory allocation gives the function more compute power and can significantly reduce processing time, resolving timeouts caused by slow execution. Option A is not appropriate because increasing the SQS batch size means each invocation processes more messages, which typically increases execution duration and worsens timeouts.

Option B is not relevant because SQS queue encryption (SSE) protects data at rest and does not affect Lambda execution time. Option E is not appropriate because decreasing the visibility timeout makes messages reappear sooner for reprocessing, which can cause duplicate processing and does not fix the underlying Lambda timeout.

118
MCQmedium

A company has a critical application running on AWS Lambda that processes messages from an Amazon SQS queue. The queue occasionally receives a large backlog of messages, causing Lambda to scale up significantly and incur high costs. The company wants to optimize costs while ensuring that all messages are processed in a timely manner. Which solution should a solutions architect recommend?

A.Configure the SQS queue as an event source for Lambda with a batch size of 10 and a maximum batching window of 0 seconds.
B.Configure the SQS queue as an event source for Lambda with a larger batch size and a longer maximum batching window.
C.Set the Lambda function's reserved concurrency to a low value to limit scaling.
D.Increase the Lambda function's memory allocation to reduce execution time.
AnswerB

Increasing the batch size and batching window allows Lambda to process more messages per invocation and wait longer to accumulate messages, reducing the number of invocations and thus cost. During a backlog, Lambda can process larger batches, improving efficiency. This optimizes cost while still processing all messages in a timely manner, as the window is bounded.

Why this answer

By increasing the batch size and maximum batching window, Lambda can retrieve more messages per invocation and wait to accumulate a full batch, reducing the number of invocations and associated costs. This is especially effective during backlogs because Lambda can process messages in larger chunks. It maintains timely processing because the batching window is limited.

Other options either do not reduce invocations or may throttle processing.

Exam trap

The trap here is thinking that limiting concurrency or increasing memory is the primary way to reduce Lambda costs, when actually batching is a more effective cost optimization for queue processing.

119
MCQmedium

A company runs a critical application on a single Amazon EC2 instance in a development environment. The application writes data to an instance store volume. After a planned stop and start of the instance, the data on the instance store is lost. The company wants to prevent data loss in the future for this instance. What should a solutions architect recommend?

A.Enable termination protection on the instance.
B.Attach an additional EBS volume and move the application data to it.
C.Enable detailed monitoring on the instance to detect data loss.
D.Create a snapshot of the instance store volume regularly.
AnswerB

EBS volumes provide persistent, replicated storage that survives instance stop/start and can be reattached. Moving the application data from instance store to an EBS volume ensures durability and availability. This directly solves the data loss issue because EBS volumes are independent of the instance lifecycle.

Why this answer

Instance store volumes are ephemeral and lose data when the instance is stopped or terminated. To prevent data loss, the application must use persistent storage such as Amazon EBS. Attaching an EBS volume and moving data to it ensures durability across instance lifecycle events.

Other options either provide no persistence or are technically infeasible.

Exam trap

The trap here is assuming that instance store data can be preserved through snapshots or termination protection, when in fact instance store is inherently non-persistent and cannot be snapshotted.

120
MCQmedium

A company is running a stateful web application on EC2 instances in an Auto Scaling group. Users report that their sessions are lost when instances are terminated during scale-in. What should a solutions architect do to preserve session state?

A.Use lifecycle hooks to save session data to Amazon S3 before instance termination.
B.Enable sticky sessions (session affinity) on the Application Load Balancer.
C.Store session state in Amazon ElastiCache.
D.Increase the Auto Scaling group's cooldown period to prevent rapid scaling.
AnswerC

ElastiCache externalises session data from instance memory into a shared Redis or Memcached tier, so any instance in the Auto Scaling group can serve subsequent requests. Scale-in termination no longer discards sessions, satisfying the requirement to preserve state.

Why this answer

ElastiCache provides a centralized, fast session store that persists across instance terminations, ensuring session state is retained even when instances are scaled in. Option A is wrong because using lifecycle hooks to save session data to Amazon S3 is unreliable due to the high latency and the risk that the termination process may not complete the save in time. Option B is wrong because sticky sessions (session affinity) on the Application Load Balancer can cause uneven load distribution and still result in session loss if all instances in a target group are replaced or if the specific instance with the session is terminated.

Option D is wrong because increasing the Auto Scaling group's cooldown period only delays the next scaling activity but does not preserve session state when instances are eventually terminated.

121
MCQmedium

A company is using Amazon CloudFront to serve content from an S3 origin. The content is updated infrequently. Users in some regions report seeing stale content. The company wants to ensure that users always see the latest version without waiting for TTL expiration. What is the MOST cost-effective solution?

A.Use file versioning in the URL (e.g., appending a query string or using a unique object key).
B.Set a very short TTL (e.g., 0 seconds) for the CloudFront distribution.
C.Use an origin shield to reduce the number of requests to S3.
D.Create a CloudFront invalidation request for the changed files after each update.
AnswerA

Appending a version identifier to the URL creates a distinct cache key, so CloudFront fetches the new object immediately rather than serving the stale cached copy until TTL expiry. This satisfies the freshness requirement at minimal cost, avoiding invalidation charges.

Why this answer

File versioning (changing the URL or appending a query string) is the most cost-effective solution because it guarantees that users always fetch the latest version from the origin without waiting for TTL expiration. This approach avoids the costs associated with CloudFront invalidations (Option D) and does not increase load on the origin as a very short TTL would (Option B). Option C (origin shield) helps reduce requests to the origin but does not force existing cached content to be refreshed.

Therefore, file versioning is the best practice for infrequently updated content.

122
Multi-Selectmedium

A company is migrating a legacy application to AWS. The application runs on a single EC2 instance and uses an attached EBS volume for data storage. The company wants to improve high availability. Which THREE actions should the company take? (Choose three.)

Select 3 answers
A.Migrate the database to Amazon RDS with Multi-AZ deployment.
B.Use an EBS volume with higher IOPS to improve performance.
C.Store data on the instance store instead of EBS to reduce latency.
D.Place the EC2 instance in an Auto Scaling group that spans multiple Availability Zones.
E.Place the EC2 instances behind an Application Load Balancer.
AnswersA, D, E

Migrating to Amazon RDS with Multi-AZ satisfies the high-availability constraint by replacing a single-instance database with a synchronously replicated standby in a second Availability Zone. Automatic failover redirects the endpoint during an AZ outage, eliminating the EBS volume's single point of failure without application connection-string changes.

Why this answer

Option A is correct because migrating the database to Amazon RDS with a Multi-AZ deployment provides automatic failover to a standby replica in a different Availability Zone, eliminating the single point of failure for data storage and improving availability. Option D is correct because placing the EC2 instance in an Auto Scaling group spanning multiple Availability Zones allows the application to be launched in more than one AZ and automatically replaced if an instance or AZ fails. Option E is correct because placing the EC2 instances behind an Application Load Balancer distributes incoming traffic across healthy targets in multiple AZs and routes around failed instances, which is essential for high availability.

Option B is incorrect because increasing EBS IOPS only improves performance, not availability, and does not address single-instance or single-AZ failure. Option C is incorrect because instance store is ephemeral and tied to a single host, so it reduces durability and availability rather than improving it.

Exam trap

SAP-C02 often tests the confusion between performance improvements (higher IOPS, instance store) and availability improvements (Multi-AZ, ASG across AZs, ALB), so candidates must map each option to the correct pillar.

123
MCQeasy

A company stores sensitive data in an S3 bucket encrypted with SSE-KMS. They need to audit all access requests to the bucket. Which AWS service should they use?

A.VPC Flow Logs
B.Amazon CloudWatch Logs
C.AWS Config
D.AWS CloudTrail
AnswerD

CloudTrail records S3 data events, capturing every object-level access request including the caller identity, time, and API action. Enabling data event logging on the bucket provides the complete audit trail of access requests that SSE-KMS encryption alone cannot supply.

Why this answer

AWS CloudTrail logs all API calls made to S3, including requests to decrypt KMS keys. This enables auditing of all access requests to the bucket. AWS Config (C) records resource configuration changes, not access requests.

VPC Flow Logs (A) capture network traffic, not API calls. CloudWatch Logs (B) can store and monitor logs but does not generate logs from S3 access by itself.

124
MCQmedium

A company runs a production application on Amazon EC2 instances behind an Application Load Balancer. Recently, error rates increased due to a misconfiguration. The operations team wants to automatically roll back to the previous working configuration if errors exceed a threshold. Which solution provides the fastest rollback?

A.Manually restore AMI snapshots of the previous deployment.
B.Use AWS Elastic Beanstalk with rolling updates and health checks.
C.Use AWS CloudFormation with a stack policy to prevent updates.
D.Implement AWS CodeDeploy with automatic rollback triggered by CloudWatch alarms.
AnswerD

CodeDeploy deployment groups can bind CloudWatch alarms; when the alarm threshold breaches, CodeDeploy automatically reverts to the last known-good revision. This restores the previous configuration within minutes, far faster than manual redeployment, satisfying the fastest-rollback constraint.

Why this answer

AWS CodeDeploy with automatic rollback triggered by CloudWatch alarms provides the fastest rollback because it continuously monitors application health via CloudWatch metrics and automatically reverts to the last known good revision when an alarm threshold is breached. This automation minimizes manual intervention and downtime, enabling rapid recovery from misconfigurations.

Exam trap

SAP-C02 often tests the difference between automated rollback mechanisms and manual or preventive measures, causing candidates to choose options that either lack automation or do not directly trigger rollback based on error thresholds.

How to eliminate wrong answers

Option A is wrong because manually restoring AMI snapshots is slow, error-prone, and does not provide automated rollback based on error thresholds. Option B is wrong because Elastic Beanstalk rolling updates with health checks can roll back, but it is not as fast or as tightly integrated with CloudWatch alarms for automatic rollback as CodeDeploy. Option C is wrong because a CloudFormation stack policy prevents updates but does not automatically roll back to a previous working configuration upon error detection.

125
MCQeasy

A developer is deploying a serverless application using AWS SAM. The deployment fails with a 'ResourceNotReady' error. What is the most likely cause?

A.The SAM template has invalid YAML syntax.
B.The application has too many tags.
C.A resource that the application depends on is not yet created.
D.The Lambda function code has a runtime error.
AnswerC

SAM and CloudFormation create resources in dependency order; a ResourceNotReady error occurs when a dependent resource, such as a nested stack or custom resource, has not finished provisioning before a downstream resource references it. The dependency is not yet created when required.

Why this answer

'ResourceNotReady' in AWS SAM indicates that a resource the application depends on is not yet created or still in progress. This often happens when a nested stack or a resource with dependencies (e.g., a DynamoDB table) is not fully provisioned before the dependent resource tries to use it. Option A is incorrect: invalid YAML syntax would cause a template validation error, not a 'ResourceNotReady' error.

Option B is incorrect: too many tags would not cause this error; tags are metadata and do not affect resource readiness. Option D is incorrect: a Lambda runtime error would occur during function invocation, not during deployment.

126
MCQmedium

A company has an AWS Lambda function that processes messages from an Amazon SQS queue. The function is invoked with a batch size of 10. Some messages are failing repeatedly, causing the function to retry them up to the maximum retry count and then they are sent to a dead-letter queue (DLQ). The company wants to improve the resilience of the application by handling partial batch failures more efficiently. What should a solutions architect do?

A.Move the messages to a DLQ immediately after the first failure.
B.Implement reportBatchItemFailures in the Lambda function and enable partial batch response for the SQS event source mapping.
C.Decrease the batch size to 1 so that each invocation processes a single message.
D.Increase the batch size to 100 to process more messages per invocation.
AnswerB

ReportBatchItemFailures lets the function return only the identifiers of failed messages, so Lambda deletes successful ones and retries just the failures. This avoids reprocessing the entire batch of ten, directly satisfying the requirement to handle partial batch failures efficiently and reduce duplicate DLQ entries.

Why this answer

Implementing reportBatchItemFailures in the Lambda function and enabling partial batch response for the SQS event source mapping allows the function to signal which specific messages within a batch failed. This prevents the entire batch from being retried or sent to the DLQ, and only the failed messages are retried individually, improving resilience and efficiency.

Exam trap

The trap here is that candidates often think decreasing batch size to 1 is the simplest fix, but that ignores the throughput impact and the fact that AWS provides a native partial batch failure mechanism that is more efficient and scalable.

How to eliminate wrong answers

Option A is wrong because moving messages to a DLQ immediately after the first failure defeats the purpose of retries and would cause unnecessary data loss for transient failures. Option C is wrong because decreasing the batch size to 1 reduces throughput and does not address partial batch failures; it simply avoids the problem by processing one message at a time, which is less efficient. Option D is wrong because increasing the batch size to 100 would amplify the impact of partial failures, as the entire batch would be retried or sent to the DLQ if any message fails, making the problem worse.

127
MCQmedium

A company has an application that runs on Amazon EC2 instances in an Auto Scaling group. The application writes logs to local disk. The company wants to centralize log storage and enable near-real-time analysis of the logs. The company also wants to retain the logs for 7 years for compliance. The logs are currently stored in a file on each instance. The company wants a solution that requires minimal changes to the application and is cost-effective. Which solution meets these requirements?

A.Configure the application to write logs directly to Amazon S3 and use Amazon Athena for analysis.
B.Install and configure the Amazon CloudWatch agent on each instance to send logs to CloudWatch Logs. Configure a subscription filter to stream logs to Amazon Kinesis Data Firehose, which delivers to Amazon S3. Use Amazon Athena for analysis.
C.Install and configure the Amazon CloudWatch agent on each instance to send logs to CloudWatch Logs. Set the retention period to 7 years and use CloudWatch Logs Insights for analysis.
D.Use AWS Systems Manager to run a script on each instance that periodically uploads log files to Amazon S3. Use Amazon QuickSight for analysis.
AnswerB

The CloudWatch agent centralizes logs with minimal application changes. A subscription filter can stream logs in near-real-time to Kinesis Data Firehose, which reliably delivers them to Amazon S3 for long-term, cost-effective storage. Athena can then query the logs directly from S3. This solution meets all requirements: centralized logging, near-real-time analysis, 7-year retention, minimal changes, and cost-effectiveness.

Why this answer

The combination of the CloudWatch agent, subscription filters, Kinesis Data Firehose, and Amazon S3 provides a managed, near-real-time log pipeline with minimal application changes. Logs are centralized in CloudWatch Logs, streamed to S3 for cost-effective long-term retention, and can be analyzed with Athena. This meets the compliance, analysis, and cost requirements without modifying the application.

Exam trap

The trap here is assuming that CloudWatch Logs alone is cost-effective for 7-year retention, when S3 is far cheaper for long-term archival.

128
Multi-Selecthard

A company is running a stateful web application on a single Amazon EC2 instance. The application stores session data on an instance store volume. The company wants to improve the availability and durability of the application by moving to a multi-AZ architecture. The application must remain accessible if an Availability Zone fails. Which two actions should a solutions architect take to meet these requirements? (Choose two.)

Select 2 answers
A.Configure the application to use sticky sessions on the Application Load Balancer and store session data on each instance's EBS volume.
B.Use Amazon S3 to store session data and have the application read/write sessions directly to S3.
C.Deploy the application on EC2 instances in an Auto Scaling group spanning multiple Availability Zones, behind an Application Load Balancer.
D.Attach an additional instance store volume to each EC2 instance to replicate session data across volumes.
E.Move session data to Amazon ElastiCache for Redis with Multi-AZ enabled.
AnswersC, E

An Auto Scaling group across multiple AZs with an ALB ensures that the application remains accessible if one AZ fails. The ALB distributes traffic to healthy instances, and Auto Scaling maintains capacity. This provides high availability for the application tier, which is essential for a multi-AZ architecture.

Why this answer

To achieve a multi-AZ architecture, the application tier must be distributed across AZs with an ALB, and session state must be externalized to a highly available store like ElastiCache for Redis Multi-AZ. These two actions together ensure the application remains accessible and session data is durable even if an AZ fails.

Exam trap

The trap here is assuming that instance store or EBS volumes with sticky sessions can provide cross-AZ availability, when they are tied to a single AZ.

129
MCQhard

A company has a critical application that uses an Amazon Aurora MySQL database cluster. The application experiences occasional slow queries during peak hours, impacting user experience. A solutions architect needs to identify the root cause and improve performance with minimal changes. The architect has enabled Performance Insights and sees high wait times on the database. Which action should the architect take FIRST to resolve the issue?

A.Analyze Performance Insights to identify the top SQL statements and wait events causing the bottleneck.
B.Scale up the Aurora cluster by changing the instance class to a larger size.
C.Modify the application to use Aurora's reader endpoint for all read queries.
D.Add additional read replicas to the Aurora cluster to distribute the read load.
AnswerA

Performance Insights provides detailed metrics on database load, including top SQL statements and wait events. By analyzing this data, the architect can identify whether the issue is due to inefficient queries, locking, or resource contention. This targeted approach allows for specific optimizations, such as query tuning or index creation, which are more effective than broad scaling actions. It aligns with the requirement to identify the root cause first.

Why this answer

Performance Insights offers granular visibility into database load and wait events. Analyzing it first allows the architect to identify the specific cause of slow queries, enabling targeted fixes like query optimization or index changes. This is more efficient than blindly scaling, which may not resolve the issue and adds cost.

Exam trap

The trap here is jumping to scaling actions without first diagnosing the root cause, which can lead to unnecessary costs and unresolved performance issues.

130
Multi-Selecthard

Which THREE factors should be considered when designing a disaster recovery plan for a multi-tier application using AWS? (Choose three.)

Select 3 answers
A.Recovery Time Objective (RTO) and Recovery Point Objective (RPO).
B.Data replication strategy (e.g., synchronous vs. asynchronous).
C.DNS failover using Amazon Route 53.
D.Deploying the application across multiple Availability Zones.
E.Using larger instance sizes for better performance.
AnswersA, B, C

RTO defines the maximum tolerable downtime and RPO the maximum tolerable data loss; together they drive every subsequent DR decision, including standby strategy, replication frequency and budget. They are the primary business requirements against which any multi-tier AWS DR design is validated.

Why this answer

Option A is correct because RTO (maximum tolerable downtime) and RPO (maximum tolerable data loss) are the foundational business requirements that drive every DR design decision, such as whether to use pilot light, warm standby, or multi-site active-active. Option B is correct because the data replication strategy determines actual data loss and recovery behavior: synchronous replication (e.g., Aurora Global Database or Multi-AZ) gives near-zero RPO but adds latency, while asynchronous replication (e.g., S3 Cross-Region Replication, RDS read replicas) lowers latency but risks losing recent writes. Option C is correct because Amazon Route 53 failover routing with health checks is the mechanism that redirects client traffic to the standby Region during a disaster, making it essential for reducing RTO in a multi-tier application.

Option D is not one of the three because deploying across multiple Availability Zones addresses high availability within a single Region, not disaster recovery across Regions, which is the scope of a DR plan. Option E is not one of the three because instance sizing affects performance and cost, not recovery time, recovery point, or failover capability, so it is irrelevant to DR design.

131
MCQmedium

A company runs a web application on EC2 instances in an Auto Scaling group. The application receives a variable workload. The company wants to scale based on a custom metric that tracks the number of active users. What is the MOST efficient way to achieve this?

A.Use a scheduled scaling policy to add or remove instances based on historical usage patterns.
B.Use AWS Lambda to periodically evaluate the custom metric and adjust the desired capacity via API calls.
C.Create a step scaling policy that uses CloudWatch alarms based on the custom metric.
D.Create a target tracking scaling policy using the custom metric as the target.
AnswerD

Target tracking adjusts capacity automatically to hold the custom metric at a specified target, so active-user load is matched without manual threshold tuning. This satisfies the variable workload and efficiency requirements, unlike step or simple scaling policies that need hand-tuned alarms.

Why this answer

Target tracking scaling is the most efficient because it automatically adjusts capacity to keep a chosen metric at a target value, using CloudWatch alarms under the hood. It supports custom metrics and eliminates the need to define step boundaries or thresholds manually, which is exactly what a variable workload with a custom metric requires.

Exam trap

SAP-C02 often tests whether candidates over-engineer scaling with Lambda or step policies when the native target tracking policy already supports custom metrics.

How to eliminate wrong answers

Option A is wrong because scheduled scaling is time-based, not metric-driven, so it cannot react to variable active-user counts. Option B is wrong because a Lambda polling loop is custom orchestration that adds latency, cost, and operational overhead versus native target tracking. Option C is wrong because step scaling requires manually defining alarm thresholds and step adjustments, which is less efficient than target tracking for a single target metric.

132
Multi-Selectmedium

A company is migrating a monolithic application to a microservices architecture on AWS. They want to improve deployment frequency and reduce risk. Which TWO strategies should they adopt?

Select 2 answers
A.Deploy all microservices from a single codebase.
B.Implement blue/green deployments.
C.Use CI/CD pipelines with automated testing.
D.Require manual approval for each production deployment.
E.Use feature branches with manual merge approvals.
AnswersB, C

Blue/green deployments run the new microservice version alongside the old one, shifting traffic only after verification. This satisfies the reduced-risk constraint by enabling instant rollback to the previous environment, while supporting frequent releases without downtime.

Why this answer

Correct answers are B and C. Blue/green deployments (B) reduce risk by allowing instant rollback and minimizing downtime during production releases. CI/CD pipelines with automated testing (C) increase deployment frequency by automating build, test, and deployment steps, enabling rapid and reliable releases.

Option A is incorrect because deploying all microservices from a single codebase increases coupling and blast radius. Option D is incorrect because manual approval gates slow down frequency. Option E is incorrect because feature branches with manual merge approvals introduce delays and integration complexity.

133
MCQhard

A company has a microservices architecture running on Amazon ECS with Fargate. Each service writes logs to CloudWatch Logs. The operations team needs to search across all logs for a specific error pattern. Currently, they manually query each log group, which is time-consuming. What is the MOST efficient way to enable centralized log search?

A.Export logs to Amazon S3 and use Amazon Athena to query them.
B.Use CloudWatch Contributor Insights to identify the top error sources.
C.Create a subscription filter for each log group that sends logs to a Kinesis Data Firehose delivery stream.
D.Use CloudWatch Logs Insights to query all log groups from a single query.
AnswerD

CloudWatch Logs Insights queries multiple log groups in one statement, aggregating results centrally. This removes the manual per-group querying that made cross-service error searches slow, directly meeting the centralised search requirement across all Fargate services.

Why this answer

CloudWatch Logs Insights enables querying multiple log groups in a single query using a query language, allowing centralized search across all services. Option A is wrong because exporting to S3 and using Athena is for analyzing historical data, not real-time search. Option B is wrong because CloudWatch Contributor Insights identifies top contributors and is not for arbitrary pattern search.

Option C is wrong because subscription filters to Kinesis Data Firehose can centralize logs but require additional infrastructure and do not provide a built-in query interface like Logs Insights.

Exam trap

Candidates may think that sending logs to a central storage like S3 or Kinesis is necessary, but CloudWatch Logs Insights already provides cross-log-group querying.

134
MCQhard

A company runs a production database on Amazon RDS for PostgreSQL. The database experiences high write latency during peak hours. The company wants to improve write performance with minimal cost. Which action should a solutions architect take?

A.Enable Multi-AZ deployment for automatic failover.
B.Add multiple read replicas in different Availability Zones.
C.Use RDS for PostgreSQL with multiple write replicas and configure application-level sharding.
D.Increase the allocated storage and provisioned IOPS.
AnswerD

Provisioned IOPS storage on RDS for PostgreSQL decouples disk throughput from capacity, directly relieving the write-latency bottleneck during peak hours. Increasing allocated storage alone raises baseline IOPS only marginally, so pairing it with provisioned IOPS delivers the sustained write performance the stem demands at minimal cost.

Why this answer

High write latency on RDS for PostgreSQL is typically caused by insufficient storage IOPS or throughput. Increasing allocated storage and provisioned IOPS (on gp3/io1/io2) directly addresses the storage bottleneck that limits write performance, and it is the lowest-cost targeted fix compared to architectural changes. Read replicas and Multi-AZ do not improve write throughput on the primary.

Exam trap

The trap is assuming read replicas or Multi-AZ improve write performance — candidates must remember that only the primary handles writes, and HA/read scaling are orthogonal to write throughput.

How to eliminate wrong answers

Option A is wrong because Multi-AZ provides high availability via synchronous standby replication, not write performance — the standby does not serve writes, and the synchronous commit can even add slight latency. Option B is wrong because read replicas offload read traffic only; they do not increase write capacity on the primary and add cost. Option C is wrong because RDS for PostgreSQL does not support multiple write replicas natively (that is Aurora), and application-level sharding is a major architectural change with high cost and complexity.

Option D is correct because scaling storage/IOPS directly removes the I/O bottleneck causing write latency.

135
MCQhard

A company is migrating from a monolithic application to microservices on AWS. They need to reduce the blast radius of failures. Which architecture pattern should they implement?

A.Implement Auto Scaling groups for each microservice without separating data stores.
B.Use a cell-based architecture where each microservice runs in isolated cells with independent data stores.
C.Route all traffic through a single Application Load Balancer to simplify management.
D.Deploy all microservices in a single Availability Zone with a shared database.
AnswerB

Cell-based architecture partitions workloads into independent, self-contained cells, each with its own compute and data stores. A failure inside one cell cannot cascade to others, directly shrinking the blast radius, which is the isolation outcome the migration to microservices requires.

Why this answer

A cell-based architecture isolates each microservice (or group) into independent cells with their own data stores, so a failure in one cell cannot cascade to others — this directly reduces blast radius. Independent data stores prevent a shared database from becoming a single point of failure and coupling failure domains. This pattern is the AWS-recommended approach for fault isolation in microservices.

Exam trap

The trap is assuming Auto Scaling alone reduces blast radius — scaling improves capacity but does not isolate failure domains if the data store or load balancer is shared.

How to eliminate wrong answers

Option A is wrong because Auto Scaling without separating data stores leaves a shared database as a single failure domain — a DB outage or lock contention takes down every microservice, defeating blast-radius reduction. Option C is wrong because a single ALB is a shared control-plane/data-plane chokepoint; if it fails or is misconfigured, all traffic to all microservices is affected, and it does not isolate backend failures. Option D is wrong because deploying everything in one AZ with a shared database concentrates both compute and data in a single failure domain, maximizing blast radius rather than reducing it.

136
MCQeasy

A company uses Amazon CloudWatch Logs to collect application logs. The operations team wants to be notified when a specific error message appears in the logs. What is the SIMPLEST way to achieve this?

A.Configure S3 event notifications on the log file destination to send an alert.
B.Subscribe a Lambda function to the log group and have it check for the error message.
C.Create a metric filter on the log group for the error message and set up a CloudWatch alarm on the metric.
D.Use CloudWatch Logs Insights to run a query periodically and send results via email.
AnswerC

A metric filter scans incoming log events for the error pattern and increments a custom CloudWatch metric, which an alarm then evaluates against a threshold. This satisfies the stem's notification requirement natively within CloudWatch Logs, avoiding custom Lambda parsing or third-party tooling.

Why this answer

A CloudWatch metric filter scans a log group for a specified pattern (such as an error string) and increments a custom metric each time the pattern matches; attaching a CloudWatch alarm to that metric then triggers notifications via SNS when the threshold is breached. This is the native, lowest-effort mechanism for alerting on log content and requires no custom code. It directly satisfies the 'simplest way' requirement.

Exam trap

SAP-C02 often tests whether candidates choose the simplest native AWS service rather than a custom Lambda or manual query approach, so candidates who over-engineer the solution pick Lambda or Logs Insights instead of metric filters plus alarms.

How to eliminate wrong answers

Option A is wrong because S3 event notifications fire on object creation events, not on log content, and CloudWatch Logs does not necessarily deliver logs to S3 in a way that supports per-message alerting. Option B is wrong because subscribing a Lambda function to a log group requires writing and maintaining custom code, which is more complex than a metric filter and alarm. Option D is wrong because Logs Insights queries are ad hoc and must be run manually or scheduled via additional tooling; they do not natively push email alerts and are not the simplest solution.

137
MCQeasy

A company runs a serverless application using AWS Lambda functions that process messages from an Amazon SQS queue. The company wants to improve the reliability of message processing by ensuring that failed messages are not lost and can be reprocessed later. Which solution should a solutions architect recommend?

A.Increase the visibility timeout of the SQS queue to allow more time for Lambda to process messages.
B.Enable long polling on the SQS queue to reduce the number of empty responses.
C.Configure a dead-letter queue (DLQ) for the source SQS queue and set a maximum receive count.
D.Use an Amazon SNS topic to fan out messages to multiple SQS queues for redundancy.
AnswerC

A dead-letter queue captures messages that fail processing after a specified number of receives, preventing them from being lost. The messages can be analyzed and reprocessed later. This is a standard SQS feature that improves reliability without application changes.

Why this answer

Configuring a dead-letter queue on the source SQS queue ensures that messages that repeatedly fail processing are moved to a separate queue for later analysis and reprocessing. This prevents message loss and is a built-in reliability feature of SQS.

Exam trap

The trap here is confusing visibility timeout or long polling with failure handling, when only a dead-letter queue can capture and retain failed messages.

138
MCQhard

A company has a monolithic application running on a single Amazon EC2 instance. The application consists of a web server and a backend worker process. The company wants to migrate to a microservices architecture using containers on Amazon ECS with Fargate. The solutions architect needs to design a solution that minimizes downtime during the migration. Which approach should the solutions architect recommend?

A.Create a Docker image of the entire monolithic application and run it on ECS with Fargate.
B.Use a strangler fig pattern: gradually replace parts of the monolith with microservices, routing traffic via an Application Load Balancer.
C.Run the monolithic application on the same EC2 instance as the new microservices, using different ports.
D.Refactor the entire application into microservices, then deploy all microservices at once on ECS.
AnswerB

The strangler fig pattern incrementally extracts functionality from the monolith into ECS Fargate microservices, with an Application Load Balancer routing requests between old and new components. This satisfies the minimise-downtime constraint, since both run concurrently and traffic shifts progressively, avoiding a disruptive big-bang cutover.

Why this answer

The strangler fig pattern incrementally replaces monolith functionality with microservices while keeping the monolith running, routing traffic between old and new components via a load balancer. This allows gradual cutover, rollback capability, and near-zero downtime — exactly what the question asks for. It is the industry-standard approach for low-risk monolith-to-microservices migration.

Exam trap

SAP-C02 often tests whether candidates recognize that 'minimize downtime' and 'microservices' together rule out big-bang refactors and lift-and-shift containerization — the trap is picking the option that sounds fastest (containerize everything at once) rather than the one that is safest and incremental.

How to eliminate wrong answers

Option A is wrong because containerizing the entire monolith as-is does not achieve a microservices architecture — it just lifts and shifts the same monolithic design, failing the stated goal. Option C is wrong because running the monolith and microservices on the same EC2 instance couples their fate (shared failure domain, resource contention) and does not provide a clean migration path or high availability. Option D is wrong because a big-bang refactor and simultaneous deployment of all microservices maximizes risk, requires extensive upfront work, and typically causes significant downtime if anything fails.

139
MCQeasy

A company is using AWS CloudTrail to log all API activity. The security team wants to be alerted when an IAM user creates a new access key. What is the simplest way to achieve this?

A.Configure an S3 event notification on the CloudTrail log bucket to trigger a Lambda function.
B.Set up a CloudTrail trail with log file validation enabled.
C.Use AWS Config to create a rule that checks for access keys.
D.Create an Amazon EventBridge rule that matches the 'CreateAccessKey' API call and sends an SNS notification.
AnswerD

EventBridge natively ingests CloudTrail management events and pattern-matches on the `CreateAccessKey` API call, triggering an SNS notification without custom code or log parsing. This satisfies the stem's requirement for the simplest alerting mechanism, since CloudTrail already delivers the event stream EventBridge consumes.

Why this answer

Amazon EventBridge natively integrates with CloudTrail to receive API call events in near real-time. By creating an EventBridge rule that matches the 'CreateAccessKey' event source and detail-type, you can route the event directly to an SNS topic for alerting. This is the simplest, most direct, and serverless approach, requiring no custom code or additional services beyond the rule and SNS topic.

Exam trap

SAP-C02 often tests the distinction between real-time event-driven alerting (EventBridge) and batch/log-based processing (S3 notifications, Config rules), so candidates may incorrectly choose S3 event notifications or AWS Config due to familiarity with those services.

How to eliminate wrong answers

Option A is wrong because S3 event notifications trigger on object-level operations (e.g., PutObject) and would require a custom Lambda function to parse CloudTrail log files, adding unnecessary complexity and latency. Option B is wrong because log file validation only ensures log integrity (detecting tampering) and does not provide any alerting or event-driven capability. Option C is wrong because AWS Config rules evaluate resource configurations for compliance and are not designed for real-time API call alerting; they also typically require a custom rule or Lambda, making it less simple.

140
MCQmedium

A company runs a critical web application on EC2 instances behind an ALB. The application stores session data in an ElastiCache Redis cluster. During a recent outage, the Redis cluster failed and all active sessions were lost, causing users to be logged out. Which solution would provide the HIGHEST availability for session data?

A.Enable Cluster Mode and deploy Redis in Multi-AZ with replicas.
B.Deploy a single-node Redis cluster with automatic backups.
C.Disable Redis persistence to improve performance.
D.Use a larger Redis instance type to handle more connections.
AnswerA

Multi-AZ with replicas provides automatic failover and high availability.

Why this answer

Enabling ElastiCache Redis Cluster Mode with Multi-AZ and replicas provides the highest availability because data is sharded across multiple nodes, each with one or more replicas in different AZs. If a primary node or AZ fails, ElastiCache automatically promotes a replica, preserving session data and minimizing downtime. This eliminates the single point of failure that caused the outage.

Exam trap

SAP-C02 often tests the difference between high availability (Multi-AZ with automatic failover) and durability (backups/persistence), so candidates who pick 'automatic backups' as an HA solution confuse backup/restore with failover.

How to eliminate wrong answers

Option B is wrong because a single-node Redis cluster, even with backups, has no automatic failover — a node failure causes downtime and data loss until a manual restore, which is not high availability. Option C is wrong because disabling persistence reduces durability and does not improve availability; it actually increases the risk of data loss on failure. Option D is wrong because a larger instance type only increases capacity and does not address redundancy or failover, so a failure still causes an outage.

141
MCQhard

A company is migrating a monolithic application to microservices on Amazon ECS. The application uses a legacy database that does not support distributed transactions. The team wants to ensure data consistency across services. Which solution is BEST for achieving eventual consistency with minimal code changes?

A.Use Amazon DynamoDB transactions across all services.
B.Modify the legacy database to support two-phase commit.
C.Use Amazon SQS to queue all database writes and process them sequentially.
D.Implement the Saga pattern using AWS Step Functions.
AnswerD

Step Functions can orchestrate a saga, handling failures and compensating transactions.

Why this answer

The Saga pattern coordinates a sequence of local transactions across microservices, with compensating transactions to roll back on failure, achieving eventual consistency without distributed transactions. AWS Step Functions is the managed orchestration service that implements Saga with minimal custom code — you define the state machine in Amazon States Language and Step Functions handles retries, compensation, and state tracking. This is the AWS-recommended approach for eventual consistency in microservices.

Exam trap

The trap is reaching for a database-level solution (DynamoDB transactions, two-phase commit) when the problem explicitly involves a legacy database that cannot participate — candidates must recognize that Saga is the only pattern that works across heterogeneous data stores with minimal code changes.

How to eliminate wrong answers

Option A is wrong because DynamoDB transactions only work within DynamoDB tables (up to 100 items across tables in the same account/region) and cannot wrap the legacy database, so they cannot provide consistency across services that write to the legacy DB. Option B is wrong because modifying a legacy database to support two-phase commit is a massive, risky change that contradicts the 'minimal code changes' requirement and is often impossible with commercial off-the-shelf legacy systems. Option C is wrong because queuing all writes to a single SQS queue and processing them sequentially creates a bottleneck, does not provide compensating transactions for partial failures, and does not address consistency across services that each own their own data store.

142
MCQmedium

A company has a web application that uses an Amazon RDS for PostgreSQL database. The database is experiencing high read traffic, and the application is seeing increased latency. The database is currently a Single-AZ deployment with a db.r5.2xlarge instance. The company wants to improve read performance and also increase availability with minimal application changes. Which solution should a solutions architect recommend?

A.Enable Amazon RDS Performance Insights to identify and optimize slow queries.
B.Migrate the database to Amazon Aurora PostgreSQL with a reader endpoint and update the application to use the reader endpoint for read queries.
C.Create a read replica of the RDS instance and modify the application to direct read queries to the read replica endpoint.
D.Convert the RDS instance to a Multi-AZ deployment and create a read replica in a different Availability Zone.
AnswerC

Creating a read replica offloads read traffic from the primary database, improving read performance. Modifying the application to use the read replica endpoint for read queries is a standard pattern and requires minimal changes if the application uses a separate connection for reads. This also improves availability because the read replica can be promoted if the primary fails.

Why this answer

Adding a read replica to the existing RDS instance and directing read queries to it offloads read traffic and improves performance. This requires minimal application changes—just pointing read queries to the replica endpoint. It also enhances availability because the replica can be promoted.

Other options either do not serve reads, require more changes, or involve migration.

Exam trap

The trap here is confusing Multi-AZ with read scaling; Multi-AZ provides failover, not read capacity, and Performance Insights only monitors.

143
MCQhard

Refer to the exhibit. A company uses this IAM policy to allow an automation script to manage Amazon EBS snapshots. The script runs on an EC2 instance with this attached IAM role. The script is failing when trying to create a snapshot from a volume and tag it. The error message indicates an authorization failure. What is the root cause?

A.The policy does not grant permission to call ec2:DescribeSnapshots, which is required before creating a snapshot.
B.The policy lacks a condition key to restrict the snapshot creation to specific volumes.
C.The policy does not grant permission to call ec2:CreateSnapshot on the volume resource.
D.The policy does not include ec2:CreateTags for the volume, only for snapshots.
AnswerC

CreateSnapshot requires permission on the volume (e.g., arn:aws:ec2:region:account:volume/*) and optionally on the snapshot.

Why this answer

The error occurs because the IAM policy grants `ec2:CreateSnapshot` only on the `arn:aws:ec2:*::snapshot/*` resource, but the API call to create a snapshot also requires permission on the source volume resource (`arn:aws:ec2:*:*:volume/*`). Without that volume-level permission, the request fails with an authorization error, even though the snapshot-level permission is present.

Exam trap

The trap here is that candidates assume only the target snapshot resource needs permission, but AWS requires explicit authorization on the source volume resource for the `ec2:CreateSnapshot` action.

How to eliminate wrong answers

Option A is wrong because `ec2:DescribeSnapshots` is a read-only action and is not required before creating a snapshot; the failure is due to missing resource-level permissions, not a missing read action. Option B is wrong because the policy does not include any condition keys, but the absence of a condition key is not the root cause—the core issue is the missing volume resource in the `ec2:CreateSnapshot` action. Option D is wrong because the policy does include `ec2:CreateTags` on the snapshot resource (`arn:aws:ec2:*::snapshot/*`), and the error is about creating the snapshot itself, not tagging it.

144
Multi-Selecteasy

A company is migrating a legacy application to AWS. The application requires a relational database with high availability and automated backups. Which TWO AWS services should the company consider? (Choose two.)

Select 2 answers
A.Amazon Redshift
B.Amazon RDS with Multi-AZ deployment
C.Amazon ElastiCache
D.Amazon DynamoDB
E.Amazon Aurora
AnswersB, E

Amazon RDS with Multi-AZ deployment provisions a synchronous standby replica in a second Availability Zone, with automatic failover, satisfying the high availability requirement. RDS also handles automated backups and point-in-time recovery natively, meeting the backup constraint without custom scripting or additional services.

Why this answer

Amazon RDS with Multi-AZ deployment (B) is correct because it provides a relational database engine with a synchronous standby replica in a different Availability Zone for automatic failover and high availability, plus automated backups with point-in-time recovery. Amazon Aurora (E) is also correct because it is a MySQL- and PostgreSQL-compatible relational database that stores data across multiple Availability Zones, supports automated backups and point-in-time recovery, and offers high availability through replicas and failover. Amazon Redshift (A) is a data warehousing service optimized for analytics, not a general-purpose relational database for a legacy application.

Amazon ElastiCache (C) is an in-memory caching service (Redis or Memcached), not a relational database. Amazon DynamoDB (D) is a NoSQL key-value and document database, so it does not meet the requirement for a relational database.

145
MCQeasy

Refer to the exhibit. An AWS Lambda function logs the error above. The function uses the AWS SDK to call an Amazon DynamoDB table. What is the MOST likely cause?

A.The Lambda function timed out while waiting for a response.
B.The DynamoDB table specified in the function does not exist.
C.The Lambda function does not have permission to access DynamoDB.
D.The DynamoDB table is throttling requests.
AnswerB

DynamoDB returns ResourceNotFoundException when the SDK targets a table name that does not exist in that region or account. The function's request therefore fails before any read or write occurs, matching the logged error more directly than permission or throttling causes.

Why this answer

The error shown in the exhibit is a ResourceNotFoundException from DynamoDB, which indicates that the table specified in the function's request does not exist. This is the most likely cause when the SDK call fails with that specific exception, as opposed to permission or throttling errors.

Exam trap

SAP-C02 often tests the ability to distinguish DynamoDB error types — candidates may pick permissions or throttling without noting that ResourceNotFoundException specifically means the table does not exist.

How to eliminate wrong answers

Option A is wrong because a Lambda timeout would produce a Task timed out error, not a DynamoDB ResourceNotFoundException. Option C is wrong because missing permissions would result in an AccessDeniedException or UnrecognizedClientException, not ResourceNotFoundException. Option D is wrong because throttling produces a ProvisionedThroughputExceededException or ThrottlingException, not a ResourceNotFoundException.

146
Multi-Selectmedium

Which TWO actions would improve the security of an S3 bucket that contains sensitive data? (Choose two.)

Select 2 answers
A.Enable S3 Server Access Logging.
B.Enable default encryption (SSE-S3).
C.Enable S3 Block Public Access.
D.Enable S3 Versioning.
E.Configure S3 Lifecycle to expire objects.
AnswersB, C

SSE-S3 applies AES-256 encryption at rest automatically to every object written to the bucket, so sensitive data is protected even if callers omit encryption headers. This satisfies the question's security requirement without depending on client behaviour or key management overhead.

Why this answer

Option B is correct because enabling default encryption with SSE-S3 ensures that all objects written to the bucket are automatically encrypted at rest using AES-256, protecting sensitive data even if the underlying storage media is compromised. Option C is correct because S3 Block Public Access overrides any bucket or object ACLs and bucket policies that would otherwise grant public access, preventing accidental exposure of sensitive data. Option A is not correct because Server Access Logging only records requests for auditing purposes; it does not itself restrict access or encrypt data.

Option D is not correct because Versioning preserves multiple variants of objects, which aids recovery but does not improve confidentiality or access control. Option E is not correct because Lifecycle expiration deletes objects after a set period, which is a cost or retention control rather than a security hardening measure.

147
MCQeasy

A company wants to reduce costs for its Amazon RDS for MySQL database without affecting performance. The database is used by a read-intensive application. Which action should the company take?

A.Change the DB instance to a Multi-AZ deployment.
B.Upgrade to the latest generation instance type.
C.Implement a Read Replica and direct read traffic to it.
D.Purchase Reserved Instances for the database.
AnswerC

Read Replicas offload read queries from the primary MySQL instance via asynchronous replication, so the read-intensive application's traffic no longer competes with writes on the primary. This reduces load and cost without degrading performance, satisfying the no-impact constraint.

Why this answer

Implementing a Read Replica allows offloading read traffic from the primary DB instance. This reduces the load on the primary, potentially enabling the use of a smaller instance size or lowering provisioned IOPS, thereby reducing costs without affecting performance for the read-intensive application. Option A is incorrect because Multi-AZ deployment adds a standby instance and synchronous replication, increasing costs without direct performance benefit.

Option B is incorrect; upgrading to the latest generation instance type may improve performance but generally does not reduce costs. Option D is incorrect; purchasing Reserved Instances provides a discount on hourly rates but does not address the utilization or instance size, so it does not directly reduce costs based on workload.

148
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. Users report intermittent 503 errors. CloudWatch logs show the ALB's healthy host count occasionally drops to zero during traffic spikes. Which design change should a solutions architect implement to improve availability?

A.Enable EC2 instance refresh for the Auto Scaling group.
B.Increase the size of the Auto Scaling group and adjust scaling policies.
C.Purchase Reserved Instances for the existing EC2 fleet.
D.Replace the ALB with a larger Network Load Balancer.
AnswerB

The healthy host count hitting zero means capacity is exhausted before new instances register. Enlarging the Auto Scaling group and tuning its policies keeps sufficient healthy targets behind the ALB during spikes, preventing the 503s caused by having no available backend.

Why this answer

The ALB's healthy host count dropping to zero during traffic spikes indicates the Auto Scaling group cannot provision enough healthy instances fast enough to handle the load, causing the ALB to return 503 errors. Increasing the group size (raising the minimum/desired capacity) and tuning scaling policies (lower thresholds, shorter cooldowns, larger step adjustments) ensures more instances are available and scale-out happens sooner, improving availability.

Exam trap

The trap is picking a cost or deployment option (Reserved Instances, instance refresh) when the symptom — healthy host count dropping to zero — clearly points to a capacity and scaling responsiveness problem.

How to eliminate wrong answers

Option A is wrong because EC2 instance refresh replaces instances with the latest launch template configuration — it is a deployment/update mechanism, not a capacity or scaling solution, and would not prevent healthy host count from dropping during spikes. Option C is wrong because purchasing Reserved Instances is a billing optimization that reduces cost for steady-state usage; it does not add capacity or improve scaling responsiveness during traffic spikes. Option D is wrong because replacing the ALB with a Network Load Balancer does not address the root cause — the backend EC2 fleet is under-provisioned; NLB operates at layer 4 and would not fix insufficient healthy targets, and ALB is already appropriate for HTTP workloads.

149
MCQeasy

A company uses AWS Lambda functions to process events from Amazon S3. They notice that some Lambda invocations are failing with 'ResourceNotFoundException' errors when trying to write to an Amazon DynamoDB table. The Lambda execution role has a policy that grants dynamodb:PutItem on the table. What is the most likely cause of these errors?

A.The Lambda function is using the wrong AWS credentials.
B.The Lambda function is in a VPC without a DynamoDB VPC endpoint.
C.The DynamoDB table is in a different AWS account and the Lambda role does not have cross-account access.
D.The DynamoDB table name is misspelled in the Lambda code.
AnswerD

Correct. A misspelled table name in the Lambda code causes DynamoDB to return 'ResourceNotFoundException' because the specified table does not exist in the account and region. This is the most likely cause given the error message.

Why this answer

A 'ResourceNotFoundException' from DynamoDB means the API call reached DynamoDB successfully but the table name in the request did not resolve to an existing table in the caller's account/region. Because the execution role already grants dynamodb:PutItem, the failure is not authorization-related — it is a resource-resolution problem, and a misspelled table name in the Lambda code is the classic cause. The error is returned by the DynamoDB service itself, which confirms the request was authenticated and authorized.

Exam trap

SAP-C02 often tests the distinction between ResourceNotFoundException (resource name/region mismatch) and AccessDeniedException (IAM/permission failure) — candidates see 'Lambda' and 'DynamoDB' and jump to VPC endpoint or IAM issues instead of reading the error code literally.

How to eliminate wrong answers

Option A is wrong because using the wrong AWS credentials would produce an AccessDeniedException or UnrecognizedClientException, not ResourceNotFoundException — Lambda always uses the execution role unless the code explicitly assumes another role. Option B is wrong because a VPC without a DynamoDB gateway endpoint would cause a network timeout or connection error, not a ResourceNotFoundException, since the request would never reach the DynamoDB endpoint. Option C is wrong because cross-account access failures manifest as AccessDeniedException on the resource ARN, and the question states the role already has PutItem permission on the table, implying same-account access.

150
MCQhard

A company runs a microservices application on Amazon ECS with the Fargate launch type. The application uses an Application Load Balancer (ALB) to distribute traffic. During a recent incident, one service became unresponsive, but the ALB continued to send traffic to it because the health check only verified that the container was running. The company wants to improve the health check to detect application-level failures and automatically replace unhealthy tasks. Which solution should a solutions architect recommend?

A.Increase the ALB health check timeout and unhealthy threshold to give the application more time to recover.
B.Enable ECS container health checks by adding a HEALTHCHECK instruction to the Dockerfile, and rely on ECS to replace unhealthy tasks.
C.Configure the ALB health check to use a custom path that returns a 200 OK only when the application is fully functional, and set the health check interval and thresholds appropriately.
D.Use AWS App Mesh to implement outlier detection and eject unhealthy tasks from the load balancing pool.
AnswerC

A custom health check path allows the ALB to verify application-level health, not just that the container is running. By returning a 200 OK only when dependencies are available and the service is ready, the ALB can detect failures and stop routing traffic to unhealthy tasks. Adjusting intervals and thresholds ensures timely detection and replacement.

Why this answer

Configuring the ALB health check to use a custom path that reflects application health ensures that only fully functional tasks receive traffic. This is a straightforward and effective way to detect application-level failures without introducing additional components. It leverages existing ALB features and integrates with ECS task replacement.

Exam trap

The trap here is assuming that container-level health checks or increased timeouts can detect application-level failures, when they only check process liveness.

← PreviousPage 2 of 4 · 228 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Continuous Improvement for Existing Solutions questions.