Courseiva

CCNA Continuous Improvement Questions

75 of 410 questions · Page 2/6 · Continuous Improvement topic · Answers revealed

76
Multi-Selecthard

A company uses AWS Organizations to manage multiple accounts. The security team needs to ensure that all S3 buckets across the organization are encrypted at rest. Currently, some buckets are not encrypted. Which THREE steps should the team take to enforce encryption? (Select THREE.)

Select 3 answers
A.Apply an S3 bucket policy on each bucket that denies PutObject without encryption.
B.Create an SCP that denies PutBucketAcl or PutBucketPolicy actions if the bucket does not have encryption enabled.
C.Use AWS CloudTrail to monitor S3 API calls and alert on unencrypted bucket creation.
D.Enable AWS Config managed rule s3-bucket-server-side-encryption-enabled to detect non-compliant buckets.
E.Enable default encryption on all S3 buckets using the AWS S3 console or API.
AnswersB, D, E

SCPs can restrict actions that create unencrypted buckets.

Why this answer

A service control policy (SCP) can deny PutBucketAcl or PutBucketPolicy actions if the bucket does not have encryption enabled, preventing disabling of encryption at the bucket level. Option D is correct because AWS Config managed rule s3-bucket-server-side-encryption-enabled can detect S3 buckets that lack server-side encryption. Option E is correct because enabling default encryption on all S3 buckets ensures that new objects are automatically encrypted.

Option A is incorrect because while an S3 bucket policy can enforce encryption on uploads, it does not enforce encryption on existing objects and must be applied per bucket; moreover, it is not an organization-wide enforcement mechanism. Option C is incorrect because AWS CloudTrail only logs API calls and does not enforce encryption; it can alert but does not remediate.

77
MCQeasy

A company runs a containerized microservices application on Amazon ECS with Fargate launch type. The application consists of a frontend service and a backend service. The backend service is CPU-intensive and experiences high load during business hours. The operations team observes that the frontend service sometimes returns 503 errors during peak load. The team has already configured an ECS service auto scaling policy for the backend service based on average CPU utilization with a target value of 70%. The backend service is currently running 4 tasks, and the frontend is running 2 tasks. The errors seem to correlate with the backend scaling up. Which solution should the team implement to improve the application's performance and reduce errors?

A.Update the backend service auto scaling policy to use a combination of CPU and memory utilization metrics with a step scaling policy, and increase the cooldown period to allow tasks to stabilize before additional scaling actions.
B.Reduce the target CPU utilization for the backend auto scaling policy from 70% to 50% to trigger scaling earlier and keep CPU lower.
C.Change the backend service from Fargate to EC2 launch type and use larger instance types to provide more CPU capacity.
D.Increase the desired count of the frontend service to 4 tasks to handle more requests and reduce the load on the backend service.
AnswerA

Multiple metrics and step scaling with proper cooldown prevent premature scaling and handle spikes better.

Why this answer

The 503 errors during backend scale-up are likely caused by the backend tasks not being fully ready to handle traffic immediately after launch. By using a combination of CPU and memory utilization metrics with a step scaling policy, the team can make scaling decisions more responsive to actual load patterns. Increasing the cooldown period prevents additional scaling actions from being triggered prematurely, giving new tasks time to stabilize and reducing the window where the backend is overwhelmed, which in turn reduces frontend timeouts.

Exam trap

The trap here is that candidates often assume the solution is to scale earlier (Option B) or add more frontend capacity (Option D), when the real issue is the instability during the scaling event itself, which is addressed by stabilizing the scaling process with step policies and cooldowns.

How to eliminate wrong answers

Option B is wrong because simply reducing the target CPU utilization to 50% would cause the backend to scale up even more aggressively, potentially increasing the frequency of 503 errors during the scaling event itself, without addressing the root cause of instability during scale-up. Option C is wrong because switching to EC2 launch type and larger instances does not solve the transient overload during scaling; it only changes the underlying compute platform, and the same scaling instability would persist. Option D is wrong because increasing the frontend desired count does not reduce the load on the backend; it would only distribute incoming requests across more frontend tasks, but the backend would still be the bottleneck and could continue to return errors when it cannot keep up.

78
MCQmedium

A company is using AWS CodePipeline to automate deployments of a web application. The deployment to an Amazon ECS cluster often fails during the 'Deploy' stage due to insufficient capacity in the target group. The operations team wants to improve the pipeline to automatically handle such failures without manual intervention. Which solution is MOST operationally efficient?

A.Use Amazon CloudWatch Alarms to trigger an AWS Lambda function that restarts the pipeline.
B.Modify the CodeBuild project to run integration tests after deployment.
C.Add a manual approval step before the deploy stage to verify capacity.
D.Configure the ECS service to automatically scale down the desired count on deployment failure.
E.Add a retry action in the CodePipeline stage for the ECS deployment.
AnswerE

Correct because CodePipeline supports retry actions that automatically retry the stage on failure, reducing operational overhead.

Why this answer

The most operationally efficient because it uses CodePipeline's built-in retry mechanism to automatically retry the failed 'Deploy' stage when the ECS deployment fails due to insufficient capacity. This eliminates the need for manual intervention or additional services like Lambda, reducing operational overhead. Option A adds unnecessary complexity with CloudWatch Alarms and Lambda.

Option B does not address capacity issues. Option C requires manual approval, which is not automated. Option D would reduce capacity, exacerbating the failure.

79
MCQhard

A company runs a stateful application on Amazon EC2 instances in an Auto Scaling group. The application stores data on an Amazon EBS volume attached to each instance. The company wants to implement a patching strategy that minimizes downtime and preserves data. What should a solutions architect do?

A.Use a rolling update with a new Auto Scaling group and delete old instances.
B.Create a new launch template with a patched AMI, then perform a rolling update that detaches and reattaches the existing EBS volumes.
C.Terminate all instances and launch new ones with a patched AMI.
D.Use Systems Manager Patch Manager to apply patches to running instances.
AnswerB

This replaces instances while preserving data by reattaching volumes, minimizing downtime.

Why this answer

It minimizes downtime by using a rolling update and preserves data by detaching and reattaching existing EBS volumes. Option A is wrong because it does not preserve existing EBS volumes, leading to data loss. Option C is wrong because terminating all instances causes downtime and does not preserve data.

Option D is wrong because patching running instances may cause application instability and does not ensure data preservation in case of rollback.

80
Multi-Selectmedium

A company is running a web application on EC2 instances in an Auto Scaling group behind an ALB. The application uses an Amazon RDS for MySQL database. Recently, the application has become slow, and the operations team identifies that the database is the bottleneck due to a high number of read queries. Which TWO actions should a solutions architect take to improve read performance? (Choose two.)

Select 2 answers
A.Enable Multi-AZ for the RDS instance.
B.Implement DynamoDB Accelerator (DAX) in front of the database.
C.Scale up the RDS instance to a larger instance type.
D.Add an Amazon RDS Read Replica in the same AWS Region.
E.Implement an Amazon ElastiCache for Redis cluster to cache frequent queries.
AnswersD, E

Read Replicas can handle read queries, reducing load on the primary.

Why this answer

Adding an Amazon RDS Read Replica offloads read traffic from the primary MySQL database, allowing read queries to be served by the replica and reducing load on the source instance. This directly addresses the high number of read queries causing the bottleneck, as read replicas are designed for read-heavy workloads and can be promoted to a standalone instance if needed.

Exam trap

The trap here is that candidates often confuse Multi-AZ with read replicas, assuming the standby instance can serve reads, when in fact Multi-AZ only provides failover and the standby is not accessible for read operations.

81
MCQeasy

A company runs a static website on Amazon S3 with a custom domain using Amazon Route 53. The website content is updated frequently by multiple developers. The company wants to implement a workflow where updates are automatically tested and deployed. They have existing CI/CD tools that integrate with AWS CodeCommit. The Solutions Architect needs to design a deployment pipeline that rebuilds the website only when changes are pushed to the main branch, and then invalidates the Amazon CloudFront cache if a CloudFront distribution is used. Which solution meets these requirements with the least operational overhead?

A.Use AWS CloudFormation with a custom resource that triggers a build on CodeCommit push.
B.Configure an S3 event notification to invoke an AWS Lambda function that builds and deploys the website.
C.Use AWS CodePipeline with a source stage tied to CodeCommit, a build stage using AWS CodeBuild, and a deploy stage that syncs the S3 bucket and invalidates CloudFront.
D.Use AWS Lambda@Edge to generate the website on the fly and cache at CloudFront.
AnswerC

Fully managed CI/CD pipeline.

Why this answer

AWS CodePipeline with a source stage from CodeCommit, a build stage using CodeBuild, and a deploy stage that syncs to S3 and invalidates CloudFront provides a fully managed CI/CD pipeline with minimal operational overhead. Option A is wrong because CloudFormation is for infrastructure provisioning, not for building a deployment pipeline triggered by code pushes. Option B is wrong because S3 event notifications trigger Lambda functions for simple tasks, not for full CI/CD build and deploy workflows.

Option D is wrong because Lambda@Edge is for processing requests at edge locations, not for building and deploying static content.

82
MCQmedium

A Solutions Architect runs the following command for an EC2 instance that is part of an Auto Scaling group. The instance is in a private subnet and should only receive traffic from an Application Load Balancer. However, the instance is accessible from the internet. ``` $ aws ec2 describe-instances --instance-id i-0abcd1234efgh5678 { "Reservations": [ { "Instances": [ { "InstanceId": "i-0abcd1234efgh5678", "SecurityGroups": [ { "GroupName": "sg-web-app", "GroupId": "sg-0123456789abcdef0" } ], "PublicIpAddress": null, "SubnetId": "subnet-12345678", "VpcId": "vpc-23456789" } ] } ] } ``` Based on the output, what is the most likely reason?

A.The subnet's route table has a route to an internet gateway.
B.The instance has an Elastic IP address attached.
C.The instance has a public IP address assigned.
D.The security group attached to the instance allows inbound traffic from 0.0.0.0/0.
AnswerD

The security group 'sg-web-app' might have an inbound rule allowing all traffic, making the instance accessible even in a private subnet if there is a NAT gateway or if the instance has a public IP.

Why this answer

