Courseiva

CCNA Continuous Improvement for Existing Solutions Questions

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

1
MCQmedium

A company uses AWS Organizations with multiple accounts. The security team wants to enforce that all new S3 buckets are encrypted using AES-256. What is the MOST effective way to enforce this requirement?

A.Create an SCP that denies s3:CreateBucket unless encryption is specified.
B.Use CloudTrail to monitor bucket creation and alert security team.
C.Create an SCP that denies s3:PutBucketPublicAccessBlock without encryption.
D.Use AWS Config rules to detect non-compliant buckets and auto-remediate.
AnswerA

SCPs can deny actions based on conditions like encryption.

Why this answer

A service control policy (SCP) can deny creation of S3 buckets without encryption. Options B, C, and D are not effective at enforcing across all accounts.

2
MCQmedium

A company uses AWS CodePipeline to deploy a web application to an Elastic Beanstalk environment. The deployment pipeline includes a source stage, a build stage using CodeBuild, and a deploy stage. Recently, deployments have been failing in the deploy stage with the error: 'The environment is in an invalid state for this operation.' The developer confirms the build artifacts are correct. What is the MOST likely cause?

A.The environment's load balancer is not available
B.The environment's Auto Scaling group has insufficient capacity
C.The Elastic Beanstalk environment uses a t2.micro instance type which is not supported by CodePipeline
D.Another deployment or configuration update is already in progress on the environment
AnswerD

Elastic Beanstalk locks the environment during updates.

Why this answer

If another deployment or configuration update is already in progress, Elastic Beanstalk prevents concurrent operations, resulting in the 'environment is in an invalid state for this operation' error. Option A is incorrect because load balancer unavailability would cause health check or routing issues, not this error. Option B is incorrect because insufficient Auto Scaling capacity would lead to scaling failures, not an invalid state error.

Option C is incorrect because CodePipeline does not impose instance type restrictions on Elastic Beanstalk environments.

3
MCQeasy

A company is using Amazon API Gateway to expose a REST API. The API backend is a Lambda function that queries an Amazon DynamoDB table. During peak hours, the API returns HTTP 429 (Too Many Requests) errors. What is the MOST cost-effective way to reduce these errors?

A.Enable API caching in API Gateway.
B.Enable DynamoDB auto-scaling.
C.Increase the throttling limits in API Gateway.
D.Increase the reserved concurrency of the Lambda function.
AnswerC

Increasing API Gateway throttling limits directly allows more requests to be processed before hitting the limit. This is the most cost-effective as it involves only a configuration change without additional infrastructure costs.

Why this answer

HTTP 429 errors from API Gateway indicate that the request rate is exceeding the configured throttling limits. Increasing the throttling limits allows more requests to pass through directly, and this is a cost-effective configuration change. Option A (API caching) can reduce backend load but does not address the throttling limit itself.

Option B (DynamoDB auto-scaling) addresses DynamoDB capacity, not API Gateway throttling. Option D (Lambda reserved concurrency) addresses Lambda throttling, but the 429 is from API Gateway, not Lambda.

Exam trap

Candidates often confuse the source of 429 errors. In API Gateway, 429 errors indicate throttling at the API Gateway level, not necessarily at the backend. Therefore, increasing backend capacity (Lambda concurrency or DynamoDB throughput) may not resolve the issue if the API Gateway limit is too low.

4
MCQmedium

A company is using AWS Lambda functions to process data from an S3 bucket. Recently, the function has been timing out. The function has a 5-minute timeout configured. What is the most likely cause of the timeout?

A.The Lambda function was moved to a different VPC.
B.The Lambda function's reserved concurrency is set too low.
C.The Lambda function's memory is too low.
D.The Lambda function is processing larger files than before.
AnswerD

Larger files increase processing time, causing timeout.

Why this answer

The most likely cause of the timeout is that the Lambda function is processing larger files than before, which increases execution time beyond the 5-minute timeout. Option A is incorrect: moving to a different VPC might cause network latency but not necessarily a timeout due to file processing. Option B is incorrect: reserved concurrency controls the number of concurrent executions, not the execution duration of a single invocation.

Option C is incorrect: while increasing memory can improve CPU performance and reduce execution time, the immediate cause of a timeout is typically an increase in processing workload, such as larger files. Therefore, option D is correct.

5
MCQmedium

A company is using AWS CodePipeline with an S3 source action. After a successful deployment, the latest commit ID is stored as an environment variable in the CodeBuild project. The team notices that subsequent pipeline executions are not triggering when new commits are pushed to the S3 bucket. What is the most likely cause?

A.The CodePipeline service role lacks permissions to poll the S3 bucket.
B.The S3 bucket policy does not allow CodePipeline to read objects.
C.The S3 bucket does not have an event notification configured to trigger the pipeline.
D.The CodePipeline webhook is misconfigured.
AnswerC

Without event notification, CodePipeline won't automatically start on new commits.

Why this answer

With an S3 source action in CodePipeline, you must configure an S3 event notification to trigger the pipeline when a new commit (object) is pushed. Without this notification, CodePipeline will not automatically start a new execution on changes. Option A is incorrect because CodePipeline does not poll S3; it relies on event notifications.

Option B is incorrect because CodePipeline reads objects using its service role, not via bucket policy. Option D is incorrect because webhooks are used for external sources like GitHub, not for S3.

6
MCQeasy

A company uses AWS Lambda to process events from an SQS queue. The Lambda function has a reserved concurrency of 5. During peak hours, messages are being backed up in the queue. The function's duration is well within the 15-minute limit. What is the fastest way to increase throughput?

A.Increase the function's maximum thread count.
B.Increase the reserved concurrency to 20.
C.Create additional SQS queues and distribute messages.
D.Increase the SQS batch size to 100.
AnswerB

More concurrency allows more messages to be processed in parallel.

Why this answer

Increasing the reserved concurrency to 20 allows more Lambda functions to run simultaneously, enabling more messages to be processed in parallel. This is the fastest way to increase throughput because it directly increases the number of concurrent executions handling messages from the SQS queue. Option A is incorrect because Lambda does not have a configurable maximum thread count.

Option C is incorrect because the SQS batch size is limited to a maximum of 10, not 100. Option D is incorrect because creating additional queues would require significant application changes and does not directly increase the processing capacity of the existing Lambda function.

7
MCQeasy

A DevOps engineer notices that a CloudFormation stack update fails with the error: 'UPDATE_ROLLBACK_FAILED'. The stack is in a state where some resources were updated, but others failed to update. The engineer needs to fix the stack and complete the update. What should the engineer do FIRST?

A.Add a new resource to the stack to force a new update
B.Manually correct the resources that are preventing rollback, then use 'ContinueUpdateRollback'
C.Submit another stack update with the original template to overwrite the changes
D.Delete the stack and recreate it with the same template
AnswerB

This is the standard procedure to recover from rollback failure.

Why this answer

When a stack update fails and rollback fails, you must manually fix the resources that prevent rollback (e.g., delete a resource that is stuck) and then continue the rollback. Option A is wrong because you cannot update a stack in UPDATE_ROLLBACK_FAILED state without first completing the rollback. Option C is wrong because you cannot add resources while in failure state.

Option D is wrong because you cannot delete the stack without first fixing the rollback.

8
MCQmedium

Refer to the exhibit. A solutions architect runs the AWS CLI command to check the state of an EC2 instance. The output shows the instance is running. However, the application team reports that the instance is unreachable over SSH. What is the MOST likely cause?

A.The CLI command is querying the wrong instance
B.A security group rule blocks inbound SSH traffic
C.The instance is in a 'stopped' state
D.The instance does not have EBS optimization enabled
AnswerB

Security groups control inbound traffic.

Why this answer

The instance state is 'running', so it is not stopped or terminated. The most likely cause for being unreachable over SSH is that a security group rule blocks inbound SSH traffic (port 22). Option B is correct.

Option A is wrong because the query is for the correct instance. Option C is wrong because the instance is running. Option D is wrong because EBS optimization does not affect network connectivity.

9
MCQhard

A company is running a stateful web application on EC2 instances behind an ALB. Users report that when they refresh a page, they are logged out. What is the best solution to fix this issue?

A.Enable cross-zone load balancing on the ALB.
B.Enable sticky sessions on the ALB.
C.Replace the ALB with a Classic Load Balancer.
D.Use ElastiCache to store session data.
AnswerB

Sticky sessions route user to the same instance.

Why this answer

Enabling sticky sessions (session affinity) on the ALB ensures that all requests from a user session are routed to the same EC2 instance, preventing logout on page refresh. Option A is incorrect because cross-zone load balancing distributes traffic across instances in multiple Availability Zones but does not affect session persistence. Option C is incorrect because replacing the ALB with a Classic Load Balancer does not provide a better solution; ALB also supports sticky sessions.

Option D is incorrect because while ElastiCache can store session data externally, it does not address the routing issue; the root cause is that requests are going to different instances, so sticky sessions directly solve the problem.

10
MCQhard

A company runs a containerized application on Amazon ECS with Fargate launch type. The application experiences intermittent timeouts when calling an external API. The ECS tasks are in a private subnet with a NAT gateway. How can the company improve the reliability of outbound traffic?

A.Place the tasks in a public subnet with auto-assign public IP.
B.Deploy a NAT gateway in each Availability Zone and update the route tables.
C.Increase the NAT gateway's bandwidth by using a larger instance type.
D.Use AWS Transit Gateway to route traffic through a central VPC.
AnswerB

Eliminates single point of failure for outbound traffic.

Why this answer

A NAT Gateway in each AZ provides high availability; without it, a single NAT Gateway failure causes timeouts. Option A is wrong because it reduces security. Option C is wrong because it does not address NAT redundancy.

Option D is wrong because it adds complexity without directly fixing NAT issues.

11
MCQeasy

A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). The application experiences periodic spikes in traffic. The operations team wants to ensure that the application can handle the spikes without manual intervention. What is the MOST cost-effective solution?

A.Use a scheduled scaling policy to add instances during predicted peak hours.
B.Create a target tracking scaling policy using the ALB RequestCountPerTarget metric.
C.Manually add instances when traffic spikes are expected.
D.Use a simple scaling policy based on CPU utilization.
AnswerB

This automatically scales based on request count per target.

Why this answer

A target tracking scaling policy automatically adjusts capacity based on a specific metric, and using the ALB RequestCountPerTarget metric is appropriate for handling traffic spikes in a cost-effective manner. This policy maintains the desired metric value by adding or removing instances as needed, without manual intervention. Option A is incorrect because a scheduled scaling policy assumes predictable peaks, but the traffic spikes are periodic and may not follow a fixed schedule.

