Courseiva

CCNA Continuous Improvement for Existing Solutions Questions

75 of 410 questions · Page 3/6 · Continuous Improvement for Existing Solutions · Answers revealed

151
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

Correct. CodePipeline includes a native manual approval action that integrates with SNS for notifications.

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.

152
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

When max tasks is reached and CPU is high, tasks may be overwhelmed; also, if health check grace period is too short, new tasks may be considered unhealthy and dropped.

Why this answer

When ECS tasks scale out to the maximum allowed, the ALB may still return 503 errors if the new tasks are not yet registered as healthy (health check grace period or delayed registration) or if the existing tasks are already overwhelmed. The scaling policy reached its maximum, but the tasks cannot handle the traffic, leaving the ALB with no healthy targets to serve requests. Option B is incorrect because target tracking scaling policies typically respond within minutes, but the issue here is that the maximum number of tasks was reached and CPU remained high, not that scaling was too slow.

Option C is incorrect because ENI limits for Fargate tasks are per-task and unlikely to cause ALB 503 errors. Option D is incorrect because ALB connection limits are very high and rarely the bottleneck; the error stems from lack of healthy targets.

153
MCQmedium

A company uses AWS Elastic Beanstalk to deploy a web application. They want to update the environment's configuration to use a larger instance type without any downtime. Which update policy supports this?

A.All at once
B.Blue/Green
C.Immutable
D.Rolling
AnswerD

Rolling update updates instances in batches, ensuring the environment remains available throughout the process.

Why this answer

(Rolling) is correct because Rolling update with batch size updates instances in batches, keeping the environment running and avoiding downtime. Option A is wrong because All at once replaces all instances simultaneously, causing downtime. Option B is wrong because Blue/Green is not a built-in Elastic Beanstalk update policy; it's a manual approach.

Option C is wrong because Immutable update launches new instances in a separate ASG and then swaps, which causes a brief downtime during the swap.

154
Multi-Selecteasy

A company uses AWS CloudFormation to deploy infrastructure. The operations team wants to implement a change management process that requires approval before stack updates can proceed. Which TWO approaches can achieve this?

Select 2 answers
A.Use AWS CloudFormation StackSets to deploy updates across multiple accounts.
B.Create a service role with specific IAM policies and require that updates be initiated with that role.
C.Manually review all template changes before uploading to S3.
D.Configure a stack policy to prevent updates to critical resources.
E.Use CloudFormation change sets to review proposed changes before executing them.
AnswersB, E

By controlling who can assume the service role, you can enforce approval workflows.

Why this answer

Options B and E are correct. Using a service role with specific IAM policies (B) ensures that only authorized roles can initiate stack updates, enforcing an approval workflow. CloudFormation change sets (E) allow the operations team to review proposed changes before executing them, providing a mechanism for approval.

Option A is incorrect because StackSets are used for deploying across multiple accounts and regions, not for approval workflows. Option C is incorrect because manually reviewing template changes before uploading to S3 is not a built-in CloudFormation mechanism for change management. Option D is incorrect because stack policies protect specific resources from being updated or deleted, but they do not enforce an approval process for updates.

155
Multi-Selecteasy

A company uses AWS CodeCommit to store source code and CodePipeline for CI/CD. The pipeline includes a build stage using CodeBuild and a deploy stage to Elastic Beanstalk. The team wants to add a manual approval step before deployment to production. Which THREE resources are needed? (Choose three.)

Select 3 answers
A.An approval action in the CodePipeline stage.
B.A CloudWatch Events rule to trigger the approval action.
C.An IAM role for CodePipeline to publish to the SNS topic.
D.An AWS Lambda function to process approval requests.
E.An Amazon SNS topic to send approval notifications.
AnswersA, C, E

Required for manual approval.

Why this answer

To add a manual approval step before deployment to production, you need: an approval action in the CodePipeline stage (A), an Amazon SNS topic to send approval notifications (E), and an IAM role for CodePipeline to publish to the SNS topic (C). The approval action pauses the pipeline and sends a notification via SNS. A CloudWatch Events rule (B) is not required because the approval action itself triggers the notification, not an event.

An AWS Lambda function (D) is not needed because the approval process is handled natively by CodePipeline with SNS.

156
MCQeasy

A company is using AWS Lambda functions to process files uploaded to an S3 bucket. Recently, the processing time has increased significantly. A solutions architect notices that the Lambda functions are using the default VPC configuration. What is the MOST likely cause of the performance degradation?

A.Lambda function is using too much memory.
B.Lambda function is attached to a VPC, causing network latency for S3 API calls.
C.S3 bucket has versioning enabled, causing extra overhead.
D.S3 bucket is in a different region.
AnswerB

Lambda in a VPC uses ENIs and routes through NAT for internet access, adding latency.

Why this answer

Lambda functions in a VPC use an Elastic Network Interface (ENI) in a private subnet, which can add latency for internet-bound requests. Options A, C, and D do not directly cause increased processing time.

157
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 allows multiplexing, reducing latency and improving throughput.

Why this answer

Options A and D are correct. Option A: Enabling HTTP/2 on the ALB reduces latency through multiplexing and connection reuse. Option D: Using a predictive scaling policy helps prepare for traffic spikes by scaling based on forecasted demand.

Option B is incorrect because increasing the cooldown period delays scaling response. Option C is incorrect because using larger instances is vertical scaling, which does not improve horizontal scalability and may increase cost. Option E is incorrect because increasing the health check interval delays detection of unhealthy instances.

158
MCQmedium

A company uses AWS Lambda functions to process orders. Recently, some orders have been lost due to Lambda throttling. The operations team wants to implement a solution to capture failed invocations and retry them. What is the MOST reliable approach?

A.Enable CloudWatch Logs for Lambda and create a metric filter to trigger an alarm.
B.Use Amazon EventBridge to capture Lambda errors and route them to a recovery function.
C.Configure an SQS queue as the Lambda event source with a dead-letter queue for failed messages.
D.Publish failed invocation details to an SNS topic and subscribe a Lambda function to process them.
AnswerC

SQS provides reliable message delivery and retries; dead-letter queue captures messages that exceed retry attempts.

Why this answer

An SQS queue configured as a Lambda event source provides reliable invocation with retry logic, and a dead-letter queue (DLQ) captures messages that fail after all retries, preventing loss. Option A is wrong because CloudWatch Logs capture logs but do not capture or retry failed invocations. Option B is wrong because EventBridge can capture errors but does not provide built-in retry or a DLQ for Lambda throttling.

Option D is wrong because SNS publishes messages but does not store them for retry; if the subscriber fails, the message is lost unless additional mechanisms are implemented.

Exam trap

Candidates often confuse EventBridge with SQS for managing retries, but SQS with a DLQ is the standard pattern for reliable invocation and failure handling in Lambda.

159
MCQhard

A company is migrating a legacy monolithic application to AWS. They plan to use Amazon ECS with Fargate for containerized microservices. The application requires sticky sessions and SSL termination. What should the company use to meet these requirements?

A.Network Load Balancer (NLB) with target group stickiness.
B.Application Load Balancer (ALB) with stickiness and SSL termination.
C.Classic Load Balancer (CLB) with SSL termination at the instance.
D.AWS Lambda with API Gateway.
AnswerA

NLB supports TLS termination and sticky sessions via target group stickiness (source IP affinity). This makes it a valid option for the requirements.

Why this answer

Network Load Balancer (NLB) supports TLS termination at the listener level and provides sticky sessions through target group stickiness (source IP affinity). This meets the requirements for containerized microservices on Amazon ECS with Fargate. Application Load Balancer (ALB) also supports sticky sessions and SSL termination, but NLB is more cost-effective for high-throughput scenarios and works well with Fargate.

Options C and D are incorrect because Classic Load Balancer is legacy and lacks advanced features, while AWS Lambda with API Gateway is not a load balancer and cannot directly provide sticky sessions.