The output shows the instance has a security group 'sg-web-app' attached to its network interface. If that security group allows inbound traffic from 0.0.0.0/0, the instance would be accessible from the internet regardless of the subnet being private. The subnet's route table (Option A) having a route to an internet gateway would not matter for inbound traffic because the instance is in a private subnet and lacks a public IP; the ALB would handle inbound traffic via its public IP and forward to the private instance.

Option B is incorrect because an Elastic IP would make the instance directly reachable from the internet, but the output does not show an Elastic IP. Option C is incorrect because the instance is in a private subnet and would not have a public IP assigned automatically.

83
MCQeasy

A company has an S3 bucket that stores sensitive data. The company wants to ensure that all objects uploaded to the bucket are encrypted at rest. Which solution should the solutions architect recommend?

A.Use a bucket policy to deny uploads that do not include the x-amz-server-side-encryption header.
B.Create an AWS Lambda function that encrypts objects after they are uploaded.
C.Configure an S3 Access Point with a policy that requires encryption.
D.Enable default encryption on the S3 bucket using SSE-S3 or SSE-KMS.
AnswerD

Correct. Default encryption on the S3 bucket automatically encrypts all objects at rest using SSE-S3 or SSE-KMS, regardless of the upload request. It is the simplest and most effective solution to ensure encryption at rest.

Why this answer

Enabling default encryption on the S3 bucket using SSE-S3 or SSE-KMS ensures that all objects are automatically encrypted at rest, regardless of whether the upload request specifies encryption. This is the simplest and most effective approach. Option A is technically viable but unnecessarily complex; a bucket policy that denies uploads without the x-amz-server-side-encryption header can enforce encryption, but it requires careful policy configuration and does not encrypt objects automatically if the header is missing—instead it rejects the upload.

Option B is inefficient and costly; using a Lambda function to encrypt objects after upload introduces latency and extra expense, whereas default encryption achieves the same result seamlessly. Option C is incorrect because S3 Access Points are designed for managing access to shared datasets, not for enforcing encryption; adding a policy there would complicate access management without providing the automatic encryption that default encryption offers.

84
MCQeasy

A company is using AWS CloudFormation to manage infrastructure. They want to ensure that any changes to a production stack are reviewed and approved before being applied. What is the BEST way to achieve this?

A.Enable termination protection on the stack.
B.Use AWS CodePipeline to automatically deploy changes.
C.Use Change Sets and require manual approval to execute them.
D.Use stack policies to prevent updates.
AnswerC

Change Sets show the impact of changes and can be executed after review.

Why this answer

AWS CloudFormation Change Sets allow you to preview how proposed changes will affect your running resources before executing them. By using Change Sets in conjunction with a manual approval process (e.g., via AWS CodePipeline or a separate review step), you can ensure changes are reviewed and approved before being applied. Option A (termination protection) only prevents stack deletion, not updates.

Option B (auto-deployment with CodePipeline) can include approval gates, but the question asks for the "BEST way" in the context of CloudFormation itself; Change Sets are the native mechanism for review. Option D (stack policies) control which resources can be updated, but do not enforce a review process.

85
MCQeasy

A DevOps engineer notices that an EC2 instance's CPU utilization is consistently above 90%. They need to optimize costs without affecting performance. What should they do?

A.Add more EC2 instances behind a load balancer.
B.Rightsize the instance to a larger instance type.
C.Purchase a Reserved Instance for the current instance type.
D.Terminate the instance and launch a new one of the same type.
AnswerA

Adding more EC2 instances behind a load balancer allows scaling out, which can distribute the workload across smaller, cheaper instances, optimizing cost while maintaining or improving performance.

Why this answer

Adding more EC2 instances behind a load balancer allows you to distribute the workload across multiple smaller instances, which can be more cost-effective than a single large instance. This approach (scaling out) can improve performance and availability without necessarily increasing costs, as you can use smaller, cheaper instance types. Option B is wrong because rightsizing to a larger instance typically increases cost, contrary to the goal of cost optimization.

Option C is wrong because purchasing a Reserved Instance reduces cost but does not address the high CPU utilization performance issue. Option D is wrong because launching a new instance of the same type does not solve the performance problem.

86
MCQeasy

A company is using AWS CloudFormation to manage infrastructure. The stack creation fails with the error 'Resource handler returned message: 'User: arn:aws:sts::123456789012:assumed-role/Admin/MySession is not authorized to perform: ec2:RunInstances'. What is the MOST likely cause?

A.The IAM role used by CloudFormation does not have ec2:RunInstances permission.
B.The region specified in the template is disabled.
C.The CloudFormation template has a syntax error.
D.The AWS account is not subscribed to EC2 service.
AnswerA

The error clearly states the role is not authorized.

Why this answer

The error message indicates that the IAM role assumed by CloudFormation does not have permission to perform ec2:RunInstances. Therefore, the IAM role used by CloudFormation lacks the necessary permissions (Option A). Option B is incorrect because a disabled region would cause a different error, not an authorization issue.

Option C is incorrect because a syntax error would produce a validation error, not an IAM authorization error. Option D is incorrect because AWS accounts are automatically subscribed to EC2; there is no subscription requirement.

87
MCQmedium

A company has a CI/CD pipeline that builds and deploys a containerized application to Amazon ECS Fargate. The pipeline uses AWS CodeBuild to run tests and build Docker images. Recently, the pipeline has been failing intermittently with the error 'CannotPullContainerError: Error response from daemon: manifest for <image> not found'. The image is stored in Amazon ECR. The team suspects the issue is related to image tag inconsistency. The pipeline tags images with the commit hash. Which change will prevent this error?

A.Store the Docker image in Amazon S3 instead of ECR.
B.Ensure the pipeline builds and pushes the image with a unique tag, such as the commit hash, and uses that tag in the ECS task definition.
C.Use the 'latest' tag for all images.
D.Retry the failed pipeline step after a delay.
AnswerB

Unique tags prevent collisions and ensure the correct image is used.

Why this answer

Ensuring that the image tag is unique and not reused prevents stale image references. Using the commit hash ensures uniqueness.

88
MCQmedium

A company runs a critical application on EC2 instances behind an Application Load Balancer. The security team requires that all traffic to the application be encrypted in transit and that the load balancer use a certificate from AWS Certificate Manager (ACM). The application currently uses HTTP. What should the company do to meet the security requirement?

A.Replace the ALB with a Network Load Balancer and associate an ACM certificate with it.
B.Change the ALB listener to TCP and use a self-signed certificate on the EC2 instances.
C.Place a CloudFront distribution in front of the ALB and configure HTTPS between viewers and CloudFront.
D.Add an HTTPS listener to the ALB using an ACM certificate, and configure the HTTP listener to redirect to HTTPS.
AnswerD

This provides encryption and uses ACM for certificate management.

Why this answer

Adding an HTTPS listener to the ALB with an ACM certificate and configuring the HTTP listener to redirect to HTTPS ensures all traffic is encrypted in transit. This meets the security requirement directly without additional components. Option A is incorrect because Network Load Balancers do not support ACM certificates for TLS termination; they require TLS termination on the backend instances.

Option B is incorrect because TCP listeners cannot terminate TLS, and self-signed certificates on EC2 instances would not provide trusted encryption for clients. Option C is incorrect because while CloudFront can provide HTTPS, it adds unnecessary complexity and cost; the requirement can be met natively with the ALB.

89
MCQeasy

A Solutions Architect is reviewing an Amazon S3 bucket policy that grants access to users from another AWS account. The policy uses the Principal element with "AWS": "arn:aws:iam::123456789012:root". The users in the other account are unable to access the bucket. What is the most likely cause?

A.The policy must specify the IAM user ARN, not the root user ARN.
B.The bucket policy must also include a VPC endpoint condition.
C.Cross-account access is not supported with bucket policies.
D.The bucket policy must use the CanonicalUser ID instead of the account ID.
AnswerA

The root user ARN does not cover IAM users in that account.

Why this answer

The root user ARN does not grant access to individual IAM users; the policy must allow the entire account or specific user ARNs. Option B is wrong because the bucket policy can refer to another account. Option C is wrong because S3 does not require VPC endpoints for cross-account access.

Option D is wrong because the bucket policy can use IAM user ARNs.

90
MCQhard

A company runs a containerized application on Amazon ECS with Fargate launch type. The application is deployed across multiple Availability Zones. Recently, deployments have been failing because new tasks cannot register with the Application Load Balancer (ALB) target group. The health checks are failing. What is the MOST likely cause?

A.The security group for the tasks does not allow inbound traffic from the ALB on the health check port.
B.The ECS service is configured with a desired count of zero.
C.The task definition specifies an invalid container image.
D.The ECS cluster has insufficient capacity.
AnswerA

Health checks fail if traffic is blocked.

Why this answer

If the security group for the tasks does not allow inbound traffic from the ALB on the health check port, health checks fail and tasks cannot register. Option B is incorrect because a desired count of zero would prevent new tasks from running, but the scenario describes deployments failing due to health check failures on new tasks. Option C is incorrect: an invalid container image would cause the task to fail to start, not cause health check failures after the task is running.

Option D is incorrect because Fargate manages capacity; insufficient capacity would cause a different error (e.g., unable to provision tasks), not health check failures.

91
Multi-Selecteasy

A company uses Amazon CloudFront to distribute content globally. The company wants to restrict access to content based on geographic location. Which THREE actions can the company take?

Select 3 answers
A.Configure an S3 bucket policy to deny access from specific IP ranges.
B.Use CloudFront geo-restriction to allow or block countries.
C.Associate an AWS WAF web ACL with the CloudFront distribution and use a geo match condition.
D.Use CloudFront geographic restriction.
E.Use Lambda@Edge to check the request's country and return a 403.
AnswersB, C, D

Directly restricts access by country.

Why this answer

CloudFront's built-in geo-restriction feature allows whitelisting or blacklisting countries. Option C is correct because AWS WAF geo match conditions can be used with a CloudFront distribution to block or allow requests based on country codes. Option D is correct because CloudFront geographic restriction is another name for the same feature as geo-restriction, and it is a valid action.