Option C is incorrect because manual intervention is not cost-effective and defeats the purpose of automation. Option D is incorrect because a simple scaling policy based on CPU utilization may not react quickly enough to sudden traffic spikes and could be less cost-effective than target tracking.

12
Drag & Dropmedium

Drag and drop the steps to deploy a serverless application using AWS SAM in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

The correct order for deploying a serverless application with AWS SAM is to first write the SAM template (defining resources and configuration), then build the application (compiling code and dependencies), then package the built artifacts (uploading to S3), then deploy the stack (using CloudFormation), and finally test the deployed application to ensure it works as expected. Common mistakes include swapping build and package, writing the template after building, or deploying before packaging, which lead to errors or incomplete deployments.

13
MCQeasy

A company is using AWS Elastic Beanstalk to deploy a web application. The application's performance degrades over time due to increasing database connections. The company wants to implement a solution that automatically scales the database tier based on connection count. Which action should be taken?

A.Migrate the database to Amazon DynamoDB with auto scaling.
B.Use Amazon RDS Proxy to manage database connections and enable connection pooling.
C.Enable Multi-AZ on the RDS instance and modify the DB instance class.
D.Configure the Auto Scaling group to scale based on CPU utilization.
AnswerB

RDS Proxy reduces connection overhead and scales.

Why this answer

Amazon RDS Proxy manages connection pooling and can scale with application, reducing load on database. Option A is wrong because DynamoDB is a different database. Option C is wrong because scaling EC2 instances does not address database connections.

Option D is wrong because modifying RDS instance type is manual and not automatic.

14
MCQmedium

A company receives a Trusted Advisor recommendation to reduce costs by deleting unused Amazon EBS snapshots. The company has hundreds of snapshots. Which approach should the company use to identify and delete snapshots that are no longer needed?

A.Enable detailed billing reports and analyze costs.
B.Use the AWS CLI to list all snapshots and manually check each one.
C.Use AWS Backup to manage snapshots and set retention rules.
D.Use Amazon S3 Lifecycle policies to expire snapshots automatically.
AnswerC

AWS Backup can automate snapshot lifecycle and identify old snapshots.

Why this answer

AWS Backup provides lifecycle policies and centralized snapshot management, making it easy to identify and automatically delete unused snapshots. Option A is incorrect because detailed billing reports show cost data but do not help identify which specific snapshots are unused. Option B is incorrect because manually checking each snapshot with the AWS CLI is not scalable for hundreds of snapshots.

Option D is incorrect because Amazon S3 Lifecycle policies manage S3 objects, not EBS snapshots.

15
Multi-Selecthard

A company is using AWS CodePipeline to automate deployments of a web application. The pipeline includes a build stage using AWS CodeBuild and a deploy stage using AWS CodeDeploy to an Auto Scaling group. Recently, deployments have been failing during the deploy stage with an error indicating that the target instances are not in a healthy state. The CodeDeploy agent logs show that the agent is running but the application validation scripts are failing. Which THREE actions should the solutions architect take to troubleshoot and resolve the issue?

Select 3 answers
A.Test the validation script manually on a healthy instance to confirm it works as expected.
B.Increase the deployment timeout in the CodeDeploy deployment group to allow more time for validation.
C.Review the CodeDeploy agent logs on a failing instance to identify the specific error in the validation script.
D.Verify that the AppSpec file includes the correct lifecycle event hooks (e.g., ValidateService).
E.Configure an Auto Scaling lifecycle hook to perform health checks before the instance is placed in service.
AnswersA, C, D

Manual testing helps isolate whether the script itself is faulty.

Why this answer

Options A, C, and D are correct. Checking AppSpec hooks ensures the validation scripts are correctly defined. Reviewing CodeDeploy agent logs helps identify script failures.

Testing the validation script manually on a healthy instance verifies its functionality. Option B is wrong because increasing the deployment timeout does not fix the script failure. Option E is wrong because CodeDeploy does not use Auto Scaling lifecycle hooks for instance health; it uses its own deployment lifecycle.

16
MCQhard

A company runs a critical web application on EC2 instances behind an Application Load Balancer (ALB). During a recent deployment, users experienced errors. The team wants to automatically roll back the deployment if the error rate exceeds 5% within 10 minutes after deployment. Which solution meets these requirements with minimal operational overhead?

A.Configure the Auto Scaling group to use ELB health checks and replace instances if the error rate increases.
B.Use CodeDeploy with manual approval gates and a script that checks error rates.
C.Use CodeDeploy with a CloudWatch alarm on the ALB error rate that triggers a deployment rollback.
D.Use a custom Lambda function that monitors ALB error rates and triggers a rollback via CodeDeploy API.
AnswerC

CodeDeploy natively supports CloudWatch alarm-based automatic rollback.

Why this answer

AWS CodeDeploy supports automatic rollback based on CloudWatch alarm metrics, such as the ALB error rate exceeding 5% for 10 minutes, with minimal operational overhead. Option A is incorrect because modifying Auto Scaling group health checks does not directly monitor application-level error rates for rollback. Option B is incorrect because manual approval gates require human intervention and do not provide automatic rollback.

Option D is incorrect because using a custom Lambda function adds complexity and is not the best practice; CodeDeploy with CloudWatch alarms provides a simpler, fully managed solution.

17
MCQhard

A company has a legacy application that runs on a single EC2 instance. The application writes logs to a local file. The company wants to centralize log management without modifying the application code. Which solution is MOST operationally efficient?

A.Use AWS CloudTrail to capture log file changes.
B.Modify the application to write logs to stdout and use the awslogs driver.
C.Install and configure the Amazon CloudWatch agent on the EC2 instance.
D.Set up an Amazon S3 bucket and use an AWS Lambda function to periodically copy log files.
AnswerC

CloudWatch agent can collect logs from local files without code changes.

Why this answer

The Amazon CloudWatch agent can be installed on the EC2 instance without modifying application code. It reads the local log file and sends the logs to Amazon CloudWatch Logs for centralized management, making it the most operationally efficient solution.

Exam trap

The trap here is that candidates may think modifying the application to use stdout with the awslogs driver is simpler, but that requires code changes, which the question explicitly prohibits.

How to eliminate wrong answers

Option A is wrong because AWS CloudTrail captures API activity and management events, not log file changes on an EC2 instance. Option B is wrong because it requires modifying the application code to write logs to stdout, which violates the requirement to not modify application code. Option D is wrong because setting up an S3 bucket and Lambda function to periodically copy log files introduces unnecessary complexity and latency compared to the real-time streaming provided by the CloudWatch agent.

18
MCQmedium

A company runs a critical workload on EC2 instances in an Auto Scaling group across three Availability Zones. The application needs to maintain a consistent IP address for outbound traffic to external partners. The current design uses a NAT gateway in each AZ, but partners whitelist a single IP. How can the company provide a fixed outbound IP while maintaining high availability?

A.Use a proxy fleet of EC2 instances behind an Application Load Balancer.
B.Use a single NAT gateway across all three AZs and assign an Elastic IP.
C.Use a NAT instance with an Elastic IP in one AZ.
D.Deploy a Network Load Balancer with Elastic IPs in front of NAT instances in each AZ.
AnswerD

NLB provides a static IP and distributes traffic to NAT instances across AZs for HA.

Why this answer

A Network Load Balancer (NLB) with Elastic IPs can distribute traffic to NAT instances across multiple Availability Zones, providing a fixed outbound IP and high availability. If one AZ fails, the NLB redirects traffic to healthy NAT instances in other AZs, ensuring the workload remains operational. Option A is incorrect because a proxy fleet behind an ALB would still result in multiple outbound IPs, as ALB instances have different IPs.

Option B is incorrect because using a single NAT gateway across all AZs is not possible – NAT gateways are AZ-specific and cannot span zones; also, a single NAT gateway is a single point of failure. Option C is incorrect because a single NAT instance in one AZ lacks high availability – if that AZ fails, outbound connectivity is lost.

19
MCQmedium

A company runs a batch processing application on a scheduled EC2 instance that starts every night. The instance processes a large number of files from an S3 bucket and writes results to another S3 bucket. The job takes approximately 6 hours to complete. Recently, the job has been failing after 4 hours with an error indicating that the instance's EBS root volume is full. The instance type is t3.medium with a 20 GB gp2 root volume. The application writes temporary files to the root volume. The company wants to fix this with minimal changes to the application and infrastructure. What should a solutions architect recommend?

A.Create an additional EBS volume and mount it to the instance.
B.Change the instance type to one with instance store volumes.
C.Increase the size of the EBS root volume to 100 GB.
D.Modify the application to compress temporary files.
AnswerC

More space on root volume resolves the issue without code changes.

Why this answer

Increasing the root volume size provides more space for temporary files without requiring application changes. Option A is wrong because creating an additional EBS volume and mounting it would require application changes to write to a different path. Option B is wrong because instance store volumes are ephemeral and may not be available on t3 instances, and would also require application changes.

Option D is wrong because compressing temporary files may not be sufficient and requires code changes.

20
MCQeasy

A company is using Amazon S3 to store sensitive data. The security team requires that all data be encrypted at rest using server-side encryption with AWS KMS. The company also needs to ensure that any attempt to upload an unencrypted object is blocked. How can the company enforce this requirement?

A.Use a bucket policy that denies s3:PutObject if the request does not include the x-amz-server-side-encryption header with value aws:kms
B.Enable default encryption on the bucket with AWS KMS
C.Use AWS CloudTrail to monitor PutObject calls and alert on unencrypted uploads
D.Enable S3 Object Lock on the bucket
AnswerA

This policy condition ensures encryption is used.

Why this answer

A bucket policy that denies s3:PutObject if the request does not include the x-amz-server-side-encryption header with the value aws:kms will enforce encryption at upload time, blocking any unencrypted upload. Option B (default encryption) does not enforce on all uploads if the request header is omitted. Option C (CloudTrail) is detective, not preventive.

Option D (Object Lock) is for write-once-read-many (WORM) compliance, not encryption.

21
MCQhard

An S3 bucket contains log files. An administrator runs the above AWS CLI command. What does the output indicate?

A.Two log files are larger than 1 KB.
B.The log files are larger than 1000 KB.
C.The bucket contains only two objects with the prefix 'logs/'.
D.The bucket has versioning enabled.
AnswerA

1000 bytes = 1 KB.

Why this answer