Exam trap

Many assume that only ALB can provide sticky sessions and SSL termination. However, NLB supports both: TLS termination at the listener and target group stickiness via source IP. NLB is often the better choice for performance-sensitive workloads.

160
MCQhard

A company has a multi-account AWS environment using AWS Organizations. The security team needs to ensure that all S3 buckets across all accounts are encrypted with AWS KMS. The team wants to automatically remediate any non-compliant buckets created in the future. Which solution is MOST effective and requires the least ongoing maintenance?

A.Use AWS Config rules with auto-remediation using SSM Automation.
B.Use an AWS Lambda function triggered by S3 bucket creation events to enable encryption.
C.Enable AWS CloudTrail and create a metric filter to alert on non-encrypted bucket creation.
D.Apply a service control policy (SCP) that denies s3:PutBucketEncryption actions unless encryption is set.
AnswerD

This option uses a service control policy (SCP) to deny the s3:PutBucketEncryption action unless encryption is set. This proactively prevents the creation of non-compliant buckets and requires minimal ongoing maintenance.

Why this answer

A service control policy (SCP) can proactively deny the creation of S3 buckets without encryption, enforcing compliance across all accounts before any non-compliant bucket is created. Option A is incorrect because AWS Config rules with SSM Automation remediate after the fact, introducing a delay and relying on detection, not prevention. Option B is incorrect because an AWS Lambda function triggered by S3 bucket creation events reacts to the creation event but does not prevent the bucket from being created unencrypted; it only attempts to enable encryption after creation, which may not always work seamlessly.

Option C is incorrect because CloudTrail and metric filters only provide alerts after the non-compliant bucket is created, offering no automated remediation or prevention.

161
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.

162
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

Creating an RDS read replica distributes read queries to a separate instance, directly reducing ReadIOPS on the primary and improving read performance with minimal overhead.

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.

163
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

Canary deployments allow early detection and rollback if errors increase.

Why this answer

Implement canary deployments using AWS CodeDeploy to shift traffic gradually and monitor error rates. This allows a gradual rollout, reducing blast radius, and enables quick rollback by stopping traffic to unhealthy instances. Option D: Use AWS Elastic Beanstalk to perform a blue/green deployment, swapping the environment URL after testing.

This provides a full rollback by swapping back to the old environment. Option A (lifecycle hooks) is for custom actions during instance lifecycle, not for rollback of deployments. Option C (CloudFormation change sets) allows previewing changes but does not automatically roll back on failure.

Option E (CloudTrail) is for auditing API calls, not for deployment rollback.

164
MCQeasy

A company uses AWS Lambda functions to process files uploaded to an S3 bucket. The processing time varies, but some files fail with a timeout error. The function has the default timeout setting. What is the MOST cost-effective way to resolve this issue?

A.Increase the memory allocation for the Lambda function.
B.Use an SQS queue to buffer the S3 events.
C.Use AWS Step Functions to orchestrate the processing.
D.Increase the Lambda function timeout.
AnswerD

Increasing timeout allows the function to run longer without timing out.

Why this answer

The default Lambda timeout is 3 seconds, which is insufficient for processing that can take longer. Increasing the timeout allows the function to complete without incurring additional costs. Option A is wrong because increasing memory also increases cost and does not directly address timeouts; it may improve performance but at higher cost.

Option B is wrong because SQS buffering does not resolve timeout issues; it only decouples event sources. Option C is wrong because Step Functions add complexity and cost; a simpler solution is to adjust the timeout.

165
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

Correct. The bucket and all its objects are retained due to DeletionPolicy: Retain.

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.

166
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

Restricts direct access.

Why this answer

Using CloudFront Origin Access Control (OAC) restricts access to the S3 bucket so that only the CloudFront distribution can access objects. The bucket policy must be updated to grant CloudFront access. Option B is incorrect because S3 Object Ownership does not restrict access.

Option C is incorrect because allowing public read access would enable direct S3 access. Option D is incorrect because CloudFront key pairs and signed URLs control access through CloudFront but do not prevent direct S3 bucket access.

167
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

To improve performance and optimize the serverless application, the team should take the following actions: Optimize DynamoDB queries by using global secondary indexes and reducing the number of separate queries (Option A). This reduces query latency and the number of round trips. Configure DynamoDB auto scaling (Option B) to adjust read and write capacity based on demand, ensuring sufficient throughput during peak hours without over-provisioning.

Enable Amazon DynamoDB Accelerator (DAX) for read-heavy workloads (Option E) to provide in-memory caching for DynamoDB, significantly reducing read latency. Using Amazon ElastiCache for Redis (Option C) is an external caching solution that adds operational complexity and is not directly optimized for DynamoDB integration; DAX is the recommended DynamoDB caching service. Implementing Lambda function warmers (Option D) addresses cold starts but does not improve DynamoDB query performance.

168
MCQhard

A media company uses S3 for storing video files and CloudFront for distribution. They implemented a Lambda@Edge function to add copyright headers. After deployment, some users report that older videos still lack the headers. What is the most likely reason?

A.The Lambda@Edge function is not triggered for viewer request events.
B.The CloudFront behavior for older videos does not include the Lambda function association.
C.The S3 bucket policy denies access to the Lambda function.
D.The videos are cached in CloudFront and the function runs only on cache misses.
AnswerB

If the distribution has multiple behaviors (e.g., based on path pattern), the function may only be associated with the behavior for newer videos.

Why this answer

Lambda@Edge functions are associated with specific CloudFront behaviors. If the function is only associated with certain behaviors (e.g., based on path pattern or cache behavior), older videos served under a different behavior that does not include the Lambda function association will not have the copyright headers added. Option B correctly identifies this as the most likely reason.

Option A is incorrect because the function could be triggered for viewer request events but still not apply to all videos if not associated with all behaviors. Option C is irrelevant because S3 bucket policies do not affect Lambda@Edge execution. Option D is incorrect because the function runs on every request regardless of cache hit/miss; caching does not prevent the function from executing.

169
MCQhard

A company has a legacy application that runs on an EC2 instance with a large attached EBS volume. The application writes log files to the volume, and the volume is frequently full, causing application errors. The Solutions Architect needs to implement a solution to automatically manage disk space without application changes. Which solution meets these requirements?

A.Configure an S3 Lifecycle policy to transition log files to Amazon S3 Glacier after 30 days.
B.Increase the EBS volume size and enable auto-scaling.
C.Use a script with Amazon Data Lifecycle Manager to snapshot the volume and delete old snapshots.
D.Install the CloudWatch Logs agent and stream logs to CloudWatch Logs, then delete local logs.
AnswerD

The CloudWatch Logs agent can stream logs to CloudWatch Logs and then delete local log files, freeing disk space without application changes. This meets the requirement.

Why this answer

The CloudWatch Logs agent can be installed to stream existing log files to CloudWatch Logs without modifying the application. After streaming, the agent can be configured to delete local log files to free disk space. This directly addresses the requirement to automatically manage disk space without application changes.

Option C is incorrect because Amazon Data Lifecycle Manager (DLM) automates the creation and deletion of EBS snapshots, not the management of disk space within the volume. It does not delete log files or otherwise free in-volume space.

170
MCQmedium

A company uses AWS CloudFormation to deploy a stack that includes an Amazon RDS MySQL instance. The stack template defines the DBInstanceClass as db.t3.medium. After deployment, the database performance is insufficient for the workload. The company wants to change the instance class to db.r5.large without recreating the database. What should they do?

A.Create a new stack with the new instance class and migrate the data.
B.Use AWS Database Migration Service to perform a blue/green deployment.
C.Delete the stack and create a new one with the new instance class.
D.Update the CloudFormation stack with the new instance class and apply the change.
AnswerD

CloudFormation will modify the DB instance in-place with minimal downtime.

Why this answer