Option A is incorrect because S3 bucket policies do not support geographic location conditions; they only support IP-based conditions. Option E is incorrect: although Lambda@Edge can be used to check the country and return a 403, it is not one of the simplest recommended actions; the question asks for actions the company can take, and geo-restriction and WAF are the primary methods.

92
MCQeasy

A startup runs its application on Amazon ECS with Fargate launch type. The application uses an Application Load Balancer to distribute traffic. During a recent marketing campaign, the application experienced high latency and some requests returned 503 errors. The team suspects that the tasks are hitting resource limits. The team wants to automatically scale the tasks based on CPU utilization. Which solution should the team implement?

A.Configure Application Auto Scaling for the ECS service with a target tracking scaling policy based on average CPU utilization.
B.Create a CloudWatch alarm that triggers a Lambda function to stop idle tasks.
C.Create an Auto Scaling group for the ECS cluster and configure it to scale based on CPU utilization.
D.Use AWS Lambda to periodically check CPU utilization and update the desired count of the ECS service.
AnswerA

Target tracking automatically adjusts the desired count to maintain a target CPU utilization.

Why this answer

Uses Application Auto Scaling with a target tracking scaling policy based on average CPU utilization, which automatically adjusts the desired count of ECS tasks to maintain CPU utilization. Option B stops idle tasks via Lambda, but does not scale based on CPU utilization. Option C creates an Auto Scaling group for the ECS cluster, which is designed for EC2 instances, not Fargate tasks.

Option D uses Lambda to periodically check CPU and update desired count, which is inefficient compared to native Application Auto Scaling. Therefore, Option A is correct.

93
MCQhard

A company uses this CloudFormation template to manage an S3 bucket. They notice that old object versions are not being deleted after 30 days. What is the most likely reason?

A.The bucket contains delete markers that are not being expired.
B.The bucket has a bucket policy that prevents deletion.
C.Versioning is not enabled on the bucket.
D.The lifecycle rule is disabled.
AnswerA

Lifecycle does not automatically delete delete markers; need ExpiredObjectDeleteMarker.

Why this answer

Lifecycle rules for noncurrent versions do not automatically expire delete markers. Delete markers are not considered noncurrent versions and require a separate ExpiredObjectDeleteMarker action in the lifecycle policy. Option B is incorrect because bucket policies do not affect lifecycle expiration.

Option C is incorrect because versioning must be enabled for noncurrent version expiration to work; if versioning were disabled, the lifecycle rule would not apply. Option D is incorrect because the lifecycle rule is enabled as per the template; the issue is the absence of a rule for delete markers.

94
MCQmedium

A CloudFormation stack is created using the template above. The stack creation fails with the error: 'The following resource(s) failed to create: [EC2Instance]'. Logs show: 'AMI 'ami-0abcdef1234567890' does not exist.' What is the most likely cause?

A.The AMI ID is not available in the region where the stack is being deployed.
B.The SQS queue name 'my-queue' is already in use.
C.The AMI ID is invalid because it contains letters.
D.The instance type t2.micro is not supported in the region.
AnswerA

AMI IDs are region-specific; hardcoding can cause cross-region failures.

Why this answer

The error 'AMI does not exist' indicates that the hardcoded AMI ID in the CloudFormation template is not available in the region where the stack is being deployed. AMI IDs are region-specific, so using a hardcoded ID from another region causes the failure. Option B is incorrect because the SQS queue name collision would result in a different error.

Option C is incorrect because AMI IDs are alphanumeric by design. Option D is incorrect because the error specifically mentions the AMI, not the instance type.

95
MCQhard

A company has a data pipeline that uses AWS Glue to process large datasets in Amazon S3. The pipeline runs daily and takes over 12 hours to complete. The company wants to reduce the processing time. Which approach would be MOST effective?

A.Increase the Glue job timeout setting to 24 hours.
B.Enable S3 Transfer Acceleration on the source bucket.
C.Increase the number of DPUs allocated to the Glue job.
D.Convert the input data from CSV to Parquet format.
AnswerC

More DPUs provide more parallelism and reduce runtime.

Why this answer

Increasing the number of DPUs (data processing units) allocated to the Glue job allows for greater parallelism, which directly reduces processing time for CPU-bound or memory-bound workloads. Option A is incorrect because increasing the timeout does not improve performance; it only prevents the job from failing due to time limits. Option B is incorrect because S3 Transfer Acceleration speeds up data transfer to S3, not the processing within Glue.

Option D is incorrect because while converting to Parquet can improve read performance and reduce data volume, it does not address the core processing bottleneck if the job is compute-intensive; the most effective immediate step is to increase DPUs.

96
MCQeasy

A company uses AWS CloudFormation to manage its infrastructure. The operations team reports that stack updates often fail because of resource conflicts. The team wants to improve the reliability of updates without manual intervention. Which solution provides the MOST automated recovery from update failures?

A.Use CloudFormation change sets to review and approve all changes before update.
B.Write a custom AWS Lambda function that reverts changes when a stack update fails.
C.Apply a stack policy to prevent updates to critical resources.
D.Use the default CloudFormation rollback behavior that automatically reverts changes on failure.
AnswerD

CloudFormation automatically rolls back failed stack updates by default.

Why this answer

CloudFormation's built-in rollback behavior automatically reverts all changes made during a failed stack update, restoring the stack to its last known stable state without requiring any custom code or manual intervention. This provides the most automated recovery mechanism as it is natively integrated into the CloudFormation service and requires no additional infrastructure or scripting.

Exam trap

The trap here is that candidates may overthink the solution and choose a custom Lambda function (Option B) thinking it provides more control, when in fact CloudFormation's native rollback is the most automated and reliable approach, and custom solutions often introduce additional failure points.

How to eliminate wrong answers

Option A is wrong because change sets are a review and approval mechanism that helps prevent errors before an update is executed, but they do not provide any automated recovery after a failure occurs. Option B is wrong because writing a custom Lambda function to revert changes introduces unnecessary complexity, potential for errors, and is not as reliable or automated as CloudFormation's native rollback, which handles state management and resource dependencies correctly. Option C is wrong because stack policies only prevent updates to specific critical resources during a stack update, but they do not provide any recovery mechanism if the update fails due to conflicts elsewhere.

97
MCQmedium

A company is using AWS CloudFormation to manage its infrastructure. They have a production stack that creates an Amazon RDS DB instance. The company wants to update the DB instance class to a larger size with minimal downtime. Which approach should they use?

A.Modify the DBInstanceClass property in the CloudFormation template and use an UpdatePolicy of AutoScalingReplacingUpdate.
B.Create a new CloudFormation stack with the new DB instance class and delete the old stack.
C.Edit the CloudFormation template to change the DBInstanceClass and update the stack directly.
D.Use AWS OpsWorks to manage the DB instance and apply the change.
AnswerC

Updating the stack directly with the new instance class causes a reboot, which typically has minimal downtime. This is the correct approach for changing DB instance class.

Why this answer

Updating the CloudFormation stack directly with a new DBInstanceClass property will cause a reboot of the RDS DB instance, which typically has minimal downtime compared to creating a new instance. This is the standard approach for modifying RDS instance classes. Option A is incorrect because AutoScalingReplacingUpdate is an update policy for Auto Scaling groups, not applicable to RDS DB instances.

Option B is incorrect because creating a new stack and deleting the old one would cause significant downtime and is not efficient. Option D is incorrect because AWS OpsWorks is not used for managing RDS instances.

98
MCQmedium

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

A.Enable CloudTrail Insights to detect unusual key creation patterns.
B.Create a CloudWatch Events rule that matches the CreateAccessKey API call and sends an SNS notification.
C.Use CloudTrail to publish logs to CloudWatch Logs and create a metric filter to trigger an alarm.
D.Configure Amazon Athena to query CloudTrail logs and set up a scheduled query to notify.
AnswerB

CloudWatch Events can react to specific CloudTrail events in real-time.

Why this answer

The most efficient way to alert when an IAM user creates a new access key is to use CloudWatch Events (now Amazon EventBridge) to match the CreateAccessKey API call from CloudTrail and trigger an SNS notification. Option A is incorrect because CloudTrail Insights is for detecting unusual activity patterns, not for real-time event-driven alerts. Option C is less efficient because it requires additional steps of publishing logs to CloudWatch Logs and creating a metric filter, adding complexity.

Option D is inefficient because querying CloudTrail logs with Athena is not real-time and requires custom scheduling.

99
MCQhard

A company uses AWS CloudFormation to manage infrastructure. The stack fails to update with the error: 'Resource handler returned message: The subnet 'subnet-xxx' is in use by a network interface.' The subnet is associated with a Lambda function in a VPC. The CloudFormation template is trying to delete the subnet. What should the company do to resolve this?

A.Update the Lambda function configuration to remove the VPC settings, then delete the subnet.
B.Modify the CloudFormation template to ignore the deletion failure using a DeletionPolicy attribute.
C.Use the AWS CLI to force delete the subnet.
D.Manually delete the Elastic Network Interface (ENI) from the AWS Management Console.
AnswerA

This releases the ENI, allowing subnet deletion.

Why this answer

To delete a subnet that is in use by a Lambda function's ENI, you must first disassociate the ENI. This can be done by updating the Lambda function configuration to remove the VPC settings, which causes Lambda to delete the ENI. After the ENI is deleted, you can delete the subnet.

Option B is incorrect because the DeletionPolicy attribute only handles deletion, not update failures, and the subnet is still in use. Option C is incorrect because there is no force delete option for subnets; dependencies must be resolved first. Option D is incorrect because ENIs managed by Lambda cannot be manually deleted; you must update or delete the Lambda function.

100
MCQmedium

A company uses AWS CloudFormation to manage infrastructure. The operations team wants to implement a change management process where all stack updates must be reviewed and approved before execution. The team currently uses AWS CodePipeline for CI/CD. Which solution meets these requirements with the LEAST operational overhead?

A.Use CloudFormation Change Sets and require a senior engineer to execute them.
B.Write an AWS Lambda function that triggers on stack update events and requires approval via Amazon SNS.
C.Use AWS Service Catalog to govern CloudFormation templates and require approval for provisioning.
D.Store CloudFormation templates in AWS CodeCommit and use AWS CLI to execute updates after peer review.
E.Create a CodePipeline pipeline with an approval stage before the CloudFormation deployment action.
AnswerE