The command uses the --query parameter to filter objects where size > 1000 bytes (1 KB) and returns only the keys of those objects. The output displays two keys, meaning exactly two log files are larger than 1 KB. Therefore, option A is correct.

Option B is incorrect because the filter is 1000 bytes, not 1000 KB. Option C is incorrect because the bucket may contain more than two objects with the prefix 'logs/', but only two are larger than 1 KB. Option D is incorrect because the command does not query versioning.

22
MCQmedium

An IAM policy is attached to an S3 bucket to allow access only from a specific IP range. Users report that they can access the bucket from IP addresses outside the range. The bucket policy also includes another statement that denies access to all principals. What is the most likely reason users outside the IP range can still access the bucket?

A.The condition key 'aws:SourceIp' is misspelled.
B.The deny statement does not apply to the users attempting to access the bucket.
C.The policy is an IAM policy, not a bucket policy, and the condition key is invalid.
D.The policy is attached to the IAM user instead of the bucket.
AnswerB

The deny statement might be scoped to a different principal, allowing access from other IPs.

Why this answer

An explicit deny in a bucket policy overrides any allow, but only if the deny statement applies to the principal making the request. If the deny statement specifies a different principal (e.g., an AWS account or role not matching the users), or includes a condition that does not evaluate to true for these users, the deny does not take effect. Therefore, the allow statement granting access based on IP range would still apply, allowing users outside the range to access the bucket.

Option A is incorrect because the condition key syntax is not the issue; the deny is not applying to the correct principals. Option C is incorrect because the question states an IAM policy is attached to an S3 bucket, which is possible (resource-based policy), and the condition key 'aws:SourceIp' is valid. Option D is incorrect because the policy is attached to the bucket, not to individual users.

23
MCQeasy

A company uses AWS CloudFormation to deploy infrastructure. The company wants to ensure that if a stack update fails, the stack automatically rolls back to the last known good state. Which CloudFormation stack option should the company configure?

A.Enable termination protection on the stack.
B.Configure a stack policy to prevent updates to critical resources.
C.Set the 'Rollback on failure' option to 'Yes' when performing the stack update.
D.Use a change set to review changes before updating the stack.
AnswerC

This is the default behavior; if an update fails, CloudFormation rolls back automatically.

Why this answer

When performing a stack update, you can set the 'Rollback on failure' option to 'Yes'. This ensures that if the update fails, CloudFormation automatically rolls back to the last known good state. Option A is incorrect because termination protection prevents accidental deletion, not rollback.

Option B is incorrect because a stack policy controls which resources can be updated, not rollback behavior. Option D is incorrect because change sets allow you to review changes but do not provide automatic rollback.

24
MCQhard

A company runs a containerized application on Amazon ECS with Fargate. The application needs to access an Amazon RDS database that is in a private subnet. The ECS tasks are launched in a public subnet. How should they configure network access?

A.Launch the ECS tasks in the same private subnet as the RDS instance.
B.Place the ECS tasks in a public subnet and use a NAT gateway to route traffic to the database.
C.Set up a VPN connection between the ECS tasks and the database.
D.Use an Application Load Balancer to route traffic to the database.
AnswerA

Tasks in the same subnet can communicate via security groups.

Why this answer

ECS tasks should be launched in the same private subnet as the RDS instance to allow direct network communication via VPC routing, without needing internet gateways or NAT. Option B is incorrect because placing ECS tasks in a public subnet with a NAT gateway would require traffic to go through the NAT, but NAT gateways are for outbound internet access, not for inbound traffic to private resources; also, public subnets have direct internet access which is unnecessary and could introduce security risks. Option C is incorrect because a VPN connection is typically used for on-premises to VPC connectivity, not for internal VPC communication; VPC routing and security groups are sufficient.

Option D is incorrect because an Application Load Balancer is used for load balancing HTTP/HTTPS traffic to application targets, not for routing internal database traffic; it would add unnecessary complexity and latency.

25
Multi-Selectmedium

A company runs a web application on EC2 instances behind an ALB. The application uses an Amazon Aurora MySQL database. The operations team notices that the database CPU utilization is consistently above 80% during business hours. The team needs to reduce database load without changing the application code. Which TWO actions should the team take? (Select TWO.)

Select 2 answers
A.Create an Aurora read replica and direct read queries to it.
B.Increase the DB instance class to a larger size.
C.Implement an ElastiCache for Redis caching layer to cache frequent queries.
D.Enable Amazon RDS Performance Insights to identify slow queries.
E.Increase the Auto Scaling group maximum size to handle more traffic.
AnswersA, C

Read replicas offload read traffic from the primary instance.

Why this answer

Creating an Aurora read replica offloads read queries from the primary DB instance, reducing CPU load on it. Option C is correct because implementing an ElastiCache for Redis caching layer reduces the number of repeated read queries hitting the database, further lowering CPU utilization. Option B is wrong: while increasing the DB instance class could provide more CPU resources, it does not reduce load—it only scales up, which is not a best practice for immediate load reduction without code changes.

Option D is wrong because Performance Insights is a monitoring tool for identifying performance bottlenecks, not a direct mechanism to reduce database load. Option E is wrong because increasing the Auto Scaling group size only scales the application tier, which would increase traffic to the database, worsening the CPU issue.

26
MCQhard

A company hosts a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application uses an Amazon Aurora MySQL database. Recently, the application has become slow during peak hours. The operations team notices that the database CPU utilization is high, but the number of connections is within limits. The application is read-heavy. The team wants to improve performance with minimal changes to the application code. The database is currently a single Aurora instance. Which solution should the team implement?

A.Add an Aurora Replica and configure the application to use the reader endpoint for read-only queries.
B.Use Amazon DynamoDB Accelerator (DAX) to cache database queries.
C.Add an Amazon ElastiCache Redis cluster in front of the database.
D.Increase the instance size of the Aurora primary instance.
AnswerA

This offloads read traffic with minimal application changes.

Why this answer

Adding an Aurora Replica distributes read traffic, reducing load on the primary instance. The application must be configured to use the reader endpoint for read queries.

27
Multi-Selectmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application experiences intermittent latency spikes. The operations team has enabled detailed CloudWatch metrics and EC2 instance status checks. The team needs to identify the root cause of the latency. Which TWO actions should the team take to diagnose the issue? (Choose two.)

Select 2 answers
A.Enable detailed monitoring (1-minute metrics) on the ALB and create a CloudWatch dashboard to view the RequestCount and TargetResponseTime metrics.
B.Integrate the application with AWS X-Ray and enable tracing on the EC2 instances to capture trace data for all requests.
C.Set up an Amazon CloudWatch Synthetics canary that follows a step-by-step guide through the application and monitor the step durations.
D.Enable access logging on the ALB and analyze the logs to find requests with high latency.
E.Enable VPC Flow Logs on the subnets where the EC2 instances reside and analyze the logs for packet loss.
AnswersC, D

Correct: Canaries can measure end-to-end latency and pinpoint slow steps.

Why this answer

CloudWatch Synthetics canaries simulate user workflows step by step, and monitoring step durations helps pinpoint which specific part of the application is causing latency spikes. This provides granular, end-to-end visibility into the user experience beyond what aggregate metrics offer. Option D is correct because ALB access logs contain detailed information about each request, including timestamps, processing times, and response times.

Analyzing these logs can help identify specific requests that contribute to high latency, such as those with long target response times or backend errors.

Exam trap

The trap here is that candidates often confuse network-level diagnostics (VPC Flow Logs) or aggregate metrics (ALB detailed monitoring) with the application-level, user-experience-focused diagnostics needed to pinpoint the root cause of latency spikes in a web application.

28
MCQeasy

A company's security team wants to ensure that all S3 buckets are encrypted at rest. They have thousands of existing buckets. Which approach should a Solutions Architect use to identify noncompliant buckets?

A.Use AWS Trusted Advisor to check bucket encryption.
B.Analyze AWS CloudTrail logs for PutBucketEncryption API calls.
C.Enable S3 Inventory to list all objects and their encryption status.
D.Create an AWS Config rule to evaluate S3 bucket encryption settings.
AnswerD

Config rules can evaluate all buckets.

Why this answer

AWS Config provides managed rules to evaluate resource compliance. The 's3-bucket-server-side-encryption-enabled' rule checks if S3 buckets have server-side encryption enabled. This can be applied to all buckets in the account.

Option A is incorrect because while AWS Trusted Advisor can check for bucket encryption, AWS Config is specifically designed for continuous compliance monitoring and auditing at scale, making it the better approach for identifying noncompliant buckets across thousands of resources. Option B is incorrect: CloudTrail logs record API calls (like PutBucketEncryption), but do not show the current encryption configuration of existing buckets. Option C is incorrect: S3 Inventory provides a list of objects and their metadata, but it does not directly indicate bucket-level encryption settings; it focuses on object-level encryption.

29
MCQeasy

A company wants to monitor CPU utilization of their EC2 instances and receive an alert when utilization exceeds 80% for 10 minutes. Which AWS service should be used?

A.Amazon Inspector
B.AWS Config
C.Amazon CloudWatch Alarms
D.AWS CloudTrail
AnswerC

CloudWatch Alarms monitor metrics and send notifications.

Why this answer

CloudWatch Alarms can monitor metrics and trigger actions when a threshold is breached.

30
MCQmedium

A company uses Amazon DynamoDB as its primary database. The operations team is seeing increased read latency during peak hours. The table has a provisioned read capacity of 1000 RCU, but CloudWatch metrics show that consumed read capacity frequently reaches 1000 RCU. The application uses eventually consistent reads. What is the MOST cost-effective way to reduce read latency?

A.Switch to strongly consistent reads to improve consistency.
B.Enable DynamoDB Accelerator (DAX) to cache frequently read items.
C.Create a global secondary index (GSI) on the table to offload reads.
D.Increase the provisioned read capacity to 2000 RCU.
E.Use Amazon ElastiCache for Memcached as a read cache.
AnswerB

DAX provides microsecond read latency and reduces load on the table.

Why this answer

DynamoDB Accelerator (DAX) provides an in-memory cache that reduces read latency by serving frequently accessed items from cache, without increasing provisioned RCU. This is cost-effective as it adds minimal cost compared to increasing capacity. Option A is wrong because switching to strongly consistent reads consumes double the RCU (since they require a read of the primary replica), increasing cost and potentially worsening latency.

Option C is wrong because a Global Secondary Index (GSI) offloads reads from the base table but does not reduce latency for reads on the base table itself; it also incurs additional write costs. Option D is wrong because increasing RCU to 2000 would double the cost, though it might reduce throttling, it's not the most cost-effective. Option E is wrong because using ElastiCache adds operational complexity and cost, and DAX is a more seamless, DynamoDB-native caching solution.