You can update the CloudFormation stack with a new DBInstanceClass value, and CloudFormation will modify the RDS instance to the new class. RDS supports modifying the DB instance class without recreating the database, although a brief downtime may occur. Option A is wrong because creating a new stack and migrating data is unnecessary.

Option B is wrong because AWS DMS is typically used for migrations, not for simple instance class changes; blue/green deployment is not required. Option C is wrong because deleting the stack would destroy the database.

171
MCQmedium

A company deploys the above CloudFormation template. After deployment, an EC2 instance launched in mySubnet can access the internet. However, the instance cannot receive inbound traffic from the internet. What is the MOST likely reason?

A.The subnet does not have auto-assign public IP enabled.
B.No security group or network ACL allows inbound traffic.
C.The VPC does not have an internet gateway attached.
D.The route table does not have a route to the internet gateway.
AnswerB

Inbound traffic is blocked by default.

Why this answer

The template does not configure a security group or network ACL to allow inbound traffic. The route table and internet gateway are correctly set up for outbound traffic. Option A is wrong because the subnet has MapPublicIpOnLaunch: true.

C is wrong because the route exists. D is wrong because the VPC is not missing an internet gateway.

172
MCQeasy

Refer to the exhibit. A company configured an Amazon Route 53 alias record for a domain name pointing to an Application Load Balancer (ALB). Users report that occasionally they are directed to an unhealthy ALB node. Which change should the company make to improve availability?

A.Change the record type to CNAME.
B.Configure the ALB health check to mark unhealthy nodes.
C.Use weighted routing policy.
D.Use multi-value answer routing.
AnswerB

Proper health checks ensure unhealthy nodes are not used.

Why this answer

The issue is that the ALB health check is not properly configured to mark unhealthy nodes. Although the Route 53 alias record has EvaluateTargetHealth set to true, Route 53 relies on the ALB's health check status to determine which targets are healthy. If the ALB health check is misconfigured (e.g., incorrect path, interval, or thresholds), it may not correctly report unhealthy nodes, causing Route 53 to occasionally route traffic to unhealthy nodes.

Therefore, configuring the ALB health check to accurately mark unhealthy nodes (option B) is the direct solution. Option A (CNAME) is unsuitable for apex domains and doesn't provide health checking. Option C (weighted routing) distributes traffic proportionally but doesn't address health.

Option D (multi-value answer routing) is for non-alias records and doesn't improve health checking beyond what alias records with EvaluateTargetHealth already offer.

173
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

CloudWatch Logs agent streams logs directly from EC2 to CloudWatch without code changes.

Why this answer

Installing the CloudWatch Logs agent on each EC2 instance and configuring it to stream log files to CloudWatch Logs centralizes log collection without requiring any changes to the application code. Option A is incorrect because modifying the application to use the AWS SDK to send logs via PutLogEvents API would require code changes. Option B is incorrect because while Amazon Kinesis Agent could be used to send logs to Kinesis Data Firehose and then to S3, this approach is more complex and not the most efficient for simple log centralization from EC2 instances; the CloudWatch Logs agent is purpose-built for this task.

Option C is incorrect because setting up an S3 bucket with a lifecycle policy to transition logs to Glacier does not collect logs; it only manages log storage after they are already in S3, and logs would need to be sent to S3 first.

174
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

CodeDeploy with ECS supports blue/green deployments for minimal downtime.

Why this answer

A blue/green deployment with ECS minimizes downtime by switching traffic gradually. Option A is wrong because migrating all at once risks downtime. Option B is wrong because launching a separate ECS cluster adds complexity.

Option C is wrong because CodeStar is not a deployment strategy.

175
MCQeasy

A company uses AWS Config to record resource changes. The security team wants to be notified when an S3 bucket policy changes to allow public access. What is the most efficient way to achieve this?

A.Create an AWS Config rule that triggers a custom Lambda function to check bucket policies and publish to SNS.
B.Configure S3 event notifications on the bucket to send events to SNS.
C.Set up an AWS Config rule to directly publish to an SNS topic when noncompliant.
D.Enable AWS CloudTrail and create a metric filter for PutBucketPolicy events.
AnswerA

Config rules evaluate resource compliance and can invoke Lambda for remediation or notification.

Why this answer

AWS Config rules can trigger custom Lambda functions to evaluate the S3 bucket policy and publish a notification to SNS if the policy allows public access. Option B is incorrect because S3 event notifications are triggered by object-level events (e.g., PUT, POST), not by policy changes. Option C is incorrect because AWS Config rules cannot directly publish to SNS; they require a Lambda function or other action to send notifications.

Option D is incorrect because CloudTrail logs API calls but does not provide real-time compliance evaluation or direct notification.

176
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 allow you to see what changes will be made and if any resources will be replaced.

Why this answer

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

177
MCQeasy

A company uses AWS Lambda functions to process events from an SQS queue. The Lambda function is configured with a reserved concurrency of 5. The SQS queue has a high volume of messages, and the Lambda function is experiencing throttling errors. What is the most cost-effective solution to reduce throttling?

A.Create multiple Lambda functions each processing a subset of the queue.
B.Decrease the reserved concurrency to force the function to process messages more efficiently.
C.Increase the reserved concurrency for the Lambda function.
D.Increase the batch size of the SQS event source mapping.
AnswerC

This allows more concurrent executions, reducing throttling.

Why this answer

Increasing the reserved concurrency from 5 to a higher value allows the Lambda function to handle more concurrent invocations, directly reducing throttling errors. Option A is incorrect because each Lambda function has its own concurrency limit; adding more functions does not increase the concurrency of a single function. Option B is incorrect because decreasing reserved concurrency would worsen throttling.

Option D is incorrect because increasing the batch size increases the number of messages processed per invocation but does not increase the number of concurrent invocations, so it does not address throttling caused by concurrency limits.

178
MCQhard

Refer to the exhibit. An EC2 instance in subnet-11111 (10.0.1.0/24) cannot access the internet. The route table for the subnet is shown. What is the MOST likely cause?

A.The route table does not have a default route (0.0.0.0/0).
B.The VPC does not have a local route.
C.The route table is not associated with the subnet.
D.The NAT gateway is not in a public subnet with an internet gateway.
AnswerD

NAT gateway requires a public subnet and internet gateway to function.

Why this answer

For an EC2 instance in a private subnet to access the internet via a NAT gateway, the NAT gateway must be deployed in a public subnet (with a route to an internet gateway). Option D correctly identifies that the NAT gateway is not in a public subnet with an internet gateway. Option A is incorrect because the route table does have a default route (0.0.0.0/0) pointing to the NAT gateway.

Option B is incorrect because the VPC has a local route for internal traffic. Option C is incorrect because the route table is associated with the subnet (the exhibit shows the subnet ID). Therefore, the most likely cause is that the NAT gateway itself is in a private subnet, preventing it from reaching the internet.

179
MCQeasy

A company is using Amazon RDS for MySQL and needs to capture slow query logs for performance tuning. The logs must be stored for 30 days for analysis. What is the MOST cost-effective way to achieve this?

A.Enable slow query logging and use an RDS event subscription to send logs to an SQS queue for processing.
B.Enable slow query logging and store logs in an S3 bucket with lifecycle policy to delete after 30 days.
C.Enable slow query logging and store logs on the RDS instance's EBS volume, then take daily snapshots.
D.Enable slow query logging and stream logs to Amazon CloudWatch Logs with a retention policy of 30 days.
AnswerD

RDS can publish logs to CloudWatch Logs, where retention is configurable.

Why this answer

The most cost-effective because Amazon RDS for MySQL can natively publish slow query logs to Amazon CloudWatch Logs with minimal setup. By setting a retention policy of 30 days in CloudWatch Logs, you avoid additional storage costs and complex configurations. Option B is not directly supported; exporting logs to S3 requires extra steps (e.g., via CloudWatch Logs export) and incurs added cost.

Option A adds unnecessary complexity and cost with SQS. Option C is not feasible as RDS does not write slow query logs to EBS by default and snapshotting is not a log management solution.