CodePipeline supports manual approval actions that pause the pipeline until approval.

Why this answer

It leverages the existing CodePipeline CI/CD system with a built-in approval gate, allowing the operations team to review and approve CloudFormation stack updates before deployment with minimal additional overhead. Option A (Change Sets) requires manual execution and lacks integration with the CI/CD pipeline. Option B (Lambda + SNS) introduces custom code and additional management overhead.

Option C (Service Catalog) is designed for provisioning new resources, not for change management of existing stacks. Option D (manual CLI + peer review) does not automate the process and increases operational overhead.

101
Multi-Selectmedium

A company uses Amazon DynamoDB for a gaming application. The table has a partition key of 'user_id' and a sort key of 'game_id'. The application experiences high latency during peak hours. Which TWO actions would improve read performance?

Select 2 answers
A.Use DynamoDB global tables to replicate data to another region.
B.Increase the read capacity units for the table.
C.Enable DynamoDB Accelerator (DAX) for the table.
D.Change the table's sort key to a more evenly distributed attribute.
E.Add a Global Secondary Index with a different partition key.
AnswersB, C

More read capacity reduces throttling and latency.

Why this answer

Increasing read capacity units (RCUs) directly increases the number of read operations per second, reducing latency during peak hours. Option C is correct because DynamoDB Accelerator (DAX) is an in-memory cache that significantly reduces read latency by caching frequently accessed items. Option E, adding a Global Secondary Index (GSI), can improve query performance but not necessarily overall read latency for existing access patterns; it is a design change that may not address peak-hour latency directly.

Option A is incorrect because global tables are for multi-region replication, not single-region performance. Option D is incorrect because changing the sort key does not improve read performance; sort key affects ordering within a partition, not throughput.

102
MCQhard

A company uses AWS Lambda functions to process events from Amazon SQS. The function's duration has increased, causing a backlog. The team wants to improve throughput without changing the function code. Which action should the team take?

A.Increase the SQS visibility timeout to allow more time per message.
B.Increase the Lambda function reserved concurrency.
C.Increase the Lambda function memory and timeout settings.
D.Increase the SQS batch size to the maximum of 100.
AnswerB

More concurrent executions allow processing more messages simultaneously.

Why this answer

Increasing the number of Lambda function instances will increase concurrency and process more messages in parallel. Option A is wrong because increasing batch size may cause timeouts. Option C is wrong because increasing function memory/timeout does not directly improve throughput.

Option D is wrong because SQS visibility timeout does not affect Lambda concurrency.

103
MCQhard

A company has a serverless application using AWS Lambda, API Gateway, and DynamoDB. During a traffic spike, some API requests fail with 5xx errors. The CloudWatch logs show 'ProvisionedThroughputExceededException' for DynamoDB. The team wants to handle this gracefully without losing requests. What should they do?

A.Enable auto scaling for DynamoDB and implement retry logic with exponential backoff in the Lambda function.
B.Increase the provisioned read/write capacity of the DynamoDB table to a high fixed value.
C.Use an SQS queue between API Gateway and Lambda to buffer requests.
D.Configure API Gateway to automatically retry failed requests.
AnswerA

Auto scaling handles capacity, retries handle transient errors.

Why this answer

It combines DynamoDB auto scaling to adjust capacity during traffic spikes with retry logic and exponential backoff in the Lambda function to handle transient ProvisionedThroughputExceededException errors gracefully without losing requests. Option B is wrong because fixing capacity to a high value is costly and inefficient; it doesn't adapt to variable traffic. Option C is wrong because using an SQS queue between API Gateway and Lambda would buffer requests but does not directly address the DynamoDB throughput exception; it would only shift the problem.

Option D is wrong because API Gateway cannot automatically retry failed requests; retries must be implemented in the backend.

104
MCQhard

Refer to the exhibit. An IAM policy is attached to a user. The user attempts to upload an object to example-bucket with SSE-S3 (AES256) encryption. What will happen?

A.The upload fails because the Deny statement explicitly denies it
B.The upload fails because there is no explicit Allow for PutObject
C.The upload succeeds because the Allow statement permits it
D.The upload succeeds because SSE-S3 is allowed by the first statement
AnswerA

Deny condition matches when encryption is not aws:kms.

Why this answer

The Deny statement explicitly denies s3:PutObject when the encryption is not aws:kms. Since the user uses SSE-S3 (AES256), the condition 'StringNotEquals' evaluates to true (AES256 != aws:kms), so the Deny applies and the request is denied. Option B is incorrect because even if there is no explicit Allow, a Deny overrides any implicit allow.

Options C and D are incorrect because the Deny overrides any Allow statement, and the Allow statement in the policy is for GetObject, not PutObject.

105
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. Users report intermittent 503 errors. The Auto Scaling group has a minimum of 2 and maximum of 10 instances. CloudWatch metrics show that CPU utilization rarely exceeds 30%. What is the MOST likely cause of the 503 errors?

A.The ALB connection draining is enabled with a very short timeout, causing in-flight connections to be dropped.
B.The EC2 instances are running out of memory.
C.The Auto Scaling group launch configuration uses an AMI that is not compatible with the instance type.
D.The ALB health check is misconfigured, causing healthy instances to be marked unhealthy.
AnswerA

Connection draining with a short timeout can cause 503 errors when the ALB stops sending traffic to an instance before in-flight requests complete.

Why this answer

The 503 errors are likely due to the ALB connection draining setting. If connection draining is enabled and the drain timeout is too short, in-flight requests may be terminated, causing 503 errors. Low CPU utilization suggests the instances are not overloaded.

106
Multi-Selectmedium

A company has a web application running on EC2 instances in an Auto Scaling group. The application experiences unpredictable traffic spikes. The company wants to ensure that the application can scale out quickly and scale in to reduce costs. Which TWO actions should the solutions architect recommend?

Select 2 answers
A.Configure a lifecycle hook to delay instance termination during scale-in.
B.Manually increase the desired capacity during peak times.
C.Create a target tracking scaling policy based on Average CPU Utilization.
D.Create a simple scaling policy with a step adjustment to add instances when CPU exceeds 80%.
E.Use a scheduled scaling policy to add instances during expected peak hours.
AnswersC, D

Target tracking dynamically adjusts capacity to maintain a target metric.

Why this answer

Options C and D are correct. A target tracking scaling policy (C) automatically adjusts capacity based on a specified metric like CPU utilization, providing dynamic scaling for unpredictable spikes. A simple scaling policy with a step adjustment (D) allows you to define specific thresholds (e.g., CPU > 80%) to add instances quickly.

Option A is wrong because a lifecycle hook delays termination during scale-in, which would increase costs by keeping instances running longer. Option B is wrong because manually adjusting capacity is not automated and does not respond quickly to spikes. Option E is wrong because scheduled scaling is for predictable patterns, not unpredictable traffic spikes.

107
MCQmedium

A company runs a production application on EC2 instances behind an Application Load Balancer. After a recent deployment, users report intermittent 503 errors. The CloudWatch metrics show that the ALB's 'TargetResponseTime' is within normal range, but 'RequestCount' has increased by 50%. There are no changes to the security groups. What is the MOST likely cause of the 503 errors?

A.The ALB's idle timeout is set too low.
B.The security group for the ALB does not allow inbound traffic on the listener port.
C.The ALB's target group health check settings are misconfigured.
D.The deployment removed the health check path from the application.
AnswerD

If the health check path is removed, health checks fail, causing targets to be marked unhealthy, and ALB returns 503.

Why this answer

If the deployment removed the health check path from the application, the health checks would fail for any instance that was updated. Since the application runs behind an ALB, the target group health check would mark those instances as unhealthy, causing intermittent 503 errors as traffic is routed only to remaining healthy instances. Even if not all instances are updated simultaneously, the gradual roll-out could lead to periods where all instances become unhealthy temporarily.

Option A is incorrect because a low idle timeout would cause timeout errors, not 503s. Option B is incorrect because security groups were not changed. Option C is incorrect because misconfigured health check settings would cause consistent failures, not intermittent.

Exam trap

Candidates may confuse 503 errors with timeout or capacity issues. In this scenario, the normal TargetResponseTime and increased RequestCount suggest the load balancer is working, but targets are being marked unhealthy due to a missing health check path.

108
MCQeasy

A company runs a web application on AWS Elastic Beanstalk. The application experiences periodic traffic spikes that cause the environment to scale out. However, the scaling is slow, leading to increased latency during spikes. The operations team wants to improve the responsiveness of the Auto Scaling group. The application is stateless and runs on a single instance type. What should a solutions architect recommend?

A.Configure the Auto Scaling group to use multiple instance types.
B.Use scheduled scaling to add capacity before expected spikes.
C.Decrease the Auto Scaling group's cooldown period.
D.Change the instance type to a larger size.
AnswerC

Shorter cooldown allows more frequent scaling decisions, improving responsiveness.

Why this answer

Decrease the Auto Scaling group's cooldown period. Decreasing the cooldown period allows the Auto Scaling group to launch new instances more quickly after a scaling activity, reducing the time it takes to respond to traffic spikes. This directly improves responsiveness.

Option A is incorrect because using multiple instance types does not speed up scaling decisions. Option B (scheduled scaling) is proactive but does not help with unexpected spikes. Option D (larger instance type) addresses capacity per instance but not the speed of scaling out.

109
MCQmedium

Refer to the exhibit. An S3 bucket policy is shown. A user from IP 10.0.0.5 makes a GET request over HTTPS. Will the request succeed?

A.Yes, because the request matches the Allow condition and the Deny condition does not apply.
B.No, because the Deny statement explicitly denies all actions.
C.Yes, because the IP address is within the allowed range.
D.No, because the Deny statement overrides the Allow statement.
AnswerA

HTTPS satisfies SecureTransport true, so Deny is not triggered.

Why this answer

The first statement allows GET from the specified IP range. The second statement denies all actions if not using HTTPS. Since the request uses HTTPS (SecureTransport true), the Deny condition does not apply, so the Allow takes effect.

110
Multi-Selecthard