31
Multi-Selectmedium

A company has an Amazon RDS for PostgreSQL database that is experiencing high CPU utilization due to a large number of read queries. They need to offload read traffic and improve performance. Which TWO actions should they take? (Choose TWO.)

Select 2 answers
A.Enable Multi-AZ deployment for the database.
B.Create one or more read replicas in the same Region.
C.Increase the instance size of the primary database.
D.Use Amazon ElastiCache to cache query results.
E.Implement an RDS Proxy to manage connections.
AnswersB, E

Read replicas serve read traffic, reducing load on the primary.

Why this answer

Read replicas offload read queries from the primary database, reducing CPU utilization. Option E is correct because RDS Proxy manages connections, reducing overhead from a large number of read queries. Option A is wrong: Multi-AZ provides high availability, not read scaling.

Option C is wrong: increasing instance size may help but does not specifically offload read traffic and is often more expensive than read replicas. Option D is wrong: ElastiCache caches query results but does not offload read queries from the database directly.

32
MCQmedium

A company is running a production web application on AWS Auto Scaling EC2 instances behind an Application Load Balancer. Recent deployments have caused intermittent errors. The team wants to implement a deployment strategy that minimizes downtime and allows for quick rollback. Which strategy should they use?

A.Deploy a new version to a single instance, test, then scale out.
B.Use blue/green deployment with a second Auto Scaling group and switch the ALB target group.
C.Perform rolling updates with a single Auto Scaling group, updating a few instances at a time.
D.Use an immutable deployment by launching a new Auto Scaling group and terminating the old one.
AnswerB

Blue/green allows instant switch and immediate rollback.

Why this answer

Blue/green deployment with a second Auto Scaling group and ALB switch allows instant rollback by switching back to the original environment. Option A is wrong because rolling updates with a single ASG can still cause partial downtime and slower rollback. Option C is wrong because it does not minimize downtime and requires manual intervention.

Option D is wrong because immutable deployments replace instances, but rollback requires redeployment.

33
Multi-Selectmedium

A company is using AWS CodePipeline to automate deployments. They want to add a manual approval step before deploying to production. Which TWO actions are required?

Select 2 answers
A.Create a Lambda function to trigger the approval
B.Add a manual approval action to the pipeline
C.Set up a CloudWatch Events rule to invoke the approval
D.Configure an SNS topic to notify the approver
E.Create an IAM role that allows the approver to perform the approval action
AnswersB, E

The pipeline must include a manual approval stage.

Why this answer

To add a manual approval step, you must add a manual approval action to the pipeline (option B) and create an IAM role that allows the approver to approve or reject (option E). The approval action itself provides an SNS topic for notification, but configuring it is optional. Options A, C, and D are incorrect: A (Lambda function) is not required; C (CloudWatch Events) is not required; D (SNS topic) is automatically created by the approval action, but explicit configuration is not required.

34
MCQeasy

A company uses AWS CloudFormation to manage infrastructure. They want to detect drift from the intended template configuration. Which service should they use?

A.AWS Config
B.AWS Service Catalog
C.AWS CloudTrail
D.CloudFormation Drift Detection
AnswerD

CloudFormation Drift Detection directly compares stack resources to the template.

Why this answer

AWS CloudFormation Drift Detection is a native feature that compares the actual resource configuration with the template, identifying any drift. This is the correct service for the stated requirement. AWS Config is used for compliance and resource inventory, not specifically for CloudFormation drift detection.

AWS Service Catalog helps manage approved IT services, and AWS CloudTrail logs API calls for auditing. Therefore, Option D is correct.

35
Multi-Selecthard

A company runs a containerized application on Amazon ECS with Fargate. They want to improve the security of their container images without slowing down the CI/CD pipeline. Which THREE measures should they implement?

Select 3 answers
A.Use AWS CodePipeline with approval gates for security checks.
B.Require manual vulnerability scanning before each deployment.
C.Encrypt all container images using AWS KMS.
D.Integrate Amazon ECR scanning into the CI/CD pipeline.
E.Implement image signing using AWS Signer.
AnswersA, D, E

Approval gates allow security review without manual scanning.

Why this answer

AWS CodePipeline with approval gates allows you to introduce manual or automated approval steps that can enforce security checks (e.g., vulnerability scan results, policy compliance) before a container image is promoted to production. This ensures that security validation occurs without blocking the entire CI/CD pipeline—only the deployment stage is gated, preserving pipeline speed for earlier stages like build and test.

Exam trap

The trap here is that candidates may confuse 'improving security' with 'adding manual steps' (Option B) or 'encrypting images' (Option C), failing to recognize that the question explicitly requires measures that do not slow down the CI/CD pipeline, making automated, integrated solutions (scanning, signing, and gated approvals) the correct choices.

36
Multi-Selectmedium

A company is migrating a legacy application to AWS. The application requires static IP addresses for whitelisting by external partners. The company will use a Network Load Balancer (NLB) to distribute traffic to EC2 instances. Which TWO actions should the company take to provide static IP addresses for the partners to whitelist?

Select 2 answers
A.Attach an Elastic IP to each EC2 instance.
B.Assign Elastic IP addresses to the Network Load Balancer.
C.Configure an Application Load Balancer instead of NLB.
D.Use AWS WAF to allow traffic from the partners' IP ranges.
E.Use AWS Global Accelerator with the NLB as an endpoint.
AnswersB, E

NLB supports Elastic IP per AZ, providing static IPs.

Why this answer

You can assign Elastic IP addresses to the Network Load Balancer per Availability Zone, providing static IPs for external partners to whitelist. Option E is correct because AWS Global Accelerator provides two static IP addresses (or allows you to bring your own) and can be used with an NLB as an endpoint, offering static IPs that partners can whitelist. Option A is incorrect because attaching Elastic IPs to EC2 instances does not provide static IPs for the NLB frontend; the NLB uses its own IPs.

Option C is incorrect because an Application Load Balancer (ALB) does not support static IP addresses by default and operates at layer 7, not suitable for this requirement. Option D is incorrect because AWS WAF is a web application firewall that filters traffic based on rules but does not provide static IP addresses for the load balancer.

37
Multi-Selectmedium

A company uses AWS Organizations with multiple accounts. The security team wants to enforce that all S3 buckets are encrypted with AWS KMS and prohibit public access. Which TWO actions should the team take?

Select 2 answers
A.Use AWS Config rules to automatically remediate non-compliant buckets.
B.Enable AWS CloudTrail to monitor and automatically remediate non-compliant buckets.
C.Create an SCP to deny s3:PutObject actions without the x-amz-server-side-encryption header set to aws:kms.
D.Create an S3 bucket policy in each account to enforce encryption and block public access.
E.Create an SCP to deny s3:PutBucketPublicAccessBlock and s3:PutBucketPolicy actions unless encryption is enabled.
AnswersA, C

Correct. AWS Config rules can detect non-compliant buckets for both encryption and public access, and trigger automatic remediation actions (e.g., enable encryption or block public access) to enforce compliance.

Why this answer

Uses AWS Config rules with automatic remediation to enforce compliance on both encryption and public access settings. Option C creates an SCP that denies s3:PutObject actions unless the x-amz-server-side-encryption header is set to aws:kms, ensuring new objects are encrypted with KMS. Option E is incorrect because it only denies put actions on bucket policies and public access blocks if encryption is not enabled, but does not itself prohibit public access; users could still enable public access if encryption is met.

Option B is incorrect because CloudTrail is for auditing, not remediation. Option D is incorrect because per-account bucket policies can be overridden and are less effective than organizational policies.

Exam trap

The trap is that Option E might seem correct because it mentions encryption and public access, but it does not actually prohibit public access—it only ties the ability to modify public access settings to having encryption enabled. The correct SCP for prohibiting public access would be one that outright denies actions that grant public access, which is not listed. Thus, remediation via AWS Config (Option A) is needed to actively fix public access violations.

38
MCQmedium

A company runs a batch processing application on AWS. The application reads input files from an S3 bucket, processes them on EC2 instances, and writes results to another S3 bucket. The processing job runs once a day and takes approximately 3 hours. The company wants to reduce costs and operational overhead. The Solutions Architect suggests using AWS Lambda for processing, but the processing time per file can exceed the Lambda maximum execution time of 15 minutes. The architect also considers using AWS Batch. The company wants to minimize the need for infrastructure management. Which solution should the Solutions Architect recommend?

A.Provision a fleet of EC2 instances and use Auto Scaling to manage the processing.
B.Use AWS Lambda with a larger memory allocation to increase CPU and reduce processing time.
C.Use AWS Batch with a managed compute environment that uses Spot Instances and a job queue.
D.Use Amazon ECS with Fargate launch type and run the processing as a task.
AnswerC

AWS Batch with a managed compute environment automatically handles job scheduling, scaling, and infrastructure provisioning. It can accommodate long-running jobs beyond Lambda's 15-minute limit and uses Spot Instances to reduce costs, minimizing operational overhead.

Why this answer

AWS Batch with a managed compute environment automatically handles job scheduling, scaling, and infrastructure provisioning. It can accommodate long-running jobs beyond Lambda's 15-minute limit and uses Spot Instances to reduce costs, minimizing operational overhead. Option A is incorrect because managing EC2 instances and Auto Scaling requires more operational effort than using a managed service like AWS Batch.

Option B is incorrect because even with increased memory, Lambda has a maximum execution time of 15 minutes, which may not be sufficient for processing files that exceed this limit. Option D is incorrect because while ECS with Fargate reduces infrastructure management, AWS Batch is specifically designed for batch processing and provides more features like job queues, automatic retries, and integration with Spot Instances, making it a better fit for this use case.

39
MCQmedium

A company runs a stateful web application on EC2 instances in an Auto Scaling group. The application uses a shared file system mounted on each instance. The company wants to minimize downtime during deployments. What should they use?

A.Use an in-place update without any hooks.
B.Use a rolling update with a lifecycle hook to gracefully handle connections and unmount the file system before instance termination.
C.Perform a blue/green deployment.
D.Terminate all instances and launch new ones.
AnswerB

Lifecycle hooks allow graceful shutdown.

Why this answer

A rolling update with a lifecycle hook (Option B) is the best approach for minimizing downtime in a stateful web application using a shared file system. The lifecycle hook allows the instance to gracefully handle existing connections and unmount the file system before termination, ensuring no data corruption or abrupt disconnection. This reduces downtime compared to other methods.