180
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

Primary instance provides strong consistency.

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.

181
Multi-Selecteasy

A company uses AWS CloudFormation to deploy a multi-tier application. The deployment includes an Application Load Balancer, Auto Scaling group, and Amazon RDS database. The company wants to ensure that updates to the database do not cause downtime. Which TWO strategies should the company use? (Choose two.)

Select 2 answers
A.Enable Multi-AZ on the RDS instance to allow failover during updates.
B.Update the CloudFormation stack directly without creating a new database.
C.Use AWS CloudFormation with a blue/green deployment strategy for the database.
D.Use a read replica to serve traffic during the update.
E.Use a database snapshot to restore the database if the update fails.
AnswersC, E

Blue/green allows you to create a new database and switch traffic.

Why this answer

CloudFormation can use a blue/green deployment strategy, which creates a new database environment (green) alongside the existing one (blue). Traffic is switched after the new environment is ready, minimizing downtime. Option E is correct because taking a database snapshot before updates provides a rollback mechanism in case the update fails.

Option A is wrong: Multi-AZ provides high availability and automatic failover but does not eliminate downtime during updates—it simply recovers quickly after an outage. Option B is wrong: Directly updating the CloudFormation stack without creating a new database may cause downtime if the database must be replaced or modified in place. Option D is wrong: A read replica serves only read traffic; it cannot handle write traffic during database updates, so it does not prevent downtime for write operations.

182
Multi-Selecteasy

A company is using AWS Organizations to manage multiple accounts. The security team wants to enforce that no S3 buckets in any account are publicly accessible. Which TWO services can the team use to achieve this?

Select 2 answers
A.AWS Resource Access Manager
B.AWS WAF
C.AWS IAM Identity Center (SSO)
D.AWS Config
E.AWS Organizations Service Control Policies (SCPs)
AnswersD, E

Can evaluate bucket policies and auto-remediate non-compliant buckets.

Why this answer

AWS Organizations Service Control Policies (SCPs) can deny public access to S3 buckets at the organization or OU level, providing preventive control. AWS Config can be used to detect publicly accessible S3 buckets and trigger remediation (e.g., via auto-remediation or Lambda). Option A is incorrect because AWS Resource Access Manager is for sharing resources, not enforcing security policies.

Option B is incorrect because AWS WAF is a web application firewall, not for S3 bucket access control. Option C is incorrect because AWS IAM Identity Center (SSO) manages user identities and access, not bucket policies.

183
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 allow you to review proposed changes and identify conflicts before execution.

Why this answer

Change sets allow you to preview the changes before execution, helping to identify potential conflicts. Option A is wrong because termination protection prevents accidental deletion but does not address resource conflicts during updates. Option C is wrong because nested stacks are for organizing stacks, not for previewing changes.

Option D is wrong because stack policies protect specific resources from updates, but they don't preview changes or prevent conflicts.

184
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

Tests network paths between resources.

Why this answer

Options D and E are correct. D: VPC Reachability Analyzer helps diagnose network connectivity issues by checking network paths between resources. E: VPC Flow Logs capture IP traffic information for analysis.

A is incorrect because Amazon Inspector is a vulnerability assessment tool, not for network connectivity monitoring. B is incorrect because AWS CloudTrail records API activity, not network traffic. C is incorrect because AWS Config tracks resource configuration changes, not real-time connectivity.

185
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 a firewall for EC2 instances.

Why this answer

Defense in depth involves multiple layers of security. Option D (security groups) acts as a virtual firewall at the instance level, restricting traffic to only necessary ports. Option E (AWS WAF) helps filter common web exploits at the application layer.

Option A (public S3) does not improve security. Option B (public subnets) increases exposure. Option C (direct internet access) bypasses the ALB and security layers.

186
MCQmedium

A company runs a batch processing job on Amazon EMR every night. The job processes data from an S3 bucket and writes results to another S3 bucket. The job currently takes 6 hours to complete. The company wants to reduce the runtime to under 2 hours to meet a new SLA. The data volume is expected to grow by 20% each month. The EMR cluster uses a single master node and 10 core nodes of type m5.xlarge. The job is CPU-bound. What should they do?

A.Change the core node instance type to m5.4xlarge.
B.Use spot instances for the core nodes to reduce costs.
C.Add task nodes with spot instances to the cluster.
D.Increase the number of core nodes in the EMR cluster.
AnswerD

Adding more nodes increases parallelism for CPU-bound tasks, reducing runtime.

Why this answer

Increasing the number of core nodes (horizontal scaling) distributes the CPU workload across more nodes, directly reducing runtime for CPU-bound jobs. With 20% monthly data growth, scaling out provides more headroom than scaling up. Option A (changing to m5.4xlarge) might help but is less cost-effective and may not keep up with growth.

Option B (using spot instances for core nodes) reduces cost but does not address runtime and risks interruptions. Option C (adding task nodes with spot instances) adds compute capacity but spot interruptions can degrade performance, and task nodes lack HDFS storage which might be needed for intermediate data.

187
MCQhard

A company runs a data processing pipeline on AWS using AWS Glue and Amazon Redshift. Recently, the pipeline has been failing due to insufficient memory in the Glue job. The team wants to improve the pipeline to handle larger datasets without manual intervention. Which solution is MOST cost-effective?

A.Enable job bookmarking and configure incremental processing to reduce data volume per run.
B.Use a larger node type for the Amazon Redshift cluster to offload processing.
C.Replace AWS Glue with Amazon EMR and use spot instances for cost savings.
D.Partition the input data in Amazon S3 into more files with smaller sizes.
E.Increase the number of DPUs (Data Processing Units) for the Glue job.
AnswerA

Reduces the amount of data processed each time, preventing memory exhaustion.

Why this answer

The most cost-effective solution is to enable job bookmarking and configure incremental processing. This reduces the data volume processed per run, thereby preventing memory issues without increasing costs. Increasing DPUs (Option E) would linearly increase cost.

Changing Redshift node type (Option B) does not address Glue memory. Replacing Glue with EMR (Option C) adds complexity and may not be more cost-effective. Partitioning input data into more files (Option D) does not directly solve memory issues and can actually increase overhead.

188
MCQhard

A company uses Amazon RDS for PostgreSQL with Multi-AZ and automated backups set to 35 days. The database experiences a sudden spike in write IOPS, causing performance degradation. The team needs to investigate the cause without affecting production. What should they do?

A.Use the enhanced monitoring feature to collect OS-level metrics on the production instance.
B.Review Amazon CloudWatch metrics for the production DB instance to identify the cause.
C.Enable Performance Insights on the production instance to analyze queries.
D.Create a read replica from the latest automated snapshot and enable Performance Insights on the replica.
AnswerD

This provides a copy for analysis without impacting production.

Why this answer

Creating a read replica from the latest automated snapshot provides a near-current copy of the database without impacting the production instance. This allows the team to enable Performance Insights on the replica to analyze query performance and investigate the write IOPS spike safely. Option A is wrong because enhanced monitoring provides OS-level metrics but not query-level details needed for this investigation.

Option B is wrong because CloudWatch metrics show overall performance but not individual queries. Option C is wrong because enabling Performance Insights on the production instance could add overhead and impact performance.

189
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

Larger instance class can apply changes faster.

Why this answer

Increasing the instance class of the read replica provides it with more CPU and memory resources to apply write-ahead logs from the primary, directly addressing the replica lag caused by high write traffic. Enabling Multi-AZ on the primary (Option B) only ensures high availability and does not reduce replica lag. Disabling binary logging (Option C) would prevent replication entirely.

Read replicas can be in the same region (Option D) and that does not solve lag due to resource constraints.

190
MCQeasy

A solutions architect runs the command shown in the exhibit. Which statement is true about the output?