A company is running a critical microservices application on Amazon ECS with Fargate launch type. The application uses an Application Load Balancer (ALB) to distribute traffic. Recently, the team noticed that the ALB's 5xx error rate has increased. The error is HTTP 503. The team suspects the target group is unhealthy. Which THREE steps should the team take to diagnose and resolve the issue?

Select 3 answers
A.Verify the ECS service's desired count and compare with the number of healthy tasks in the target group.
B.Replace the ALB with a Network Load Balancer (NLB) to bypass health checks.
C.Check the ECS service events and task status to ensure tasks are running and passing health checks.
D.Verify that sticky sessions (session affinity) are enabled on the target group.
E.Check the ALB access logs and health check settings for the target group.
AnswersA, C, E

Checks the ECS service's desired count and compares it with the number of healthy tasks in the target group, ensuring sufficient capacity.

Why this answer

And Option E are correct. Option A checks the ECS service's desired count and compares it with the number of healthy tasks in the target group, ensuring sufficient capacity. Option C checks ECS service events and task status to confirm tasks are running and passing health checks.

Option E checks ALB access logs and health check settings for the target group to identify health check failures or misconfigurations. Option B (replacing ALB with NLB) is a major architectural change and not a diagnostic step. Option D (enabling sticky sessions) is unrelated to 503 errors.

111
MCQhard

A company uses AWS CloudFormation to deploy a multi-tier application. The stack fails to update due to a resource conflict. The operations team needs to identify the resource causing the failure and modify the template to allow the update. Which approach is MOST effective?

A.Create a Change Set for the stack to preview the changes and identify the conflict.
B.Review the stack's 'Events' tab in the AWS Management Console to find the error message.
C.Use AWS CloudFormation StackSets to deploy the update across multiple accounts.
D.Run a drift detection operation on the stack to identify manual changes.
AnswerA

Change Sets allow you to see the impact and errors before applying.

Why this answer

A Change Set allows you to preview the changes that will be made during a stack update, including any potential errors or resource conflicts, before executing the update. This helps identify the specific resource causing the failure. Option B is wrong because the Events tab shows past events but does not provide a preview of planned changes or conflicts.

Option C is wrong because StackSets are used for deploying stacks across multiple accounts and regions, not for troubleshooting a single stack update. Option D is wrong because drift detection compares the current stack resources with the template to identify manual changes, not update conflicts.

112
MCQhard

Refer to the exhibit. A CloudFormation stack was successfully created. The stack's template includes an S3 bucket and a Lambda function. A developer runs the CLI command shown but receives an error that the stack does not exist. What is the MOST likely cause?

A.The AWS CLI is configured to use a different region than where the stack was deployed.
B.The stack was deleted after creation.
C.The stack name is case-sensitive and should be 'MyApp'.
D.The '--query' parameter is incorrectly formatted.
AnswerA

Stack names are unique per region; querying the wrong region returns 'stack does not exist'.

Why this answer

The CLI command is querying the wrong region. The stack was created in us-east-1 but the CLI default region might be different. Option B is wrong because the stack was created successfully.

Option C is wrong because outputs are returned correctly. Option D is wrong because the stack name is exactly as used.

113
MCQmedium

A company runs a containerized application on Amazon ECS with Fargate. The application needs to access an Amazon S3 bucket that contains sensitive data. The security team requires that all traffic between the ECS tasks and S3 remain within the AWS network and not traverse the internet. What is the MOST secure way to meet this requirement?

A.Use an internet gateway and route traffic through a NAT gateway.
B.Enable S3 Transfer Acceleration on the bucket.
C.Create a VPC endpoint for S3 and attach it to the VPC.
D.Use a NAT gateway and update the route table to direct S3 traffic to the NAT.
AnswerC

VPC endpoint enables private connectivity to S3 without internet.

Why this answer

Using a VPC endpoint for S3 (Gateway or Interface) ensures traffic stays within the AWS network. Option A is wrong because internet traffic goes over the public internet. Option B is wrong because a NAT gateway is for outbound internet, not private access to S3.

Option D is wrong because S3 Transfer Acceleration uses the internet.

114
MCQhard

A company uses AWS Lambda to process files uploaded to an S3 bucket. The Lambda function writes results to a DynamoDB table. Over time, the function's execution time has increased, and some operations fail with ProvisionedThroughputExceededException. The function is configured with 1024 MB memory and a 5-minute timeout. The DynamoDB table has 1000 RCUs and 500 WCUs. The Lambda function performs reads and writes on the same table. What is the MOST cost-effective way to resolve the throttling without sacrificing performance?

A.Enable DynamoDB Accelerator (DAX) for the table
B.Use SQS to decouple the S3 trigger from the Lambda function and implement a batching strategy to DynamoDB
C.Increase DynamoDB write capacity units to 1000 WCUs
D.Increase the Lambda function memory to 2048 MB
AnswerB

SQS buffers requests, allowing batch writes and reducing throttling.

Why this answer

The most cost-effective solution because it uses SQS to decouple the S3 trigger from the Lambda function, allowing the Lambda to batch writes to DynamoDB. This reduces the frequency of writes, smooths out traffic spikes, and enables retries on throttling exceptions without scaling up capacity. Option A (DAX) only improves read performance, not writes.

Option C (increasing WCUs) increases cost significantly without addressing the root cause of bursty traffic. Option D (increasing memory) improves compute but not write throughput, and may increase cost without resolving throttling.

115
MCQhard

An IAM policy is attached to a group. A user in the group tries to terminate an EC2 instance in us-east-1 using the AWS CLI. What will happen?

A.The user cannot describe instances or terminate instances.
B.The user can terminate instances and describe instances.
C.The user can describe instances but cannot terminate instances in any region.
D.The user can describe instances but cannot terminate any instances.
AnswerC

The Deny resource uses a wildcard for instance ID, effectively denying termination of any instance in the account in us-east-1.

Why this answer

The IAM policy attached to the group allows the user to describe instances (ec2:DescribeInstances) but explicitly denies the ability to terminate instances (ec2:TerminateInstances) in any region. Since the policy is attached to the group, the user inherits these permissions, so they can list instances but any attempt to terminate them will be denied by AWS IAM, regardless of the region specified.

Exam trap

The trap here is that candidates may assume that a Deny on a specific action (terminate) also blocks related read actions (describe), but IAM evaluates each action independently, so describe is still allowed.

How to eliminate wrong answers

Option A is wrong because the user can describe instances, as the policy grants ec2:DescribeInstances permission; the user is not blocked from describing instances. Option B is wrong because the user cannot terminate instances; the policy explicitly denies ec2:TerminateInstances, so termination will fail. Option D is wrong because it states the user cannot terminate 'any instances' but does not specify the region limitation; the correct answer clarifies that the denial applies to all regions, which is already implied by the policy's effect, but Option D is incomplete and less precise than Option C.

116
MCQhard

A company has an IAM policy attached to a user. When the user tries to stop an EC2 instance using the AWS CLI, they receive an 'AccessDenied' error. The instance is tagged with 'Environment=Production'. What is the most likely cause?

A.The user is using an incorrect CLI command syntax.
B.The policy does not allow the ec2:StopInstances action for instances with the 'Environment=Production' tag.
C.The policy does not specify the instance ID in the Resource field.
D.A service control policy (SCP) or a resource-based policy is denying the action.
AnswerD

A service control policy (SCP) or resource-based policy can deny actions even if the user's IAM policy allows them. This is the most likely cause of the 'AccessDenied' error.

Why this answer

The 'AccessDenied' error despite having the StopInstances permission indicates that something else is denying the action. The most likely cause is a service control policy (SCP) attached at the account or organizational level, or a resource-based policy on the EC2 instance itself that explicitly denies the action. Option A is wrong because incorrect CLI syntax would cause a different error.

Option B is wrong because the policy may not have a tag-based condition; the issue is not about missing tag permissions. Option C is wrong because the policy can use a wildcard for the Resource field, so not specifying an instance ID does not cause AccessDenied. Option D correctly identifies that an SCP or resource-based policy is denying the action.

117
MCQeasy

A company uses Amazon S3 to store sensitive customer data. The security team requires that all data be encrypted at rest using server-side encryption with a customer-managed key (SSE-KMS). What is the MOST secure way to enforce this requirement across all S3 buckets?

A.Use AWS Config rules to detect unencrypted objects and remediate with Lambda.
B.Enable default encryption on each bucket with SSE-KMS.
C.Create an IAM policy that requires kms:Encrypt permission for all S3 operations.
D.Use an S3 bucket policy that denies PutObject if the x-amz-server-side-encryption-aws-kms-key-id header is not present.
AnswerD

A bucket policy that denies PutObject unless the x-amz-server-side-encryption-aws-kms-key-id header is present ensures that all objects uploaded must use SSE-KMS, providing a strong preventive control that cannot be bypassed by the user.

Why this answer

The most secure way to enforce SSE-KMS across all S3 buckets is to use an S3 bucket policy that denies PutObject if the required encryption header is not present. This ensures that any upload attempts without SSE-KMS are rejected, providing a preventive control. Option A is incorrect because AWS Config rules can only detect and remediate after the fact, not prevent non-compliant uploads.

Option B is incorrect because default encryption can be overridden by specifying a different encryption header in the request. Option C is incorrect because IAM policies control permissions for API calls but cannot enforce specific encryption parameters on object uploads.

118
MCQmedium

A company runs a critical application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The application experiences intermittent high latency due to CPU spikes on some instances. The company wants to automatically replace unhealthy instances and optimize costs. What should a solutions architect do?

A.Configure a target tracking scaling policy based on average CPU utilization.
B.Use a lifecycle hook to perform a health check and terminate unhealthy instances.
C.Use an AWS Lambda function to terminate instances with high CPU.
D.Implement a scheduled scaling policy to increase instances during peak hours.
AnswerA

A target tracking policy scales the group to maintain CPU utilization at a target value and works with ALB health checks to replace unhealthy instances.

Why this answer

A target tracking scaling policy dynamically adjusts the number of instances based on average CPU utilization, which addresses intermittent CPU spikes. The Auto Scaling group also automatically replaces instances that fail ALB health checks, ensuring unhealthy instances are replaced. This optimizes costs by scaling down during low usage.