Option A (in-place update without hooks) risks disrupting active connections. Option C (blue/green deployment) may not work seamlessly with stateful applications due to shared storage. Option D (terminate all instances) causes full downtime.

40
MCQmedium

A company has an AWS Lambda function that processes files uploaded to an S3 bucket. The Lambda function has been running successfully for months. Recently, the company updated the Lambda function code and started seeing occasional throttling errors (HTTP 429) from the Lambda service. The function's reserved concurrency is set to 100. The company is unsure why throttling is occurring only after the code update. What is the MOST likely cause?

A.The Lambda function is writing logs to CloudWatch Logs at a rate that exceeds the CloudWatch throttling limit.
B.The S3 bucket is receiving more uploads than before, causing more Lambda invocations.
C.The updated Lambda function no longer has the required IAM permissions to access S3, causing retries that throttle.
D.The code update increased the execution time of the Lambda function, leading to a higher number of concurrent executions that exceed the account-level concurrency limit.
AnswerD

Longer execution time means more invocations overlap, increasing concurrency and potentially hitting account limits.

Why this answer

When a Lambda function's execution time increases due to a code update, each invocation holds a concurrency slot for longer. With reserved concurrency set to 100, if the function's invocations per second remain the same but each takes longer, the number of concurrent executions can exceed the account-level concurrency limit (default 1000), causing throttling (HTTP 429). Option A is wrong because CloudWatch Logs throttling would result in dropped log events, not Lambda throttling errors.

Option B is wrong because if the S3 bucket received the same rate of uploads, the invocation rate wouldn't change; the question states throttling occurred only after the code update, not due to increased uploads. Option C is wrong because missing IAM permissions would cause access denied errors (HTTP 403), not throttling errors.

41
MCQeasy

A company uses AWS CodePipeline to deploy a web application. They want to automatically roll back the deployment if the new version fails CloudWatch alarm-based health checks. Which feature should they use?

A.AWS Lambda function invoked by CloudWatch Events.
B.Amazon Route 53 health checks with failover routing.
C.AWS CodeBuild with post-build actions.
D.CodeDeploy automatic rollback configuration with CloudWatch alarm.
AnswerD

CodeDeploy supports automatic rollback when a CloudWatch alarm is in ALARM state.

Why this answer

AWS CodeDeploy natively supports automatic rollback triggered by CloudWatch alarms. When a deployment causes a CloudWatch alarm to enter an ALARM state, CodeDeploy can automatically revert to the previous working version. This is the most straightforward and integrated solution for the requirement.

Option A (Lambda + CloudWatch Events) is possible but not the primary recommended feature. Option B (Route 53 health checks) is for DNS-level failover, not deployment rollback. Option C (CodeBuild post-build actions) is for build phase, not post-deployment monitoring.

42
MCQhard

A company has an S3 bucket that stores critical data. They need to ensure that all objects are encrypted at rest. The bucket policy currently denies uploads if the x-amz-server-side-encryption header is not set to AES256. However, some objects are still stored with SSE-KMS. How can the company enforce SSE-S3 exclusively?

A.Use S3 Lifecycle policies to transition objects to SSE-S3.
B.Enable default encryption on the bucket with SSE-S3.
C.Update the bucket policy to deny uploads with SSE-KMS.
D.Use S3 Object Lambda to change encryption.
AnswerC

Denying SSE-KMS enforces SSE-S3.

Why this answer

Updating the bucket policy to explicitly deny uploads with SSE-KMS ensures that only SSE-S3 encryption is allowed. The current policy denies uploads without the x-amz-server-side-encryption header set to AES256, but it does not prevent uploads that specify SSE-KMS (which uses a different header value). By adding a deny condition for SSE-KMS, the company can enforce SSE-S3 exclusively.

Option A is incorrect because S3 Lifecycle policies manage object transitions and expiration, not encryption enforcement. They cannot change encryption of existing objects or prevent new uploads with unauthorized encryption.

Option B is incorrect because enabling default encryption on the bucket applies only to objects uploaded without explicit encryption headers. It does not block uploads that specify SSE-KMS or other encryption methods, as the request headers override default encryption.

Option D is incorrect because S3 Object Lambda is designed to transform data when objects are retrieved, not to enforce encryption settings on new uploads. It cannot change the encryption of objects at rest.

43
MCQmedium

A company is using Amazon S3 to store critical data and needs to ensure that objects are automatically deleted after 30 days. The current lifecycle policy is configured to expire objects after 30 days, but objects are not being deleted. What is the most likely cause?

A.The bucket has versioning enabled, and lifecycle rules apply only to current versions.
B.The objects are stored in the S3 Glacier Deep Archive storage class.
C.The bucket has S3 Object Lock enabled with a retention period exceeding 30 days.
D.The IAM role used by S3 Lifecycle lacks the s3:DeleteObject permission.
AnswerC

Object Lock prevents object deletion before retention expires.

Why this answer

S3 Object Lock with a retention period exceeding 30 days prevents lifecycle expiration until the retention period ends. Option A is incorrect: when versioning is enabled, lifecycle expiration still applies – S3 creates a delete marker for the current version and permanently deletes noncurrent versions based on the noncurrent days configuration. Option B is incorrect: storage class (including Glacier Deep Archive) does not block expiration; objects in any class can be expired.

Option D is incorrect: S3 Lifecycle does not use an IAM role; it operates under the bucket's permissions, and while a bucket policy denying s3:DeleteObject could block deletion, the issue described is not with an IAM role.

44
Multi-Selecteasy

A company uses Amazon S3 to store critical data. They need to ensure that data is encrypted at rest. Which TWO methods can achieve this?

Select 2 answers
A.Enable SSL/TLS for the S3 bucket
B.Configure a bucket policy to enforce encryption
C.Use client-side encryption
D.Use AWS KMS (SSE-KMS)
E.Use S3-Managed Keys (SSE-S3)
AnswersD, E

Correct. SSE-KMS uses AWS KMS to manage encryption keys, providing encryption at rest.

Why this answer

Options D and E are correct. Both SSE-KMS (AWS KMS) and SSE-S3 (S3-Managed Keys) are server-side encryption options that encrypt data at rest in Amazon S3. Option A (SSL/TLS) encrypts data in transit, not at rest.

Option B (bucket policy) controls access permissions but does not provide encryption. Option C (client-side encryption) would encrypt data before sending to S3, but it is not an AWS-managed service and requires client-side implementation; the question focuses on encryption at rest provided by AWS.

45
MCQmedium

A CloudFormation stack update failed with the above error. What is the likely cause?

A.The S3 bucket does not contain the zip file.
B.The IAM role ARN is incorrect.
C.The timeout value is too high.
D.The runtime is no longer supported by AWS Lambda.
AnswerD

Node.js 14.x is deprecated.

Why this answer

The error message explicitly states that the runtime 'nodejs14.x' is not supported. Option A is wrong because the S3 bucket is not the issue. Option B is wrong because the role ARN is correct.

Option C is wrong because the timeout is within limits.

46
Multi-Selectmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application experiences high request latency during peak traffic. A solutions architect discovers that the ALB is not distributing traffic evenly across the instances. The instances have different sizes (t3.large and t3.xlarge). Which TWO actions should the solutions architect take to improve load distribution?

Select 2 answers
A.Enable connection draining on the target group.
B.Replace all instances with the same instance type.
C.Change the ALB routing algorithm from round robin to least outstanding requests.
D.Enable sticky sessions (session affinity) on the target group.
E.Increase the deregistration delay (connection draining) on the target group to 300 seconds.
AnswersB, C

Using the same instance type eliminates capacity differences, allowing round-robin to distribute evenly.

Why this answer

The correct answers are B and C. Option B: Using the same instance type ensures uniform capacity, so round-robin routing distributes traffic evenly. Option C: Changing the routing algorithm to least outstanding requests (LOR) distributes traffic based on pending requests, naturally giving more traffic to larger instances (t3.xlarge) and balancing load despite size differences.

Option A (connection draining) helps with graceful deregistration but does not improve distribution. Option D (sticky sessions) worsens distribution by pinning users. Option E (increasing deregistration delay) does not affect distribution.

Exam trap

Candidates often mistake connection draining for a load-distribution mechanism. It only handles in-flight requests during deregistration.

47
MCQhard

A company has a monolithic application running on a single EC2 instance. The application experiences performance issues during peak hours. The company decides to migrate to a microservices architecture using AWS Lambda and Amazon API Gateway. The migration must be done incrementally without downtime. What strategy should the company use?

A.Deploy all microservices in a new VPC and cut over DNS after testing.
B.Create a new version of the monolith that calls Lambda functions as backend.
C.Use AWS CodeDeploy to perform a blue/green deployment of the monolith to Lambda.
D.Use the strangler fig pattern: implement API Gateway to route traffic to new Lambda functions for specific endpoints while keeping the monolith for others.
AnswerD

Allows incremental migration without downtime.

Why this answer

The strangler fig pattern allows incremental migration by routing specific API requests to new Lambda functions via API Gateway while keeping the monolithic application for the rest. This approach avoids downtime. Option A is incorrect because deploying all microservices in a new VPC and cutting over DNS risks downtime and is not incremental.

Option B is incorrect because creating a new version of the monolith that calls Lambda functions still leaves the monolith in place and does not fully utilize API Gateway for routing. Option C is incorrect because CodeDeploy blue/green deployment is for deploying to EC2 or Lambda, but it does not provide a pattern for incremental migration of a monolith to microservices; the strangler fig pattern is more appropriate.

48
MCQmedium

A company is running a batch processing job on an EC2 instance that processes data from an S3 bucket and writes results to another S3 bucket. The job runs once per hour and takes about 20 minutes. The company wants to optimize costs by only paying for compute time when the job is running. Which solution is MOST cost-effective?

A.Convert the batch job into an AWS Lambda function.
B.Purchase a Reserved Instance for the EC2 instance to reduce hourly cost.
C.Use a t3.micro instance and keep it running 24/7 since it's low cost.
D.Use AWS Batch with spot instances to run the job only when needed.
AnswerD

Pay only for compute time, spot reduces cost.

Why this answer

AWS Batch automatically provisions and terminates EC2 instances based on job queue requirements, and it can use Spot Instances for significant cost savings. Option A (AWS Lambda) is wrong because the batch job takes 20 minutes, exceeding the 15-minute maximum execution time for Lambda functions. Option B (Reserved Instance) is wrong because it requires a 1-year commitment and still incurs costs for idle hours when the job is not running.