A.There are two instances with the Environment=production tag.
B.The command displays the instance ID, instance type, and launch time of three running instances.
C.One of the instances is stopped.
D.The command lists all instances in the account regardless of tags.
AnswerB

The output shows three instances with those attributes.

Why this answer

The command `aws ec2 describe-instances --query 'Reservations[].Instances[?State.Name==`running`].[InstanceId,InstanceType,LaunchTime]' --output table` filters for running instances and projects only the InstanceId, InstanceType, and LaunchTime fields. The output shows three rows, each representing a running instance with those three attributes. Therefore, option B is correct because it accurately describes the displayed data.

Exam trap

The trap here is that candidates may assume the output includes all instances or tag information, but the JMESPath query explicitly filters for running instances and projects only the specified fields, so any inference about tags or stopped instances is unsupported by the output.

How to eliminate wrong answers

Option A is wrong because the command does not filter or display tags; it only queries instances with State.Name==`running` and projects InstanceId, InstanceType, and LaunchTime, so there is no way to determine the Environment tag from this output. Option C is wrong because the command explicitly filters for instances where State.Name equals `running`, so a stopped instance would not appear in the output. Option D is wrong because the command uses a JMESPath query to filter for running instances only, not all instances in the account regardless of tags.

191
Multi-Selectmedium

A company is using Amazon CloudFront to distribute content globally. They want to optimize cost and performance. Which TWO actions are recommended?

Select 2 answers
A.Enable Regional Edge Caches to reduce load on the origin.
B.Disable compression to reduce CPU usage on the origin.
C.Use a single origin server to simplify configuration.
D.Use multiple CloudFront distributions for the same content.
E.Select the appropriate Price Class to limit the number of edge locations used.
AnswersA, E

Regional Edge Caches improve performance and reduce origin load.

Why this answer

Using Regional Edge Caches reduces origin load and latency. Price Class selection reduces cost by limiting edge locations.

192
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

Invalidation removes cached objects, forcing fresh fetch.

Why this answer

Creating an invalidation removes cached objects from CloudFront edge locations, forcing them to be refreshed from the origin. Option A is incorrect because signed URLs control access, not cache freshness. Option C is incorrect because compression does not affect whether cached or fresh content is served.

Option D is incorrect because reducing TTL to 0 would cause every request to go to the origin, increasing load and latency; invalidations are more efficient.

Exam trap

Choosing to reduce TTL to 0 may seem like a solution but it's inefficient; invalidation is the proper way to clear cached objects.

193
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

Without proper IAM permissions, Lambda cannot create log streams or write logs.

Why this answer

If the Lambda execution role lacks logs:CreateLogGroup and logs:PutLogEvents permissions, Lambda cannot write logs. Option A is wrong because the log group exists but has 0 stored bytes. Option C is wrong because retention policy doesn't prevent new logs.

Option D is wrong because the log group exists.

194
MCQmedium

A company migrated a monolithic application to a microservices architecture on Amazon ECS. They notice that the CPU utilization of the cluster is high, but individual services are underutilized. What is the best optimization?

A.Increase the number of tasks for each service.
B.Use AWS Fargate Spot for interruptible workloads.
C.Switch from Fargate to EC2 launch type.
D.Right-size the task definitions by adjusting CPU and memory reservations.
AnswerD

Proper sizing reduces over-provisioning and improves cluster utilization.

Why this answer

Right-sizing the task definitions by adjusting CPU and memory reservations ensures each service receives the appropriate resources, reducing wasted capacity and optimizing cluster utilization. This directly addresses the high cluster CPU utilization while individual services are underutilized. Option A (increasing tasks) would exacerbate the issue.

Option B (Fargate Spot) does not solve the resource allocation problem. Option C (EC2 launch type) is not relevant to the utilization pattern described.

195
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

If the Deny statement is in a policy that is not attached to the user, it never gets evaluated, so the Allow from the attached policy permits the upload.

Why this answer

IAM policy evaluation follows the rule that an explicit Deny always overrides any Allow. If both the Allow and Deny statements were in an attached policy, the Deny would block uploads to the confidential/ prefix. Therefore, the fact that the user can still upload indicates that the Deny statement is in a policy that is not attached to the user (or not effective).

Option C correctly identifies this: the Deny statement is in a separate policy that is not attached to the user.

196
Multi-Selecthard

A company runs a web application on EC2 instances in an Auto Scaling group. The application writes logs to local instance storage. The operations team wants to centralize log analysis using Amazon CloudWatch Logs. The team needs a solution that is resilient to instance failures and does not lose logs. Which TWO options should the team implement? (Choose TWO.)

Select 2 answers
A.Use the CloudWatch agent with the auto-scaling group lifecycle hooks
B.Mount an EFS volume to the instances for log storage
C.Install the CloudWatch Logs agent on each EC2 instance to stream logs to CloudWatch Logs
D.Configure the Auto Scaling group to send logs to Amazon S3 on instance termination
E.Use Amazon SQS to buffer log events before sending to CloudWatch Logs
AnswersB, C

Persistent storage ensures logs survive instance termination.

Why this answer

(EFS volume) ensures log persistence even if an instance fails, because EFS is a shared, durable file system. Option C (CloudWatch agent) streams logs to CloudWatch Logs in near real-time, enabling centralized analysis. Option A (lifecycle hooks) is not sufficient for streaming logs to CloudWatch; it only helps with final log delivery on instance termination but doesn't provide real-time streaming.

Option D (SQS) adds unnecessary complexity; CloudWatch agent can directly stream logs. Option E (S3) is not needed when using CloudWatch Logs.

197
MCQeasy

A company uses AWS Elastic Beanstalk to deploy a web application. The application experiences increased traffic, and the environment's Auto Scaling group is not scaling out quickly enough. What should a solutions architect do to improve the scaling response?

A.Decrease the CPU utilization threshold for scale-out alarms.
B.Increase the minimum number of instances in the Auto Scaling group.
C.Reduce the cooldown period for the Auto Scaling group.
D.Use a larger instance type to handle more traffic.
AnswerC

A shorter cooldown allows new instances to be launched sooner after a scaling activity.

Why this answer

Reducing the cooldown period allows the Auto Scaling group to react faster to increased traffic, enabling quicker scale-out. Option A is incorrect because decreasing the CPU utilization threshold for scale-out alarms would cause the group to scale out at lower CPU levels, potentially scaling out sooner but not necessarily improving the speed of response. Option B is incorrect because increasing the minimum number of instances does not speed up scaling; it only ensures a higher baseline capacity.

Option D is incorrect because using larger instance types handles more traffic per instance but does not improve the scaling response time.

198
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

Lifecycle rules automate transitions based on age.

Why this answer

An S3 Lifecycle rule can be configured to transition objects with the prefix 'backups/' to the GLACIER storage class after 30 days. This is the most efficient and automated approach. Option A is incorrect because using AWS Lambda triggered by S3 events to change the storage class would be less efficient and more complex than a lifecycle rule.

Option B is incorrect because S3 Batch Operations are designed for one-time bulk operations, not for ongoing, time-based transitions. Option D is incorrect because S3 Intelligent-Tiering automatically moves objects between access tiers based on changing access patterns, but it does not automatically move objects to GLACIER after a fixed period; lifecycle rules are more appropriate for this requirement.

199
MCQhard

A company is using an AWS Direct Connect connection to access its VPC. The company is experiencing intermittent connectivity issues. The Solutions Architect suspects a routing problem. Which AWS service can help diagnose the issue by providing real-time metrics and logs?

A.Amazon CloudWatch with Direct Connect metrics
B.VPC Flow Logs
C.AWS CloudTrail
D.AWS Trusted Advisor
AnswerA

CloudWatch provides metrics like connection state and BGP status.

Why this answer

Amazon CloudWatch with Direct Connect metrics (Option A) is correct because it provides real-time metrics and logs specifically for AWS Direct Connect connections, such as connection state, latency, and packet loss. This helps diagnose routing and connectivity issues. VPC Flow Logs (Option B) capture IP traffic metadata within the VPC but do not include Direct Connect-specific metrics like BGP status or link health.