Option B is incorrect: lifecycle hooks are for custom actions during instance launch or termination, not for replacing unhealthy instances. Option C is incorrect: terminating instances with high CPU via Lambda does not integrate with Auto Scaling and could cause instability. Option D is incorrect: scheduled scaling is for predictable traffic patterns, not intermittent spikes.

Exam trap

Candidates may think that lifecycle hooks are needed to replace unhealthy instances, but ALB health checks integrated with Auto Scaling already handle this automatically.

119
MCQeasy

A company runs a static website on Amazon S3 behind Amazon CloudFront. The website uses a custom domain and SSL certificate from AWS Certificate Manager (ACM). Users report that they sometimes see an older version of the website after updates. What should the company do to ensure users always see the latest content?

A.Disable and re-enable the CloudFront distribution after each update.
B.Enable S3 bucket versioning and use version IDs in URLs.
C.Reduce the CloudFront TTL to 0 seconds for all objects.
D.Create a CloudFront invalidation for the updated files.
AnswerD

Invalidation removes cached objects, forcing refresh.

Why this answer

Creating a CloudFront invalidation removes cached objects, forcing CloudFront to fetch the latest content from the origin. Option A is wrong because disabling and re-enabling the distribution is disruptive and unnecessary. Option B is wrong because bucket versioning controls object versions but does not invalidate CloudFront cache.

Option C is wrong because reducing TTL to 0 affects future caching but does not clear existing cache.

120
Multi-Selecthard

A company runs a critical database on Amazon RDS for PostgreSQL. The database is experiencing performance degradation due to high CPU utilization. The operations team wants to analyze the root cause. Which THREE steps should the team take to diagnose the issue?

Select 3 answers
A.Enable Enhanced Monitoring to view OS-level metrics such as CPU and memory usage.
B.Increase the instance size to provisioned IOPS to handle the load.
C.Enable Amazon RDS Performance Insights to identify the queries consuming the most CPU.
D.Review Amazon RDS events to check for any recent maintenance or failover activities.
E.Enable Multi-AZ deployment for automatic failover.
AnswersA, C, D

Enhanced Monitoring provides detailed OS metrics.

Why this answer

Options A, C, and D are correct. Enabling Enhanced Monitoring provides OS-level metrics like CPU and memory usage, helping to identify resource bottlenecks. Performance Insights helps identify the specific queries consuming the most CPU, enabling targeted optimization.

Reviewing RDS events can reveal recent maintenance activities or failovers that might impact performance. Option B is incorrect because increasing instance size or IOPS is a remedial action, not a diagnostic step. Option E is incorrect because Multi-AZ is for high availability, not performance diagnosis.

121
MCQeasy

A company uses Amazon RDS for MySQL for its database. The operations team notices that read queries are slow during peak hours. The application is read-heavy and can tolerate eventual consistency. Which solution would improve read performance with minimal application changes?

A.Increase the DB instance class to a larger size.
B.Enable Multi-AZ deployment for failover support.
C.Enable RDS Proxy to pool database connections.
D.Create an RDS read replica and direct read traffic to it.
AnswerD

Read replicas offload read queries and can be added without application changes.

Why this answer

Creating an RDS read replica allows read traffic to be offloaded from the primary DB instance, significantly improving read performance with minimal application changes, and the application can tolerate eventual consistency. Option A is incorrect because increasing the DB instance class may help but is more costly and does not scale reads independently. Option B is incorrect because Multi-AZ provides high availability and failover, not read scaling.

Option C is incorrect because RDS Proxy is for connection pooling and managing database connections, not for scaling reads.

122
MCQeasy

A solutions architect runs the AWS CLI command shown in the exhibit to troubleshoot a failed CloudFormation stack creation. What is the most likely cause of the failure?

A.The VPC configuration is incorrect, causing the Auto Scaling group to fail.
B.The LaunchConfigurationName property in the Auto Scaling group resource was not provided or was an incorrect type.
C.The Auto Scaling group resource type is not supported in the region.
D.The IAM role for the stack does not have permission to create Auto Scaling groups.
AnswerB

The error states that LaunchConfigurationName must be of type String, implying it was missing or wrong.

Why this answer

The error message indicates that the 'LaunchConfigurationName' property must be a string, meaning it was likely not provided or was of the wrong type. Option A is wrong because the error message does not mention any VPC configuration issues. Option C is wrong because the error specifically references the 'LaunchConfigurationName' property, not the resource type being unsupported in the region.

Option D is wrong because the error indicates a property validation issue, not a permissions problem.

123
MCQhard