Option C (t3.micro running 24/7) is wrong because while it is low-cost, it still charges for idle time, making it less cost-effective than only paying for compute during job execution.

49
Multi-Selecthard

A company runs a critical application on Amazon ECS with Fargate launch type. The application needs to be highly available across multiple Availability Zones. The company wants to implement blue/green deployments to minimize downtime. Which THREE steps should the solutions architect take?

Select 3 answers
A.Store the application artifacts in Amazon ECR and use an ECS service with a single task definition.
B.Use a Network Load Balancer to route traffic to the ECS service.
C.Create two separate ECS task definitions for the blue and green environments.
D.Use AWS CodeDeploy with a blue/green deployment configuration.
E.Configure an Application Load Balancer with a target group for each task set.
AnswersC, D, E

Creating two separate ECS task definitions allows independent updates for blue and green environments, which is essential for blue/green deployments.

Why this answer

Options C, D, and E are correct because blue/green deployments for ECS require separate task definitions for each environment (C), CodeDeploy to manage traffic shifting (D), and an Application Load Balancer with separate target groups for each task set to route traffic (E). Option A is incorrect because storing artifacts in ECR is about container images, not a deployment step. Option B is incorrect because using a load balancer is a prerequisite for any ECS service, but it is not one of the specific steps required to implement blue/green deployments.

The blue/green-specific steps are C, D, and E.

50
MCQeasy

A company has a monolithic application running on a single Amazon EC2 instance. The application stores data on an instance store volume. The company wants to improve availability and disaster recovery with minimal architectural changes. What is the MOST cost-effective solution?

A.Replace the instance store volume with an Amazon EBS volume, create an AMI, and use Auto Scaling with an Application Load Balancer.
B.Attach an Amazon EBS volume and configure the application to write to it, then take periodic EBS snapshots.
C.Use AWS Backup to schedule backups of the instance and restore to a new instance if needed.
D.Create an AMI from the instance and launch a second instance in a different Availability Zone behind an Application Load Balancer.
AnswerA

EBS provides persistent storage, and Auto Scaling with ALB improves availability and disaster recovery.

Why this answer

The most cost-effective solution with minimal architectural changes. By replacing the ephemeral instance store with an EBS volume, the data becomes persistent. Then creating an AMI and using Auto Scaling with an Application Load Balancer provides high availability and disaster recovery automatically.

Option B only adds backups but does not provide high availability, and restoring from snapshots is slower. Option C, AWS Backup, cannot back up instance store data directly, so it is ineffective. Option D provides high availability but still uses instance store, so data is lost on instance failure; it also does not address data persistence.

Therefore, Option A is correct.

51
MCQmedium

A company uses Amazon RDS for MySQL with Multi-AZ deployment. They notice that during a failover, the application experiences a brief outage but then recovers. They want to minimize the failover time. Which action will most effectively reduce the failover time?

A.Disable Multi-AZ to avoid failover altogether.
B.Create a read replica and promote it during failover.
C.Enable Amazon RDS Proxy.
D.Increase the DB instance size to improve performance.
AnswerC

RDS Proxy maintains connections across failovers, reducing downtime.

Why this answer

Enabling Amazon RDS Proxy provides connection pooling and reduces failover time by keeping connections alive during failover. Option A is wrong because disabling Multi-AZ removes high availability and increases downtime. Option B is wrong because read replicas are for read scaling and promoting a replica involves manual intervention and DNS changes, which does not minimize failover time as effectively as RDS Proxy.

Option D is wrong because increasing the DB instance size improves performance but does not directly affect failover time.

52
MCQeasy

A company is using AWS CloudFormation to manage infrastructure. The security team requires that all CloudFormation stacks include a specific tag (CostCenter). The company wants to enforce this tag automatically. Which method should be used to enforce the tag?

A.Use AWS Service Catalog to enforce mandatory tags on all provisioned products.
B.Use an AWS Config rule to check for the tag and a custom IAM policy to deny stack creation without the tag.
C.Create an AWS Lambda function that checks for the tag and sends alerts.
D.Use AWS Resource Groups to tag resources after stack creation.
AnswerB

Config can detect and IAM policy can prevent non-compliant stack creation.

Why this answer

An AWS Config rule can detect stacks missing the required tag, and a custom IAM policy can deny the ability to create or update stacks that do not have the tag, providing preventive enforcement. Option A is incorrect because AWS Service Catalog can enforce tags on products it provisions, but the question is about all CloudFormation stacks, not just those from Service Catalog. Option C is incorrect because a Lambda function can alert or remediate after the fact, but it does not prevent creation of non-compliant stacks.

Option D is incorrect because tagging after creation does not enforce the tag requirement at creation time, and AWS Resource Groups is not an enforcement mechanism.

53
MCQeasy

A company is using Amazon DynamoDB as the primary database for a web application. The application experiences occasional throttling on writes. The company wants to implement a solution that automatically increases write capacity during traffic spikes. Which solution should they use?

A.Switch to DynamoDB On-Demand capacity mode.
B.Implement DynamoDB Accelerator (DAX) for caching.
C.Use DynamoDB Global Tables to distribute writes.
D.Enable DynamoDB Auto Scaling for write capacity.
AnswerD

Auto Scaling adjusts capacity based on actual utilization.

Why this answer

DynamoDB Auto Scaling automatically adjusts the provisioned write capacity based on actual traffic patterns, preventing throttling during spikes while optimizing costs. Option A is wrong because On-Demand capacity mode handles spikes but incurs higher costs and does not involve manual auto-scaling configuration. Option B is wrong because DAX is an in-memory cache that reduces read latency, not a scaling solution for write capacity.

Option C is wrong because Global Tables provide multi-region replication and disaster recovery but do not address write throttling in a single region.

54
MCQhard

An e-commerce company runs a customer-facing application on AWS. The application architecture includes an Application Load Balancer (ALB), EC2 instances in an Auto Scaling group, and an Amazon RDS for MySQL Multi-AZ DB instance. The application uses a custom web server that stores session data in a local file system. During peak traffic, users experience session timeouts and errors. The operations team observes that the Auto Scaling group launches new instances and terminates old ones frequently. The team wants to improve the user experience and ensure session persistence. The Solutions Architect proposes to modify the application to store session data in an external store. However, due to a legacy code dependency, the application cannot be modified in the short term. Which solution should the Solutions Architect implement to resolve the session persistence issue without modifying the application?

A.Replace the local file system storage with an Amazon ElastiCache for Redis cluster that is external to the instances.
B.Enable sticky sessions (session affinity) on the ALB and configure the Auto Scaling group to use a lifecycle hook to drain connections before instance termination.
C.Store session data in Amazon DynamoDB and configure the application to use the DynamoDB session handler.
D.Configure the Auto Scaling group to scale down based on memory utilization rather than CPU, to reduce termination frequency.
AnswerB

Sticky sessions route user to same instance; lifecycle hook ensures sessions complete before termination.

Why this answer

Enabling sticky sessions on the ALB ensures that a user's requests are always routed to the same instance, preserving the local session files. Additionally, configuring a lifecycle hook to drain connections before instance termination prevents session loss during scale-in events. Option A is incorrect because ElastiCache requires application code changes to use it.

Option C is incorrect because DynamoDB also requires code changes. Option D is incorrect because scaling down based on memory does not prevent session loss; it may cause more terminations.

55
Multi-Selectmedium

An e-commerce company runs its application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application uses an Amazon Aurora MySQL DB cluster with one writer and two reader instances. During a sales event, the database CPU utilization is high, and read replicas show high replica lag. The company needs to improve the read scalability and reduce replica lag. Which THREE actions should the company take? (Choose THREE.)

Select 3 answers
A.Add more reader instances to the cluster to distribute the read traffic.
B.Enable Multi-AZ for the cluster to improve read availability.
C.Increase the instance size of the writer instance to improve write throughput.
D.Increase the instance size of the reader instances to larger instance types.
E.Enable Aurora Auto Scaling for the reader instances.
AnswersA, D, E

More readers improve read scalability.

Why this answer

Adding more reader instances (Option A) distributes the read workload across additional nodes, reducing the load on each reader and helping to lower replica lag. Aurora Auto Scaling (Option E) automatically adjusts the number of reader instances based on metrics like CPU utilization or replica lag, providing dynamic scaling during traffic spikes. Increasing the instance size of reader instances (Option D) provides more CPU and memory resources to each reader, enabling them to process more read queries and apply changes from the writer faster, which directly reduces replica lag.

Exam trap

The trap here is that candidates may confuse Multi-AZ with read scaling, but Multi-AZ in Aurora is for high availability only and does not distribute read traffic, while the real solutions involve adding more readers, scaling readers up, or using Auto Scaling to handle variable load.

56
Multi-Selecthard

A company is using AWS CodePipeline to automate deployments. The pipeline includes a build stage that compiles code and runs tests. The build stage fails intermittently due to network timeouts when downloading dependencies. Which THREE actions could improve the reliability of the build stage?

Select 3 answers
A.Increase the build timeout to allow more time for downloads.
B.Use CodeBuild local cache to store dependencies across builds.
C.Run the CodeBuild project in a VPC with a NAT gateway to ensure consistent outbound connectivity.
D.Store dependencies in an S3 bucket and configure the build to use cached dependencies.
E.Use a larger compute type for CodeBuild to improve network speed.
AnswersB, C, D

Local cache reduces download frequency.

Why this answer

Options B, C, and D are correct: Using CodeBuild local cache (B) stores dependencies across builds, reducing download time. Running CodeBuild in a VPC with a NAT gateway (C) ensures consistent outbound connectivity, mitigating network timeouts. Storing dependencies in an S3 bucket and configuring the build to use cached dependencies (D) also reduces reliance on external downloads.

Option A is incorrect because increasing the timeout only delays the failure but does not address the root cause. Option E is incorrect because a larger compute type may improve build speed but does not fix network timeouts.

57
MCQmedium

A solutions architect deployed the above CloudFormation template. However, the Lambda function is not triggered when objects are uploaded to the S3 bucket. What is the most likely cause?

A.The BucketNotification resource depends on MyLambdaFunction, but the notification configuration is incorrect.
B.The Lambda function lacks a resource-based policy that allows S3 to invoke it.
C.The Lambda execution role does not have permission to access S3.
D.The Lambda function code does not read the S3 object content.
AnswerB

Without an 'InvokeFunction' permission for S3, the trigger will fail.

Why this answer