AWS CloudTrail (Option C) records API activity, not network-level diagnostics. AWS Trusted Advisor (Option D) offers cost optimization and security recommendations but does not provide real-time network monitoring.

200
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 efficiently pools and reuses database connections, reducing idle connections and improving scalability.

Why this answer

Using an RDS Proxy reduces the number of idle connections by pooling and reusing them. Option A is wrong because switching to Aurora may not directly address idle connections. Option B is wrong because Lambda is not a database connection management tool.

Option D is wrong because increasing max_connections might worsen the problem.

201
MCQeasy

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores session data locally on the EC2 instances. The company wants to make the application stateless to improve availability and scalability. Which solution should the solutions architect recommend?

A.Use Amazon ElastiCache for Redis to store session data externally.
B.Configure session stickiness on the ALB to route requests from the same user to the same EC2 instance.
C.Mount an Amazon EFS file system on the EC2 instances and store session files there.
D.Store session data in Amazon S3 and update the application to read and write sessions to S3.
AnswerA

ElastiCache for Redis is a fast, in-memory store ideal for session management, making the application stateless.

Why this answer

Amazon ElastiCache for Redis provides a fast, in-memory, highly available session store that decouples session state from EC2 instances, making the application stateless. This improves availability and scalability. Option B is incorrect because session stickiness (sticky sessions) on the ALB ties a user to a specific instance, preventing true statelessness and can cause uneven load distribution.

Option C is incorrect because mounting Amazon EFS to store session files still relies on a filesystem, which is slower than in-memory storage and does not eliminate statefulness. Option D is incorrect because Amazon S3 is not designed for high-frequency read/write operations like session management; it introduces high latency and is less efficient than ElastiCache.

202
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

Allows longer execution.

Why this answer

Increasing the Lambda function timeout (option C) allows the function more time to complete processing of SQS messages, directly addressing timeout errors. Increasing memory allocation (option D) also increases CPU and network throughput, which can speed up execution and prevent timeouts. Option A (increasing batch size) would process more messages per invocation, potentially worsening timeouts.

Option B (enabling SQS encryption) does not affect timeout. Option E (decreasing visibility timeout) would cause messages to reappear in the queue sooner, which does not resolve the Lambda timeout issue.

203
MCQhard

A company runs a multi-account AWS environment using AWS Organizations. The security team wants to ensure that all S3 buckets across all accounts are encrypted with AWS KMS. What is the MOST scalable and efficient way to enforce this policy?

A.Use an AWS Lambda function that runs periodically across all accounts to check and remediate buckets.
B.Use an SCP that denies s3:PutBucketEncryption actions unless the encryption is set to aws:kms.
C.Use AWS Config rules in each account to detect unencrypted buckets and trigger auto-remediation.
D.Use AWS CloudTrail to monitor PutBucketEncryption calls and alert the security team.
AnswerB

SCPs can prevent the creation of non-compliant buckets across all accounts in the organization.

Why this answer

Using a service control policy (SCP) that denies s3:PutBucketEncryption unless the encryption is set to aws:kms is the most scalable and efficient way to enforce encryption across all accounts in an AWS Organization. SCPs are applied centrally and affect all accounts without requiring per-account configuration. Option A is less scalable because a periodic Lambda function may have delays and requires managing cross-account roles.

Option C is per-account and requires Config rules and remediation in each account, which is less efficient. Option D only provides monitoring and alerting, not enforcement.

204
MCQhard

A company has a legacy application that runs on a single EC2 instance. The application stores data on an attached EBS volume. The company wants to improve availability and reduce the recovery time objective (RTO) in case of instance failure. What should the company do?

A.Create an Auto Scaling group with a minimum of 2 instances across multiple Availability Zones and use a load balancer.
B.Take frequent EBS snapshots and automate the creation of a new instance from the latest snapshot.
C.Configure the EBS volume as a Multi-Attach volume and attach it to a standby instance.
D.Convert the instance to an AMI and launch a new instance from that AMI in a different Availability Zone.
AnswerA

An Auto Scaling group with a minimum of 2 instances across multiple Availability Zones and a load balancer provides automatic failover and load distribution, reducing recovery time and improving availability.

Why this answer

An Auto Scaling group with a minimum of two instances across multiple Availability Zones combined with a load balancer provides high availability and automatic failover, reducing RTO significantly. Option B is wrong: while EBS snapshots are useful for backups, restoring from a snapshot to create a new instance involves manual steps and can take minutes, not improving RTO adequately. Option C is wrong: Multi-Attach EBS volumes are for specific clustered applications (e.g., Windows Server Failover Clustering) and not all applications support it; also, it does not provide automatic failover.

Option D is wrong: converting to an AMI and launching in another AZ requires manual intervention and does not ensure rapid recovery; it's a migration step, not an availability solution.

205
MCQhard

A company runs a high-traffic web application on EC2 instances in an Auto Scaling group. The application uses a Redis cluster for caching. Recently, they have noticed that the cache hit ratio has dropped significantly, causing increased load on the database. The operations team observed that the Redis cluster's CPU utilization is high and memory usage is near capacity. They need to improve the cache performance with minimal changes to the application code. What should a solutions architect recommend?

A.Migrate from ElastiCache to Amazon MemoryDB for Redis.
B.Upgrade the Redis cluster to a larger node type with more CPU and memory.
C.Increase the TTL values for cached objects in the application.
D.Enable encryption in transit for the Redis cluster.
AnswerB

More resources directly improve performance and cache hit ratio.

Why this answer

Upgrading to a larger node type provides more CPU and memory, directly addressing the high utilization and capacity issues without requiring application code changes. Option A is incorrect because migrating to MemoryDB for Redis does not solve the immediate capacity problem and introduces unnecessary complexity. Option C is incorrect because increasing TTL values may reduce cache churn but does not increase the available CPU or memory.

Option D is incorrect because enabling encryption in transit adds overhead and does not resolve the capacity or performance issues.

206
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 provides a durable, shared session store independent of EC2 instances.

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.

207
MCQhard

A company runs a data processing application on EC2 instances that read from an Amazon SQS queue. The application processes each message in about 2 seconds. The company expects a sudden spike in messages and wants to minimize processing latency. Which configuration will handle the spike most cost-effectively?

A.Replace the EC2 instances with AWS Lambda functions that are triggered by SQS events.
B.Increase the EC2 instance size to handle more messages per instance.
C.Increase the Auto Scaling group's desired capacity to a higher fixed value during the expected spike.
D.Use Auto Scaling with a step scaling policy based on the SQS queue depth.
AnswerA

Lambda scales automatically with the number of messages and is cost-effective for variable loads.

Why this answer

Using Lambda functions triggered by SQS events provides automatic scaling to handle sudden spikes in message volume without requiring provisioning or managing EC2 instances. Lambda scales instantly based on the number of messages in the queue, and you pay only for compute time used, making it the most cost-effective solution for variable workloads. Option B is incorrect because increasing instance size is less cost-effective and still requires manual scaling.

Option C is incorrect because a fixed desired capacity may lead to over-provisioning or under-provisioning during the spike. Option D is incorrect because step scaling based on queue depth introduces latency as it takes time to launch new instances, whereas Lambda reacts immediately per message.

208
MCQhard

A company uses cross-account S3 access. The above IAM policy is attached to an IAM user in Account A. The user tries to upload an object to a bucket in Account B, but the upload fails. What is the MOST likely reason?

A.The upload request does not include the 'x-amz-acl' header with value 'bucket-owner-full-control'.
B.The resource ARN in the policy is incorrect; it should include the bucket name only.
C.The bucket policy in Account B denies the upload.
D.The IAM user does not have permission to call s3:PutObject.
AnswerA

The condition requires that header to be set.

Why this answer