Refer to the exhibit. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:role/Admin" }, "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "*", "Condition": { "StringEquals": { "kms:CallerAccount": "123456789012" } } }, { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:role/Admin" }, "Action": [ "kms:Decrypt" ], "Resource": "*" } ] } A solutions architect is reviewing the above KMS key policy. The Admin role cannot decrypt data using the key. What is the MOST likely reason?

A.The second statement does not include kms:GenerateDataKey, which is required for decryption.
B.The condition in the first statement restricts decryption to requests coming from account 123456789012, but the role might be used by a user from a different account.
C.There is an explicit deny statement elsewhere in the policy.
D.The condition key kms:CallerAccount is not a valid condition key for KMS key policies.
AnswerC

This is the most likely reason. Since the shown policy allows decryption via both statements, but the role still cannot decrypt, there must be an explicit deny statement elsewhere in the key policy that overrides these allows. Such a deny could be for the same actions or same principal.

Why this answer

The key policy shown does not contain any explicit deny statements, so the inability to decrypt must be due to an explicit deny elsewhere in the key policy (possibly not shown) or in an IAM policy attached to the role. Option B is incorrect because the kms:CallerAccount condition checks the AWS account ID of the principal making the request; when a role from account 123456789012 is assumed, the caller account is 123456789012, regardless of the user's origin. Therefore, the condition would pass, and the first statement would apply.

Since both statements allow decryption, the only remaining explanation is an explicit deny somewhere.

124
MCQhard

A company uses AWS CloudFormation to manage infrastructure. A recent stack update failed because a resource exceeded a service quota. The team wants to be notified proactively when service limits are approaching. Which solution meets this requirement?

A.Use AWS CloudTrail to monitor API calls that indicate quota exhaustion.
B.Use AWS Config rules to check if resources are within limits.
C.Use AWS Trusted Advisor to check service limits regularly.
D.Use Amazon CloudWatch to monitor service quota usage metrics and set CloudWatch alarms.
AnswerD

Service quotas are available as CloudWatch metrics and can trigger alarms.

Why this answer

Amazon CloudWatch can monitor service quota usage metrics (published by AWS Service Quotas) and trigger alarms when thresholds are approached. Option A is wrong: AWS CloudTrail logs API calls, not quota utilization. Option B is wrong: AWS Config evaluates resource configurations against rules, not service limits.

Option C is wrong: AWS Trusted Advisor provides a dashboard view of service limits but does not natively support proactive alarms.

125
MCQeasy

A company stores sensitive data in an S3 bucket. The security team requires that all data be encrypted at rest using server-side encryption with AWS KMS (SSE-KMS). An audit reveals that some objects were uploaded without encryption. What is the MOST efficient way to enforce encryption for all future uploads?

A.Enable default encryption on the bucket.
B.Use S3 Batch Operations to encrypt existing objects.
C.Add a bucket policy that denies PutObject if the x-amz-server-side-encryption header is not set.
D.Enable AWS CloudTrail to monitor uploads without encryption.
AnswerC

This enforces encryption for all future uploads.

Why this answer

An S3 bucket policy that denies PutObject without the correct encryption header enforces encryption at upload time. Option A is wrong because default encryption applies only if no encryption header is provided; it can be overridden. Option B is wrong because it only encrypts existing objects, not future ones.

Option D is wrong because CloudTrail does not enforce encryption.

126
Multi-Selecteasy

A company is designing a disaster recovery strategy for a critical application running on Amazon RDS for PostgreSQL. The primary database is in us-east-1. The company needs a Recovery Point Objective (RPO) of less than 5 seconds and a Recovery Time Objective (RTO) of less than 1 minute. Which TWO solutions meet these requirements? (Choose TWO.)

Select 2 answers
A.Use AWS Database Migration Service (DMS) for continuous replication.
B.Configure a Multi-AZ deployment with a standby in a different AWS Region.
C.Create a cross-Region read replica and promote it during a disaster.
D.Take daily snapshots and copy them to another Region.
E.Enable automated backups with a retention period of 35 days.
AnswersA, C

Correct. DMS continuous replication can achieve sub-5-second RPO and sub-1-minute RTO when configured with a pre-provisioned target and automated promotion.

Why this answer

AWS DMS with ongoing replication (change data capture) can achieve sub-5-second RPO by continuously replicating changes to a target database in another Region. The RTO can be under 1 minute if the target is pre-provisioned and promotion is automated. Option C: A cross-Region read replica uses asynchronous replication, but when configured for maximum throughput, the typical lag is under 5 seconds, and promoting the replica takes less than a minute, meeting the RPO and RTO requirements.

Options B is incorrect because Multi-AZ deployments are limited to a single Region and do not support cross-Region synchronous replication. Option D: Daily snapshots have an RPO of up to 24 hours. Option E: Automated backups have an RPO of up to 5 minutes and an RTO longer than 1 minute.

Therefore, only A and C satisfy the required RPO and RTO.

127
MCQmedium

A company uses AWS Lambda functions behind an Amazon API Gateway REST API. The Lambda functions query an Amazon RDS for PostgreSQL database. Recently, the company has noticed increased latency and occasional timeouts during peak hours. A solutions architect needs to improve the performance and scalability of the database layer. Which solution will meet these requirements with the LEAST operational overhead?

A.Enable Amazon DynamoDB Accelerator (DAX) on the RDS instance.
B.Add a Multi-AZ RDS Read Replica and modify Lambda to use the Read Replica for queries.
C.Increase the instance size of the RDS database to handle more concurrent connections.
D.Implement Amazon RDS Proxy to manage connection pooling between Lambda and the RDS instance.
AnswerD

RDS Proxy handles connection pooling, reducing database load and improving scalability.

Why this answer

Amazon RDS Proxy manages connection pooling between Lambda functions and RDS, reducing the overhead of opening and closing connections, which helps avoid latency and timeouts during peak load. Option A is incorrect because DAX is a caching layer for DynamoDB, not RDS. Option B is incorrect because while Read Replicas can offload read traffic, they do not address connection management, and Lambda still creates many connections.

Option C is incorrect because increasing instance size is vertical scaling and does not solve the connection pooling issue; it may still lead to timeouts under high connection surges.

128
MCQeasy

A company uses Amazon CloudFront to deliver static content from an S3 bucket. They want to restrict access so that only CloudFront can access the S3 bucket. What configuration should they use?

A.Set the S3 bucket policy to allow access only from CloudFront's public IP ranges.
B.Create an origin access identity (OAI) and grant it read access to the S3 bucket.
C.Attach an IAM role to CloudFront distribution.
D.Configure CloudFront signed URLs.
AnswerB

OAI allows CloudFront to authenticate to S3.

Why this answer

Create an origin access identity (OAI) and grant it read access to the S3 bucket. An OAI is a special CloudFront user that allows CloudFront to access private S3 bucket content securely. Option A is incorrect because CloudFront does not have static public IP ranges; it uses a large dynamic range.

Option C is incorrect because IAM roles are not used directly for CloudFront to S3 access; OAI is the standard method. Option D is incorrect because signed URLs control end-user access, not origin access.

129
MCQeasy

A DevOps engineer is troubleshooting an AWS CodePipeline that fails during the Deploy stage. The pipeline deploys a static website to an S3 bucket. The error message indicates 'Access Denied' when putting objects into the bucket. What is the MOST likely cause?

A.The IAM role used by CodePipeline lacks s3:PutObject permission on the bucket.
B.The S3 bucket policy denies access from the pipeline's AWS account.
C.The CodeBuild project does not have the necessary environment variables.
D.The S3 bucket does not have versioning enabled.
AnswerA

The role needs explicit write permissions to the S3 bucket.

Why this answer

The pipeline role needs s3:PutObject permission on the bucket. Option B is wrong because S3 bucket policy is not the issue if the pipeline uses a role. Option C is wrong unless the role already has the permission.

Option D is wrong because versioning is not required for writes.

130
MCQeasy

A company wants to automatically enforce encryption on all new objects uploaded to an S3 bucket. What should they do?

A.Use Amazon CloudFront to enforce HTTPS.
B.Enable S3 default encryption on the bucket.
C.Require pre-signed URLs for all uploads.
D.Add a bucket policy that denies PutObject without the x-amz-server-side-encryption header.
AnswerD

An S3 bucket policy with a condition that denies PutObject if the x-amz-server-side-encryption header is not present enforces encryption for all new objects.

Why this answer

An S3 bucket policy with a condition that denies PutObject if the x-amz-server-side-encryption header is not present enforces encryption for all new objects. Option A is wrong because Amazon CloudFront enforces HTTPS for data in transit, not server-side encryption at rest. Option B is wrong because enabling S3 default encryption encrypts objects that do not specify encryption, but it does not deny uploads without encryption headers; objects can still be uploaded without explicitly setting encryption.

Option C is wrong because pre-signed URLs provide temporary access but do not enforce encryption requirements.

131
MCQhard

A company has a production AWS Lambda function that processes data from an Amazon SQS queue. The function often experiences throttling errors. The company wants to implement a solution to reduce throttling and improve processing performance. Which solution meets these requirements?

A.Configure the SQS queue to use a higher concurrency limit.
B.Increase the reserved concurrency for the Lambda function.
C.Create additional SQS queues and distribute messages across them.
D.Increase the batch size of the Lambda event source mapping.
AnswerB

This ensures the function has enough concurrency to avoid throttling.

Why this answer

Increasing the reserved concurrency for the Lambda function guarantees that the function can process more invocations concurrently, reducing throttling errors. Option A is incorrect because SQS queues do not have a configurable concurrency limit; concurrency is managed at the Lambda function level. Option C is incorrect because distributing messages across multiple queues does not increase the function's concurrency; each queue invocation still counts toward the same reserved concurrency.

Option D, increasing the batch size, can improve throughput per invocation but does not reduce throttling caused by insufficient concurrency.

132
Multi-Selecthard

A company runs a web application on Amazon ECS with Fargate launch type. The application uses an Application Load Balancer. The operations team notices that the ALB returns 503 errors during peak traffic. Which TWO actions should the solutions architect take to resolve this issue?

Select 2 answers
A.Increase the idle timeout on the ALB.
B.Enable ECS service Auto Scaling to automatically adjust the number of tasks.
C.Increase the deregistration delay on the target group.
D.Review the ECS service events for task failures or health check issues.
E.Increase the task memory allocation in the task definition.
AnswersB, D

ECS service Auto Scaling adjusts the number of tasks based on demand, ensuring sufficient capacity to handle peak traffic and reducing 503 errors.

Why this answer

Options B and D are correct. 503 errors from ALB indicate the target group has no healthy targets. Enabling ECS service Auto Scaling (B) will increase the number of tasks to handle traffic. Reviewing ECS service events (D) can reveal why tasks are unhealthy.

Option A is wrong because increasing ALB idle timeout does not affect health. Option C is wrong because increasing deregistration delay might help but is not a primary fix. Option E is wrong because increasing task memory might not solve the health issue if it's due to capacity.

133
Multi-Selecteasy

A company is designing a new microservices architecture on Amazon ECS with Fargate. The company wants to ensure that services can discover each other using DNS names. Which TWO components are required?

Select 2 answers
A.AWS Cloud Map
B.Network Load Balancer (NLB)
C.Amazon ECS Service Connect
D.Amazon Route 53
E.Application Load Balancer (ALB)
AnswersA, D

AWS Cloud Map is a managed service for service discovery, allowing services to register with DNS names and health checks.

Why this answer

Only AWS Cloud Map (A) and Amazon Route 53 (D) are required for DNS-based service discovery. AWS Cloud Map allows services to register with DNS names and health checks, while Route 53 can be configured with private hosted zones to resolve those DNS names within the VPC. An Application Load Balancer (E) is not required because service discovery can be achieved solely through Cloud Map and Route 53 without any load balancer.

ECS Service Connect (C) and Network Load Balancer (B) are also not required for basic DNS-based service discovery.

Exam trap

Candidates often assume an ALB is needed for service discovery due to its DNS name, but Cloud Map and Route 53 alone provide DNS-based discovery without a load balancer.

134
MCQhard

A company uses AWS CodePipeline to deploy a microservices application to Amazon ECS. Recently, a deployment failed because the new task definition referenced an ECR image that did not exist. The team wants to prevent this type of failure in the future. Which action should be taken?

A.Configure ECR scan on push to verify image integrity.
B.Add an ECR lifecycle policy to expire old images.
C.Add a validation step in CodePipeline to run a task definition dry-run.
D.Enable AWS CloudTrail to log ECR API calls.
AnswerC

Dry-run validates that the image exists and the task definition is valid before deployment.

Why this answer

Adding a validation step in CodePipeline that runs a task definition dry-run can verify the referenced ECR image exists before deployment, preventing failures. Option A is wrong because ECR scan on push only checks for vulnerabilities, not image existence. Option B is wrong because ECR lifecycle policies manage image retention, not validation.

Option D is wrong because CloudTrail logs API calls but does not prevent deployment failures.

135
MCQeasy

A company runs a critical application on EC2 instances in an Auto Scaling group. They want to be notified immediately if any instance fails a status check. What is the simplest solution?

A.Configure an ELB health check and monitor the unhealthy host count.
B.Use AWS Systems Manager Automation to check instance status periodically.
C.Create a CloudWatch alarm on the StatusCheckFailed metric with an SNS action.
D.Enable AWS CloudTrail and create a metric filter for EC2 instance failures.
AnswerC

StatusCheckFailed metric is available and can trigger alarms.

Why this answer

CloudWatch can monitor the EC2 StatusCheckFailed metric and trigger an SNS notification when an instance fails a status check. This is the simplest solution because it uses built-in metrics and requires no custom scripting. Option A uses ELB health checks which monitor load balancer target health, not instance status checks.

Option B uses Systems Manager Automation which is not real-time. Option D uses CloudTrail which logs API calls, not status checks.

136
MCQmedium

A company runs a production AWS Lambda function that processes orders. Recently, the function has been timing out occasionally. The function uses a VPC with a single private subnet and has a timeout of 30 seconds. What is the MOST likely cause of the timeout?

A.The function is experiencing cold starts due to high concurrency.
B.The function is hitting the maximum concurrent execution limit.
C.The function needs to be attached to a public subnet.
D.The function does not have a NAT gateway or VPC endpoints to access external resources.
AnswerD

Lambda in a VPC needs a route to the internet for external calls, otherwise requests hang.

Why this answer

The most likely cause of the timeout is that the Lambda function is attached to a VPC but does not have a NAT gateway or VPC endpoints to access external resources (Option D). When a Lambda function is configured to run in a VPC, it loses default internet access. To access external services (such as an external database or API), the function needs a NAT gateway in a public subnet or VPC endpoints for the specific services.

Without this, the function will timeout when trying to reach external resources. Option A is incorrect because cold starts cause latency but not consistent timeouts. Option B is incorrect because hitting the concurrent execution limit would cause throttling (HTTP 429 or 500 errors), not timeouts.

Option C is incorrect because attaching to a public subnet would not help; Lambda functions cannot have public IPs in a VPC by default, and a public subnet does not provide internet access without an internet gateway and route table updates.

137
MCQhard

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

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

Offloads reads, minimal changes.

Why this answer

The most appropriate solution is to create one or more RDS read replicas and direct read queries to the replica endpoint. Read replicas offload read traffic from the primary Multi-AZ instance, improving read latency with minimal application changes (only the read endpoint needs to be updated). Option A (DynamoDB Global Tables) would require a complete database migration and application rewrite, which is not minimal.

Option C (ElastiCache) would require application code changes to cache queries, and may not be as effective for complex joins. Option D (increasing instance size) is vertical scaling that may only provide limited improvement and does not directly address read-heavy workloads; it also incurs higher cost without truly scaling out read capacity.

138
MCQmedium

A company uses Amazon DynamoDB as a data store for a mobile application. The application experiences throttling errors during peak hours. The table has a provisioned read capacity of 5000 RCUs and write capacity of 2000 WCUs. The throttling is on writes. What is the MOST cost-effective solution?

A.Enable DynamoDB Accelerator (DAX) to offload writes.
B.Switch to on-demand capacity mode.
C.Increase write capacity to 4000 WCUs.
D.Enable auto scaling for DynamoDB write capacity.
AnswerD

Auto scaling adjusts capacity based on traffic, reducing throttling and cost.

Why this answer

DynamoDB Accelerator (DAX) is a read cache, not for writes. The most cost-effective solution is to use DynamoDB auto scaling for writes to handle peak loads without over-provisioning.

139
MCQeasy

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

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

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

Why this answer

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

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

140
MCQmedium

A company has a production AWS Lambda function that processes orders. The function's execution time has increased, causing timeouts. The team wants to troubleshoot without affecting production traffic. What should they do?

A.Enable detailed CloudWatch Logs for the production function and analyze them.
B.Create a new Lambda function with a different name to test the code changes.
C.Use a Lambda alias to route a percentage of traffic to a new version with increased timeout.
D.Increase the timeout of the production Lambda function temporarily.
AnswerB

A separate function isolates testing from production.

Why this answer

Creating a separate Lambda function with the same code but a different name allows testing and debugging without impacting the production function. Option A is wrong because version aliases can route traffic but still affect production. Option C is wrong because CloudWatch Logs will show the production function's logs.

Option D is wrong because changing the timeout directly on the production function could break the SLA.

141
MCQeasy

A company has deployed a web application behind an Application Load Balancer (ALB) with an Auto Scaling group. Users report that the application is slow during peak hours. The CPU utilization of the EC2 instances is consistently below 40%, but the ALB's request count per target is high. Which action would MOST improve performance?

A.Increase the instance size (e.g., from t3.medium to t3.large)
B.Increase the desired capacity of the Auto Scaling group
C.Configure the Auto Scaling group to scale based on CPU utilization
D.Change the ALB routing algorithm to least outstanding requests
AnswerB

Adding more instances reduces request count per target.

Why this answer

High request count per target with low CPU utilization suggests the application is I/O bound or waiting on external calls. Adding more instances by increasing the desired capacity distributes the load across more targets, reducing queueing and improving performance. Option A is wrong because the bottleneck is not CPU, so increasing instance size is unlikely to help.

Option C is wrong because scaling based on CPU utilization would not trigger since CPU is low. Option D is wrong because changing the ALB routing algorithm to least outstanding requests might help distribute load more evenly but does not add capacity; increasing desired capacity directly addresses the high request count per target.

142
MCQeasy

A company uses Amazon S3 to store sensitive data. The security team requires that all S3 buckets have server-side encryption enabled. How can the company enforce this across all existing and future buckets?

A.Enable default encryption on each S3 bucket.
B.Create an IAM policy that denies s3:PutObject unless encryption headers are present.
C.Use an S3 bucket policy to deny PutObject without encryption.
D.Use AWS Config to automatically remediate noncompliant buckets.
AnswerA

Default encryption ensures all new objects are encrypted.

Why this answer

Enabling default encryption on each S3 bucket ensures that all objects uploaded to that bucket are automatically encrypted, enforcing the policy across existing and future buckets. Option B is wrong because an IAM policy that denies s3:PutObject without encryption headers only applies when the request includes encryption headers; it does not enforce encryption for all objects, and it depends on the caller including the headers. Option C is wrong because while an S3 bucket policy can deny PutObject without encryption, it requires a policy per bucket and does not automatically remediate existing buckets.

Option D is wrong because AWS Config can detect noncompliant buckets but requires a custom remediation action to enable encryption; it does not automatically enforce encryption without additional setup.

143
MCQmedium

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

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

Deep Archive offers low cost with 12-hour retrieval.

Why this answer

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

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

Exam trap

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

144
MCQmedium

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

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

CloudFront caches content; long TTL prevents immediate updates.

Why this answer

CloudFront caches objects at edge locations based on TTL; if the TTL has not expired, users will get cached old content. Option B is wrong because S3 versioning does not affect cache invalidation. Option C is wrong because CloudFront does not have a 'Cache-Control' header by default; it's set by the origin.

Option D is wrong because S3 Transfer Acceleration is irrelevant to caching.

145
MCQmedium

A company runs a critical database on an Amazon RDS for PostgreSQL instance. The database experiences high write latency during peak hours. The company wants to improve write performance without changing the application code. Which action should the Solutions Architect take?

A.Create a read replica and offload read traffic.
B.Modify the RDS instance to use a larger instance type with higher IOPS.
C.Enable Multi-AZ deployment for the RDS instance.
D.Change the DB parameter group to optimize for write operations.
AnswerB

Larger instance types with higher IOPS reduce write latency.

Why this answer

Upgrading to a larger instance type with higher IOPS directly increases the I/O capacity of the RDS instance, improving write performance without requiring application changes. Option A is incorrect because read replicas are used to offload read traffic, not to improve write latency. Option C is incorrect because Multi-AZ deployment provides high availability and automatic failover, but does not directly improve write performance.

Option D is incorrect because modifying DB parameter groups can tune certain database settings but does not increase the underlying IOPS provided by the instance type.

146
Multi-Selecteasy

A company is using AWS Organizations with multiple accounts. The security team wants to ensure that all Amazon S3 buckets across the organization are encrypted at rest. Which TWO steps should the security team take to enforce this requirement?

Select 2 answers
A.Create an AWS Config rule that checks for S3 bucket default encryption and auto-remediates using SSM Automation.
B.Create a service control policy (SCP) that denies s3:PutObject unless the x-amz-server-side-encryption header is present.
C.Use Amazon GuardDuty to monitor S3 data access patterns.
D.Create an IAM role with permissions to encrypt S3 buckets and assign it to all users.
E.Enable AWS CloudTrail to log all S3 API calls.
AnswersA, B

Config rules can enforce and remediate non-compliant resources.

Why this answer

AWS Config can be configured with a managed rule (e.g., s3-bucket-server-side-encryption-enabled) to detect buckets without default encryption, and an automatic remediation action using AWS Systems Manager (SSM) Automation can enforce encryption by applying the bucket's default encryption settings. Option B is correct because a service control policy (SCP) that denies s3:PutObject unless the x-amz-server-side-encryption header is present ensures that any object uploaded to S3 must include encryption headers, effectively enforcing encryption at the API level across all accounts in the organization.

Exam trap

The trap here is that candidates often confuse detective controls (like AWS Config or CloudTrail) with preventive controls (like SCPs), or they mistakenly think that IAM roles or GuardDuty can enforce encryption policies, when in fact only SCPs and bucket policies with condition keys can deny unencrypted uploads at the API level.

147
Multi-Selectmedium

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

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

Right-sizing prevents over-provisioning and reduces cost.

Why this answer

Spot Instances are ideal for fault-tolerant, interruptible workloads like batch processing, significantly reducing costs (Option E). Right-sizing the cluster by analyzing resource utilization ensures that you are not over-provisioning, which directly lowers costs (Option B). On-Demand Instances (A) are more expensive and unnecessary given fault tolerance.

Reserved Instances (C) are for steady-state workloads, not nightly batch jobs. Dedicated Instances (D) add cost and do not improve performance for this use case.

148
MCQeasy

A DevOps engineer notices that an EC2 instance is running but is not reachable via SSH. The instance was launched with a security group that allows SSH from anywhere (0.0.0.0/0). What is the most likely cause?

A.The instance does not have a public IP address.
B.The instance is failing system status checks.
C.The security group is not attached to the instance.
D.The subnet's network ACL is blocking inbound SSH traffic.
AnswerD

Network ACLs are stateless and can block traffic even if the security group allows it. If the inbound rule for port 22 is missing or denied in the network ACL, SSH connections will be dropped.

Why this answer

The most likely cause is that the subnet's network ACL is blocking inbound SSH traffic. While the security group allows SSH from anywhere (0.0.0.0/0), network ACLs operate at the subnet level and can override security group rules. If the network ACL denies inbound traffic on port 22, SSH connections will be blocked.

Option A is less likely because even without a public IP, the instance could be reached via private IP from within the VPC; the scenario implies external SSH access. Option B is incorrect because system status checks indicate underlying hardware issues, not connectivity problems. Option C is incorrect because the security group is attached by default when launching an instance, and the question confirms it allows SSH.

149
MCQmedium

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

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

RDS Proxy manages connection pooling, reducing the number of connections and CPU usage with minimal code changes.

Why this answer

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

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

150
MCQmedium

A media company delivers video content to a global audience using Amazon CloudFront, AWS Lambda@Edge, and Amazon S3. The origin is an S3 bucket that stores video files. Recently, users in Asia-Pacific report slow load times. The operations team checks CloudFront metrics and sees a high cache miss rate for content popular in that region. The team wants to improve performance for all users without significantly increasing costs. The application uses a single CloudFront distribution with a default cache behavior. The S3 bucket is in us-east-1. Which solution should the team implement?

A.Enable S3 Transfer Acceleration on the S3 bucket and update CloudFront to use the accelerated endpoint.
B.Create separate CloudFront distributions for each geographic region and use Route 53 latency-based routing.
C.Use Lambda@Edge to redirect requests to the nearest S3 bucket based on the viewer's location.
D.Set up multiple origin groups in the existing CloudFront distribution with one S3 bucket per region, and configure cache behaviors based on geographic headers.
AnswerC

Lambda@Edge can redirect requests to the nearest regional S3 bucket based on viewer location, reducing latency and cache misses efficiently.

Why this answer

Using Lambda@Edge to redirect requests to the nearest S3 bucket based on viewer location reduces latency for global users by serving content from a regional S3 bucket. This approach improves performance for all users without significantly increasing costs, as it leverages existing Lambda@Edge and S3 infrastructure. Option D is incorrect because CloudFront origin groups are designed for failover, not geographic routing, and using geographic headers for origin selection is not a native feature.

Exam trap

The trap is that origin groups are often mistakenly thought to support geographic routing, but they only provide failover between origins. Right answer uses Lambda@Edge for location-based redirection.

← PreviousPage 2 of 6 · 410 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Continuous Improvement questions.