The Lambda function requires a resource-based policy (also known as a function policy) that grants the S3 service permission to invoke the function. The CloudFormation template does not include such a policy, so S3 cannot trigger the Lambda function. Option A is incorrect because the BucketNotification resource is correctly configured to send events to the Lambda function, but the function itself lacks the invoke permission.

Option C is incorrect because the Lambda execution role manages permissions for the function to access other services (like CloudWatch Logs), not for other services to invoke it. Option D is irrelevant because the trigger itself is the issue, not the function code.

58
Multi-Selecthard

A company uses AWS CodePipeline to deploy a serverless application. They want to automatically test the deployment in a staging environment before promoting to production. Which THREE actions should they include in their pipeline? (Choose THREE.)

Select 3 answers
A.A build stage that packages the application using AWS CodeBuild.
B.A manual approval step before deploying to production.
C.A deploy stage that deploys to production after staging tests pass.
D.A test stage that deploys to a staging environment and runs integration tests.
E.A deploy stage that deploys to a canary environment.
AnswersA, C, D

The build stage packages the application using AWS CodeBuild, preparing it for deployment.

Why this answer

The correct actions are: a build stage (Option A) to package the application using AWS CodeBuild, a test stage (Option D) that deploys to a staging environment and runs integration tests, and a deploy stage (Option C) that deploys to production after staging tests pass. Option B (manual approval) is not required because the goal is automatic testing before promotion, and Option E (canary deploy) is not specified as part of the requirement.

59
MCQhard

A company has a multi-account AWS organization with hundreds of accounts. The security team wants to ensure that all accounts have AWS Config enabled with a specific set of rules. They also want to automatically remediate non-compliant resources. Which solution is MOST scalable and operationally efficient?

A.Use AWS CloudFormation StackSets to deploy Config rules to all accounts.
B.Use AWS Config rules in each account with AWS Lambda functions for remediation.
C.Use AWS Config conformance packs deployed via AWS Organizations with automatic remediation using Systems Manager Automation.
D.Use an AWS Config aggregator in the management account to view compliance across accounts.
AnswerC

Centralized, scalable, automated.

Why this answer

AWS Config conformance packs can be deployed at the organization level using AWS Organizations, enabling centralized management of rules across hundreds of accounts. Automatic remediation is achieved by associating Systems Manager Automation documents with non-compliant resources. Option A is incorrect because CloudFormation StackSets require per-account deployment and management, which does not scale as efficiently as conformance packs.

Option B is incorrect because Config rules in each account with Lambda functions lack centralized deployment and management. Option D is incorrect because an AWS Config aggregator only provides a cross-account compliance view, not enforcement or remediation.

60
Multi-Selectmedium

A company is using an AWS Lambda function to process files uploaded to an S3 bucket. The function is written in Python and uses the boto3 library to read the files. Recently, some files have been processed multiple times. Which TWO measures should a solutions architect implement to ensure idempotent processing?

Select 2 answers
A.Use a DynamoDB table to store processed file IDs and check for duplicates before processing.
B.Configure the S3 bucket to send events to an SQS queue and use the Lambda function to poll the queue.
C.Increase the Lambda function timeout to 15 minutes.
D.Configure S3 event notifications to filter by prefix and suffix to avoid triggering multiple times.
E.Enable S3 Transfer Acceleration on the bucket.
AnswersA, D

Idempotency key store prevents duplicate processing.

Why this answer

Options A and D are correct. Using a DynamoDB table to store processed file IDs (A) ensures idempotency by checking for duplicates before processing. Configuring S3 event notifications with prefix and suffix filters (D) reduces the chance of triggering multiple invocations for the same file.

Option B is incorrect because simply using an SQS queue does not guarantee idempotent processing; additional deduplication logic is needed. Option C is incorrect because increasing the Lambda timeout does not prevent multiple invocations. Option E is incorrect because S3 Transfer Acceleration improves upload speed, not idempotency.

61
MCQhard

A solutions architect applies the IAM policy shown in the exhibit to an IAM user. The user attempts to upload an object to the S3 bucket 'my-bucket' without specifying the 'x-amz-server-side-encryption' header. What will happen?

A.The upload succeeds because the Allow statement grants the s3:PutObject permission.
B.The upload succeeds because the Deny statement only applies when the header is present but set to a value other than AES256.
C.The upload fails because the Deny statement blocks any PutObject request that does not specify AES256 encryption.
D.The upload fails because the condition is malformed and causes an error.
AnswerC

The Deny statement with StringNotEquals denies if encryption header is not present or not AES256.

Why this answer

The Deny statement with a StringNotEquals condition on the 's3:x-amz-server-side-encryption' header will block any PutObject request where the header is not present or is set to a value other than 'AES256'. Since the user does not specify the header, the condition evaluates to true, and the Deny applies, causing the upload to fail. Option B is incorrect because the Deny statement applies even when the header is missing, not only when it is present with a different value.

Option A is incorrect because the Allow statement's condition is not met, so it does not grant permission. Option D is incorrect because the condition is valid and correctly evaluated.

62
MCQmedium

A company runs a stateless web application on EC2 instances in an Auto Scaling group. The application is deployed across multiple Availability Zones. The team notices that during a recent traffic spike, some instances were terminated and replaced, causing a temporary drop in performance. How can the team improve the resilience of the application?

A.Purchase Reserved Instances to ensure capacity.
B.Use lifecycle hooks to wait for instance termination.
C.Increase the instance size to handle more traffic.
D.Configure a warm pool for the Auto Scaling group.
AnswerD

Warm pools keep pre-initialized instances ready to replace terminated ones quickly.

Why this answer

A warm pool pre-initializes instances, reducing the time needed for new instances to become ready during scale-out events. Option A is wrong because Reserved Instances guarantee capacity but do not reduce the initialization delay. Option B is wrong because lifecycle hooks can delay termination but do not accelerate instance readiness.

Option C is wrong because larger instance size does not prevent the temporary drop in performance caused by instance replacement delays.

63
MCQmedium

A company uses AWS Lambda to process events from an Amazon SQS queue. The Lambda function is invoked with a batch size of 10. Recently, the function started failing with timeout errors when processing large batches. Which solution would improve the reliability of event processing without losing messages?

A.Increase the SQS queue visibility timeout to match the function timeout.
B.Increase the Lambda function reserved concurrency to handle more invocations.
C.Increase the Lambda function timeout to the maximum 15 minutes.
D.Reduce the batch size to a smaller value, such as 5.
AnswerD

Smaller batches reduce processing time per invocation.

Why this answer

Reducing the batch size decreases the number of messages processed per invocation, which reduces the total processing time and helps avoid timeouts. Option A is incorrect because increasing the visibility timeout does not reduce the processing time within the function; it only prevents messages from becoming visible again before the function finishes. Option B is incorrect because increasing reserved concurrency increases the number of concurrent invocations but does not affect the processing time of a single invocation.

Option C is incorrect because increasing the function timeout to 15 minutes may allow the function to complete, but it does not address the root cause of long processing times and could lead to higher costs and delayed processing; reducing the batch size is a more targeted solution.

64
Multi-Selecthard

A company has a fleet of EC2 instances that process data from an SQS queue. The instances are part of an Auto Scaling group. The team notices that the queue depth is growing, but the Auto Scaling group is not scaling out quickly enough. Which THREE actions should the team take to improve the scaling responsiveness? (Choose three.)

Select 3 answers
A.Use a custom CloudWatch metric for the SQS queue depth to drive scaling.
B.Decrease the AWS CloudWatch metric warm-up time.
C.Reduce the Auto Scaling group cooldown period.
D.Use a step scaling policy instead of a simple scaling policy.
E.Increase the instance size in the launch template.
AnswersA, C, D

Custom metrics can trigger scaling based on actual queue length.

Why this answer

Using a custom CloudWatch metric for SQS queue depth enables scaling based on actual workload, providing more responsive scaling than the default CPU or network metrics. Option C: Reducing the cooldown period allows the Auto Scaling group to launch instances more quickly after a scaling activity, improving responsiveness. Option D: Step scaling policies adjust capacity incrementally based on the size of the alarm breach, allowing more aggressive scaling when queue depth is high.

Options B and E are incorrect: Decreasing warm-up time is not a supported CloudWatch feature, and increasing instance size does not improve scaling speed but rather increases capacity per instance.

65
MCQeasy

A company has an Amazon S3 bucket that stores sensitive data. They want to ensure that all objects in the bucket are encrypted at rest. What should they do?

A.Use AWS CloudTrail to monitor for unencrypted objects.
B.Enable default encryption on the S3 bucket using SSE-S3 or SSE-KMS.
C.Enable S3 Versioning to protect objects.
D.Create a bucket policy that denies PutObject if the object is not encrypted.
AnswerB

Enabling default encryption using SSE-S3 or SSE-KMS ensures that all new objects written to the bucket are encrypted at rest.

Why this answer

Enabling default encryption on the bucket ensures all new objects are encrypted. Option A is wrong because CloudTrail only logs and does not enforce encryption. Option C is wrong because versioning does not enforce encryption.

Option D is wrong because a bucket policy that denies PutObject if not encrypted can be circumvented or does not cover existing objects, but default encryption is more straightforward.

66
MCQhard

A company uses AWS CodePipeline to deploy a microservices application to Amazon ECS Fargate. The pipeline includes stages for source, build, and deploy. The deploy stage uses an ECS service with a blue/green deployment configuration. After a recent update, the deployment fails with the error: 'The service cannot be deployed because the target group is not in a healthy state.' The target group health checks are configured with path '/health', interval 30 seconds, unhealthy threshold 2. The application health endpoint returns 200 OK. What should the company do to resolve this issue?

A.Redeploy the previous version of the application that passed health checks.
B.Modify the target group health check to use path '/' instead of '/health'.
C.Create a new target group with the correct health check path and update the ECS service.
D.SSH into the Fargate container and restart the application.
AnswerB

A common path ensures both blue and green targets pass health checks during the transition.

Why this answer

The CodePipeline deploy action uses CodeDeploy for blue/green deployments. The error indicates that the original target group (blue) is not healthy, possibly because the health check path is not valid for the original application version. Adjusting the health check to a common path like '/' allows both versions to pass.

Option A is incorrect because Fargate does not allow SSH. Option C is incorrect because redeploying the same version won't fix the underlying health check issue. Option D is incorrect because a new target group does not address the root cause.

67
Multi-Selectmedium

A company is using Amazon S3 to store sensitive data. The security team wants to ensure that all objects are encrypted at rest. The company currently uses server-side encryption with S3 managed keys (SSE-S3). The team wants to enforce encryption using a customer-managed key (CMK) from AWS KMS. Which TWO actions should the team take?