The policy explicitly requires the 'x-amz-acl: bucket-owner-full-control' condition. If the upload request does not include this header, the request fails. Options B, C, and D are incorrect: the resource ARN is correct (includes bucket and object), the bucket policy is not shown but the IAM policy is the issue, and the IAM user does have s3:PutObject permission as stated in the policy.

209
MCQhard

A company runs a critical e-commerce platform on AWS. The application consists of an Application Load Balancer (ALB) that distributes traffic to an Auto Scaling group of EC2 instances running a web server. The web servers store session data locally on the instance's ephemeral storage. The Auto Scaling group is configured with a min of 2, max of 10, and desired of 2. Recently, during a flash sale, traffic surged and the Auto Scaling group scaled out to 10 instances. However, many users reported that their shopping carts were lost and they were logged out during the event. The Cognito user pool was used for authentication, and the application uses cookies to maintain session state. The ALB's stickiness is enabled. The team observed that the ALB's RequestCountPerTarget metric was well below the instance's capacity, but the error rate increased. The CloudWatch logs show that the web server returned 503 errors for a subset of requests. After the flash sale ended, the Auto Scaling group scaled back to 2 instances, and the issue disappeared. The team wants to prevent this from happening in future events. Which solution should the Solutions Architect recommend?

A.Increase the minimum size of the Auto Scaling group to 10 to handle the surge without scaling down.
B.Disable stickiness on the ALB so that any instance can handle any request.
C.Modify the application to store session data in an Amazon ElastiCache for Redis cluster instead of local ephemeral storage.
D.Increase the health check interval on the ALB to prevent instances from being marked unhealthy too quickly.
AnswerC

This decouples sessions from instances, making them persistent across scaling events and instance replacements.

Why this answer

The root cause is that session data stored on ephemeral storage is lost when instances are terminated or replaced. Even with ALB stickiness, if an instance is terminated (e.g., due to scaling in or health check failure), the session data is gone. Option C solves this by storing sessions externally in ElastiCache, which persists independently of EC2 instances, ensuring sessions survive scaling events.

Option A would prevent scaling in but does not address data loss if instances become unhealthy or replaced. Option B would make the problem worse because without stickiness, requests could go to different instances, causing session loss even without termination. Option D only delays health checks and does not solve data loss.

210
MCQeasy

A DevOps team wants to automatically enforce tagging standards on all AWS resources created in an account. If a resource is created without the required tags, the team wants to prevent the creation or remediate it. Which AWS service should the team use?

A.AWS Config
B.AWS Organizations
C.AWS Identity and Access Management (IAM)
D.AWS Resource Groups & Tag Editor
AnswerA

Can evaluate resource compliance and trigger remediation actions.

Why this answer

AWS Config can evaluate resource compliance using managed rules (e.g., required-tags) and automatically remediate non-compliant resources via AWS Config remediation actions or AWS Systems Manager Automation. Option B is incorrect because AWS Organizations manages organizational units and service control policies, not resource-level tag enforcement. Option C is incorrect because IAM controls permissions, not tagging standards.

Option D is incorrect because AWS Resource Groups & Tag Editor helps manage tags but does not prevent or auto-remediate non-compliant resource creation.

211
Multi-Selectmedium

A company is designing a disaster recovery strategy for a critical application that runs on Amazon EC2. The application data is stored on Amazon EBS volumes and Amazon RDS for MySQL. The recovery time objective (RTO) is 2 hours, and the recovery point objective (RPO) is 1 hour. Which THREE steps should the company take to meet these objectives?

Select 3 answers
A.Configure cross-region replication for the RDS instance using a read replica.
B.Use AWS Database Migration Service (DMS) for continuous replication.
C.Create AMIs of the EC2 instances every hour.
D.Enable automated backups for the RDS instance with a retention period of 1 hour.
E.Schedule EBS snapshots every hour and replicate them to another region.
AnswersA, D, E

Provides a standby in another region with low RPO.

Why this answer

To achieve RTO of 2 hours and RPO of 1 hour, the company should combine RDS cross-region read replicas (option A) for near-real-time replication, RDS automated backups (option D) for point-in-time recovery, and EBS snapshots every hour with cross-region replication (option E) for EC2 instances. Option A provides asynchronous replication to another region. Option D allows restoring to any point within the retention period.

Option E ensures EBS volumes can be recovered in another region. Option B (AWS DMS) is typically used for database migrations, not as a primary DR replication method. Option C is incorrect because creating AMIs every hour is inefficient and does not provide the required RPO for data; EBS snapshots are more appropriate.

212
MCQhard

A company uses Amazon DynamoDB with provisioned capacity for a critical workload. They notice that write requests are being throttled during peak hours. The table has a partition key of 'user_id' and a sort key of 'timestamp'. The access pattern is evenly distributed. What should a solutions architect do to reduce throttling?

A.Increase the read capacity units for the table.
B.Add a DynamoDB Accelerator (DAX) cluster in front of the table.
C.Switch the table to DynamoDB On-Demand capacity mode.
D.Enable DynamoDB Auto Scaling for write capacity.
AnswerD

Auto Scaling dynamically adjusts write capacity to handle peak loads.

Why this answer

DynamoDB Auto Scaling adjusts write capacity based on actual usage, reducing throttling without manual intervention. Option A is wrong because increasing read capacity does not help with write throttling. Option B is wrong because DAX is a cache for read operations, not writes.

Option C is wrong because while switching to On-Demand mode can eliminate throttling, it may be more expensive than Auto Scaling if the workload is predictable; Auto Scaling is the more cost-effective solution for this scenario.

213
Multi-Selecteasy

A company uses AWS Lambda to process files uploaded to an S3 bucket. The Lambda function takes too long to execute and frequently times out. The function downloads the entire file to /tmp before processing. Which TWO changes would improve performance? (Choose two.)

Select 2 answers
A.Increase the Lambda function's reserved concurrency.
B.Increase the memory allocation for the Lambda function.
C.Modify the function to stream the file from S3 instead of downloading it entirely.
D.Increase the Lambda function timeout.
E.Increase the /tmp storage limit for the Lambda function.
AnswersC, D

Streaming reduces the time spent on I/O and eliminates the need to store the entire file in /tmp.

Why this answer

The correct answers are C and D. Option C (streaming the file from S3) reduces download time and eliminates the need to store the entire file in /tmp, directly improving performance by lowering I/O latency. Option D (increasing the Lambda timeout) provides more time for the function to complete processing, preventing timeouts.

Option B (increasing memory) does not directly address the root cause of the timeout (slow file download), and its CPU benefit is secondary. Option A (reserved concurrency) affects scaling, not individual execution time. Option E (/tmp storage) is ephemeral and does not impact performance.

214
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

Unique URLs force CloudFront to fetch new content from origin.

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.

215
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

Multi-AZ provides automatic failover for the database.

Why this answer

Amazon RDS with Multi-AZ deployment provides automatic failover and high availability for the database. Option D is correct because placing the EC2 instance in an Auto Scaling group that spans multiple Availability Zones ensures compute resources are available even if one AZ fails. Option E is correct because an Application Load Balancer distributes traffic across healthy instances and supports health checks, improving application availability.

Option B is incorrect because higher IOPS improves performance but not availability. Option C is incorrect because instance store is ephemeral and data is lost on instance failure, reducing durability and availability.

216
MCQeasy

A company hosts a static website on Amazon S3 with public read access. The website uses a custom domain name (www.example.com). The company wants to improve performance for global users and also add HTTPS support. They have already set up a CloudFront distribution with the S3 bucket as the origin. However, users still cannot access the website via HTTPS. What should they do?

A.Request an SSL certificate from AWS Certificate Manager (ACM) and import it into CloudFront.
B.Enable static website hosting on the S3 bucket and configure the bucket policy to allow HTTPS.
C.Place an Application Load Balancer in front of the S3 bucket and attach an SSL certificate.
D.Configure the CloudFront distribution to use a custom SSL certificate and set the alternate domain name (CNAME) to www.example.com.
AnswerD