Select 2 answers
A.Configure a bucket policy that denies PutObject if the x-amz-server-side-encryption header is not set to 'aws:kms'.
B.Enable AWS CloudTrail to audit all PutObject requests.
C.Enable default encryption on the bucket with AWS KMS (SSE-KMS) as the encryption type.
D.Configure a bucket policy that allows PutObject only if the object is encrypted.
E.Disable SSE-S3 on the bucket so that only SSE-KMS can be used.
AnswersA, C

Correct. Denies PutObject if x-amz-server-side-encryption header is not set to 'aws:kms', enforcing SSE-KMS.

Why this answer

(bucket policy denying PutObject without x-amz-server-side-encryption header set to 'aws:kms') enforces that all uploads must specify SSE-KMS at the request level. Option C (default encryption with SSE-KMS) ensures that objects uploaded without encryption headers are automatically encrypted with a KMS key. Together, they enforce encryption with customer-managed KMS keys.

Option B (CloudTrail auditing) logs requests but does not enforce encryption. Option D (bucket policy allowing PutObject only if encrypted) allows any encryption type, not specifically KMS, so it does not enforce customer-managed keys. Option E (disabling SSE-S3) is not possible; you cannot disable SSE-S3, only set default encryption, and it would not enforce KMS alone.

68
MCQeasy

A company uses Amazon S3 to store sensitive data. The security team requires that all objects be encrypted at rest. The company currently uses server-side encryption with S3-managed keys (SSE-S3). The security team wants to ensure that only authorized users can access the decryption keys. What should the company do?

A.Configure an S3 bucket policy to allow only specific IAM roles to put objects.
B.Continue using SSE-S3 and enable S3 Block Public Access.
C.Use client-side encryption with an AWS KMS key.
D.Change the default encryption to server-side encryption with AWS KMS (SSE-KMS) and apply IAM policies to control key usage.
AnswerD

SSE-KMS allows key management and access control via IAM.

Why this answer

SSE-KMS allows the company to use AWS KMS for centralized key management and access control, ensuring that only authorized users can access the decryption keys. Option A is incorrect because an S3 bucket policy restricting put permissions does not control access to existing objects' encryption keys. Option B is incorrect because SSE-S3 keys are managed by AWS, not the customer, so the security team cannot enforce key access controls.

Option C is incorrect because client-side encryption does not use S3 server-side encryption and would require managing keys outside of AWS.

69
MCQmedium

A social media startup uses AWS Lambda functions to process user-uploaded images. The Lambda function resizes images and stores them in Amazon S3. The function uses the S3 SDK to put objects. Recently, the team noticed that the function sometimes fails with 'Timeout' errors for large images. The Lambda function has a timeout of 5 seconds and 256 MB of memory. The team wants to improve the solution to handle larger images reliably and cost-effectively. Which solution should the team implement?

A.Migrate the image processing to a dedicated Amazon EC2 instance with an EBS volume.
B.Increase the Lambda function's timeout to 15 minutes and allocate more memory (e.g., 1024 MB).
C.Use Amazon API Gateway with a larger payload limit to offload the image processing.
D.Use AWS Elastic Transcoder to resize images instead of Lambda.
AnswerB

More memory and timeout allow processing larger images within Lambda limits.

Why this answer

(increase memory and timeout) directly addresses the issue: increasing memory also increases CPU and network throughput, which helps process large images faster; increasing timeout gives more time. Option A (EC2 with EBS) is overkill and not serverless, losing the benefits of Lambda. Option C (API Gateway with larger payload) does not help with Lambda's internal processing limits.

Option D (Elastic Transcoder) is for video transcoding, not image resizing.

70
Multi-Selectmedium

A company is using Amazon S3 to store sensitive data. The security team wants to ensure that all objects uploaded to specific S3 buckets are encrypted at rest. Which TWO actions should they take? (Choose 2)

Select 2 answers
A.Use a bucket policy that denies PutObject without the x-amz-server-side-encryption header.
B.Configure default encryption on the S3 buckets to use SSE-S3 or SSE-KMS.
C.Enable S3 Cross-Region Replication.
D.Enable S3 Versioning on the buckets.
E.Enable S3 Server Access Logs.
AnswersA, B

Denies uploads without encryption.

Why this answer

Options A and B are correct. A bucket policy that denies PutObject without the x-amz-server-side-encryption header enforces encryption at upload time, ensuring all objects are encrypted. Default encryption on the bucket automatically encrypts objects that are uploaded without encryption headers, covering cases where the policy may not apply.

Option C (Cross-Region Replication) replicates objects but does not enforce encryption. Option D (Versioning) provides object version management and can help protect against overwrites, but does not enforce encryption. Option E (Server Access Logs) provides logging but does not enforce encryption.

71
MCQhard

A company runs a real-time analytics platform on Amazon Kinesis Data Streams with multiple consumers. The stream is provisioned with 10 shards. One consumer is falling behind, causing data latency. The consumer reads data using the Kinesis Client Library (KCL). Which action will improve the consumer's processing throughput?

A.Decrease the batch size in the KCL configuration.
B.Increase the number of shards in the Kinesis stream.
C.Increase the Kinesis stream's retention period to 7 days.
D.Increase the number of EC2 instances running the consumer application.
AnswerD

Adding more EC2 instances adds workers, allowing KCL to distribute shards across them, increasing parallel processing and improving throughput.

Why this answer

The Kinesis Client Library (KCL) distributes shard processing across workers. Increasing the number of EC2 instances running the consumer application adds more workers, allowing parallel processing of shards and thus improving throughput for the lagging consumer. Option A is incorrect because decreasing the batch size reduces the number of records processed per call, which typically lowers throughput.

Option B is incorrect because increasing the number of shards increases the stream's total capacity but does not directly help a consumer that is already falling behind; it may actually require more workers to handle the additional shards. Option C is incorrect because extending the retention period affects how long data is stored, not how quickly it is processed.

Exam trap

Candidates often think that increasing shards directly improves consumer throughput, but the consumer's processing capacity depends on the number of workers. Adding shards without adding workers can worsen the lag.

72
MCQeasy

A company uses Amazon RDS for MySQL with Multi-AZ. The operations team notices that during a failover, the application experiences errors for about 2 minutes. The application uses a JDBC connection pool. Which solution should the team implement to reduce the failover impact?

A.Use Amazon CloudWatch Events to trigger a Lambda function that restarts the application.
B.Use Amazon RDS Proxy to manage database connections.
C.Configure the JDBC connection string with a timeout and implement automatic retry logic.
D.Increase the TTL for the RDS DNS record to 60 seconds.
AnswerC

Retry logic allows the application to reconnect after failover.

Why this answer

Implementing a timeout and automatic retry logic in the JDBC connection pool ensures that after a failover, the application can quickly detect the failed connection and reconnect to the new primary. Option A is incorrect because restarting the application via CloudWatch Events and Lambda does not directly address connection failures and may cause additional downtime. Option B is incorrect: while Amazon RDS Proxy can help manage connections and reduce latency, it does not eliminate the need for application-level retry logic; during failover, connections are dropped and need to be re-established.

Option D is incorrect because increasing the TTL of the RDS DNS record would actually cause the application to cache the old DNS record longer, delaying failover detection.

73
Multi-Selectmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. The application experiences a sudden spike in traffic. The operations team notices that the Auto Scaling group is not scaling out quickly enough. Which TWO actions should the team take to improve the scaling responsiveness?

Select 2 answers
A.Increase the instance size to handle more traffic per instance.
B.Switch from a step scaling policy to a target tracking scaling policy based on CPU utilization.
C.Increase the health check grace period for the Auto Scaling group.
D.Decrease the cooldown period for the Auto Scaling group.
E.Decrease the minimum number of instances in the Auto Scaling group.
AnswersB, D

Target tracking provides more responsive scaling than step scaling.

Why this answer

To improve scaling responsiveness, the team should use a target tracking scaling policy based on CPU utilization (Option B) because target tracking continuously adjusts the desired capacity to meet the target value, providing faster and more precise scaling than step scaling. Decreasing the cooldown period (Option D) allows new instances to start contributing to metrics sooner, enabling the Auto Scaling group to scale out more quickly during spikes. Option A (increasing instance size) does not improve the speed of scaling out; it only increases capacity per instance but not responsiveness.

Option C (increasing health check grace period) delays the detection of unhealthy instances, slowing down scaling. Option E (decreasing minimum number) reduces baseline capacity and does not help with scaling out speed.

74
MCQhard

A company uses Amazon API Gateway with a Lambda authorizer to control access to its APIs. Recently, some requests are returning 401 Unauthorized errors even though the tokens are valid. The Lambda authorizer logs show that the function is invoked and returns an IAM policy. What is the MOST likely cause?

A.The Lambda function is returning a malformed IAM policy.
B.The token has expired.
C.The Lambda authorizer is not being invoked due to throttling.
D.The authorizer result is cached, and a previous invalid token caused a deny policy to be cached.
AnswerD

Cached deny responses cause subsequent valid tokens to be rejected.

Why this answer

API Gateway caches the authorizer result based on the token. If a previous request with the same token was denied (e.g., due to an invalid token at that time), the cached deny policy will be used for subsequent requests even if the token is now valid, causing a 401 error. Option A is incorrect because the Lambda authorizer is being invoked successfully and returning a policy; the issue is with caching.

Option B is incorrect because the problem states tokens are valid, not expired. Option C is incorrect because throttling would result in the authorizer not being invoked, but the logs show it is invoked.

75
MCQeasy

A company is using Amazon ECS with Fargate launch type for a microservices application. The application experiences intermittent latency spikes. CloudWatch metrics show high CPU utilization but no obvious pattern. What should the company do to identify the cause?

A.Increase the CPU and memory for all ECS tasks.
B.Enable AWS X-Ray tracing on the ECS tasks to trace requests across microservices.
C.Set up CloudWatch Synthetics canaries to monitor the endpoints.
D.Use CloudWatch Logs Insights to analyze application logs for errors.
AnswerB

Identifies latency sources.

Why this answer

AWS X-Ray provides distributed tracing to pinpoint performance bottlenecks. Option A is wrong because increasing task size is a reactive fix that does not identify the cause. Option C is wrong because CloudWatch Synthetics monitors endpoint availability, not internal trace data.

Option D is wrong because CloudWatch Logs Insights is for querying logs, not for tracing requests across microservices.

Page 1 of 6 · 410 questions totalNext →

Ready to test yourself?

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