It involves configuring the CloudFront distribution to use a custom SSL certificate from ACM and setting the alternate domain name to www.example.com, which enables HTTPS access.

Why this answer

To serve HTTPS, CloudFront needs an SSL/TLS certificate associated with it, and the custom domain (www.example.com) must be set as an alternate domain name (CNAME) in the distribution settings. The certificate can be obtained from ACM (must be in the US East (N. Virginia) region) and then associated with the CloudFront distribution.

Option A is incorrect because ACM certificates are not imported into CloudFront; they are associated with the distribution. Option B is incorrect because enabling static website hosting on S3 is not required when using CloudFront as a CDN, and bucket policies cannot enforce HTTPS at the S3 level; HTTPS is terminated at CloudFront. Option C is incorrect because placing an Application Load Balancer in front of S3 is unnecessary, as CloudFront already provides HTTPS termination and caching for better performance.

217
MCQeasy

A company is running a stateless web application on Amazon EC2 instances in an Auto Scaling group. The application stores session data in an Amazon ElastiCache Redis cluster. After a recent deployment, users are being logged out frequently. What is the most likely cause?

A.The Auto Scaling group's min size is too small.
B.The Elastic Load Balancer's health check is too aggressive.
C.The application is not using the ElastiCache cluster for session storage.
D.The ElastiCache cluster's security group is blocking traffic from the ALB.
AnswerC

If sessions are stored locally on EC2 instances, they are lost when instances are terminated or scaled, causing logouts.

Why this answer

The most likely cause is that the application is not using the ElastiCache cluster for session storage. If the application fails to properly store session data in Redis, sessions will not persist across instances. This becomes evident after a deployment if the configuration or code change inadvertently disables Redis session handling.

Option A is incorrect because a small Auto Scaling group min size does not cause logouts; it affects capacity. Option B is incorrect because an aggressive health check might cause instance replacement, but if sessions are stored in Redis, users should not be logged out. Option D is incorrect because the ALB does not directly interact with ElastiCache; security group issues would cause connection failures, not intermittent logouts.

218
MCQhard

A company uses Amazon RDS for MySQL with Multi-AZ deployment. During a recent failover, they experienced a few minutes of downtime because the application's connection string pointed to the primary instance DNS name. What is the MOST effective solution to minimize downtime during failover?

A.Use the RDS Multi-AZ DNS name (CNAME) that automatically updates after failover.
B.Assign an Elastic IP address to the RDS instance.
C.Create a read replica in another Region and promote it during failover manually.
D.Configure a Network Load Balancer in front of the RDS instance.
AnswerA

The Multi-AZ DNS name automatically points to the new primary after failover.

Why this answer

The RDS Multi-AZ deployment automatically provides a CNAME (DNS name) that always points to the current primary instance. After a failover, this CNAME is updated to point to the new primary, so the application using this DNS name will experience minimal downtime. Option B is incorrect because Elastic IP addresses are not supported for RDS instances; they are used for EC2 instances.

Option C is incorrect because a read replica in another Region is designed for disaster recovery and read scaling, not for automatic failover within the same region; manual promotion would cause significant downtime. Option D is incorrect because a Network Load Balancer adds unnecessary complexity and latency; RDS Multi-AZ already provides automatic failover with DNS update.

219
Multi-Selecteasy

A company uses AWS CloudFormation to deploy infrastructure. They need to ensure that updates to a stack do not cause downtime for a critical database. Which TWO strategies should they use?

Select 2 answers
A.Create a new stack and migrate data.
B.Use an UpdatePolicy attribute for rolling updates.
C.Disable rollback on stack update failures.
D.Use a service role for CloudFormation.
E.Use a DeletionPolicy attribute of Retain on the database resource.
AnswersB, E

Rolling updates minimize downtime.

Why this answer

Correct answers are B and E. Option B: Using an UpdatePolicy attribute allows you to control how updates are applied, such as rolling updates across instances, which minimizes downtime. Option E: Setting a DeletionPolicy of Retain on the database resource ensures that the database is not deleted during stack updates or deletions, preventing accidental data loss and downtime.

Option A is incorrect because creating a new stack would require data migration, which can cause downtime. Option C is incorrect because disabling rollback does not prevent downtime; it can leave the stack in a failed state. Option D is incorrect because a service role controls permissions, not update behavior.

220
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 logs all S3 data plane and control plane operations.

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.

221
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

AWS CodeDeploy supports automatic rollback based on CloudWatch alarm thresholds, providing the fastest rollback by reverting to the previous working deployment revision automatically.

Why this answer

AWS CodeDeploy supports automatic rollback based on CloudWatch alarm thresholds, providing the fastest rollback by reverting to the previous working deployment revision automatically. Option A is incorrect because manually restoring AMI snapshots is slow and error-prone. Option B is incorrect because AWS Elastic Beanstalk with rolling updates and health checks can perform rollbacks, but it is slower and less granular than CodeDeploy’s immediate alarm-based rollback.

Option C is incorrect because AWS CloudFormation stack policies prevent updates and do not facilitate automatic rollback of the application deployment.

222
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

Dependency not ready causes ResourceNotReady.

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.

223
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

This allows Lambda to report individual failures so only those messages are retried.

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.

224
MCQmedium

A company runs a critical web application on EC2 instances behind an Application Load Balancer. The instances are in an Auto Scaling group with a dynamic scaling policy based on average CPU utilization. After a recent deployment, users report intermittent timeouts. CloudWatch metrics show CPU utilization spikes to 90% before scaling out, but the new instances take 5 minutes to become healthy. What is the MOST effective solution to reduce timeouts during traffic spikes?

A.Use a scheduled scaling policy to add instances before expected peak times
B.Pre-warm the load balancer to reduce latency
C.Decrease the cooldown period and set a lower CPU utilization threshold for scale-out
D.Switch to predictive scaling
AnswerC

This triggers scale-out earlier and reduces the time to launch new instances.

Why this answer

By decreasing the cooldown period and lowering the CPU utilization threshold for scale-out, the Auto Scaling group reacts faster to rising CPU usage. The lower threshold triggers a scale-out action before CPU reaches 90%, and the reduced cooldown allows new instances to start sooner after the previous scaling activity. This addresses the 5-minute startup lag by ensuring new instances are launched earlier in the spike, reducing the window of timeouts.

Option A (scheduled scaling) only helps for predictable spikes, not intermittent ones. Option B (pre-warming the load balancer) is not a standard AWS feature and does not reduce instance startup time. Option D (predictive scaling) still has the same startup delay and requires historical data.

225
Multi-Selectmedium

A company uses Amazon RDS for MySQL with Multi-AZ deployment. The database experiences high CPU utilization during peak hours. The company wants to reduce the load on the primary database instance without making changes to the application code. Which TWO solutions should the solutions architect recommend?

Select 2 answers
A.Increase the instance size of the primary RDS instance.
B.Create one or more Read Replicas in the same region and direct read traffic to them.
C.Enable Amazon RDS Proxy to manage database connections.
D.Convert the RDS instance to a Multi-AZ deployment if not already.
E.Implement an Amazon ElastiCache cluster to cache the results of frequently accessed queries.
AnswersB, E

Read Replicas offload read queries from the primary, reducing its CPU load.

Why this answer

Options B and E are correct. Read Replicas offload read traffic from the primary database instance, reducing CPU utilization. ElastiCache caches the results of frequently accessed queries, decreasing the number of database queries and CPU load.

Option A is incorrect because increasing the instance size does not address the root cause and may require downtime. Option C is incorrect because RDS Proxy manages connection pooling, not reducing CPU load from queries. Option D is incorrect because the instance is already Multi-AZ, which provides failover but does not reduce read load.

← PreviousPage 3 of 6 · 410 questions totalNext →

Ready to test yourself?

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