Courseiva

CCNA Continuous Improvement for Existing Solutions Questions

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

301
Matchingmedium

Match each AWS database service to its characteristic.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

MySQL/PostgreSQL-compatible with high availability

Fully managed NoSQL key-value and document database

Petabyte-scale data warehouse for analytics

In-memory caching with Redis or Memcached

Managed relational database for multiple engines

Why these pairings

Each AWS database service targets specific use cases: RDS for relational workloads, DynamoDB for NoSQL, Redshift for analytics, and ElastiCache for caching. Common confusions include mixing up NoSQL with relational and caching with warehousing.

302
MCQmedium

A company runs a web application on EC2 instances behind an ALB. Users report intermittent 503 errors during peak hours. The metrics show the target group's healthy host count drops to zero periodically. What is the most likely cause?

A.The ALB's idle timeout is set too low.
B.The security group for the EC2 instances does not allow inbound traffic from the ALB.
C.The EC2 instances are in an Auto Scaling group with insufficient capacity.
D.The health check path is misconfigured and returns HTTP 404.
AnswerD

A 404 response causes the ALB to mark the instance as unhealthy, reducing the healthy host count.

Why this answer

The ALB performs health checks on targets by sending requests to the configured health check path. If the health check path returns an HTTP 404 (or any non-200 status), the ALB marks the target as unhealthy. When all instances have a misconfigured health check path that returns 404, the healthy host count drops to zero, resulting in 503 errors.

Option D is correct because a misconfigured health check path directly causes all instances to be marked unhealthy. Option A (idle timeout) would cause connection timeouts but not affect healthy host count. Option B (security group) would prevent traffic from ALB, but the health check would still succeed if the security group allows ALB traffic, and it would not cause healthy host count to drop to zero periodically if misconfigured.

Option C (insufficient capacity) would cause scaling issues but not zero healthy hosts if the health check is correct. Therefore, D is the most likely cause.

303
Drag & Dropmedium

Drag and drop the steps to troubleshoot an EC2 instance that is unreachable via SSH in the correct order.

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

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

Why this order

Start with security groups, then network ACLs, then public IP, then system status, and finally console output.

304
Multi-Selecthard

A company runs a containerized microservices application on Amazon EKS. The operations team notices that some pods are frequently being evicted due to resource constraints. The team wants to improve resource utilization and reduce evictions. Which TWO actions should the team take? (Choose two.)

Select 2 answers
A.Configure Horizontal Pod Autoscaler based on CPU and memory utilization.
B.Increase the resource requests for all pods to ensure they have enough resources.
C.Set resource quotas per namespace to limit resource consumption.
D.Enable Cluster Autoscaler to add more worker nodes.
E.Use Vertical Pod Autoscaler to automatically adjust pod resource requests.
AnswersA, C

Scales pods to handle load.

Why this answer

Options A and C are correct. Horizontal Pod Autoscaler (HPA) dynamically scales the number of pod replicas based on CPU or memory utilization, helping to meet demand without over-provisioning. Resource quotas limit the total resources a namespace can consume, preventing any single team or application from starving others.

Option B is incorrect because increasing resource requests for all pods can lead to over-provisioning and wasted resources, potentially worsening the eviction problem. Option D is incorrect because Cluster Autoscaler adds more worker nodes, which addresses cluster-level capacity but does not directly reduce pod evictions caused by node-level resource contention. Option E is incorrect because Vertical Pod Autoscaler (VPA) adjusts resource requests and limits automatically, but it often requires pod restarts and may not immediately prevent evictions if the underlying node is already overcommitted.

305
MCQmedium

A Lambda function logs are being retained for 30 days. The company wants to reduce costs by deleting logs older than 7 days. What should they do?

A.Export the logs to S3 and delete the log group.
B.Use the put-retention-policy command to set retentionInDays to 7.
C.Configure an S3 Lifecycle policy on the log group's underlying storage.
D.Create a CloudTrail trail to capture log events and expire them after 7 days.
AnswerB

This command directly sets the log group's retention period.

Why this answer

The exhibit shows the log group has a retention policy of 30 days. To change it to 7 days, use the put-retention-policy CLI command. Option B is correct.

Option A (CloudTrail) is for API logs. Option C (S3 lifecycle) is for objects, not CloudWatch Logs. Option D (export to S3) is for archival, not deletion.

306
MCQhard

A company runs a critical web application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The application stores session state in an Amazon ElastiCache for Redis cluster. Recently, the operations team noticed that during traffic spikes, the ALB returns 5xx errors and the application becomes slow. CloudWatch metrics show that the Redis cluster's CPU utilization reaches 100% and memory usage is high. The Auto Scaling group scales out, but the new instances take several minutes to warm up and become healthy. The company needs to improve the application's ability to handle traffic spikes with minimal impact on performance. Which solution should the company implement?

A.Configure ElastiCache Auto Scaling to automatically add nodes when CPU utilization exceeds 75%.
B.Enable cluster mode for the Redis cluster and add more shards.
C.Enable Multi-AZ replication for the Redis cluster.
D.Increase the instance size of the Redis cluster to a larger node type.
AnswerB

Cluster mode distributes data and load across multiple shards, increasing CPU and memory capacity.

Why this answer

Enabling cluster mode for the Redis cluster and adding more shards horizontally partitions the data across multiple nodes, distributing both CPU and memory load. This directly addresses the 100% CPU and high memory utilization during traffic spikes, allowing the cluster to handle more concurrent requests without performance degradation. Cluster mode also provides linear scalability, which is essential for a critical web application experiencing variable traffic.

Exam trap

The trap here is that candidates often confuse vertical scaling (increasing instance size) with horizontal scaling (adding shards), and fail to recognize that cluster mode is the only option that distributes both CPU and memory load across multiple nodes, which is necessary when a single node reaches 100% CPU utilization.

How to eliminate wrong answers

Option A is wrong because ElastiCache Auto Scaling is not a native feature; it requires custom automation using CloudWatch alarms and Lambda, and even then it adds nodes reactively, not proactively preventing the latency and 5xx errors during spikes. Option C is wrong because Multi-AZ replication provides high availability and failover, but it does not distribute read/write load or reduce CPU/memory pressure on the primary node. Option D is wrong because increasing the instance size (vertical scaling) has a hard limit based on the largest available node type and can still be overwhelmed during extreme spikes, whereas horizontal scaling with cluster mode offers near-unlimited scalability.

307
MCQmedium

A company runs a web application on Amazon EC2 instances in an Auto Scaling group across three Availability Zones. The application writes logs to local instance storage. The company wants to centralize log collection and ensure logs are retained even if instances are terminated. The current solution uses Amazon CloudWatch Logs agent, but log streams are frequently missing when instances are replaced. What should the company do to ensure complete log collection?

A.Configure the CloudWatch agent to use a persistent buffer on an EBS volume.
B.Configure an S3 Lifecycle policy to transition logs to S3 Glacier.
C.Use the CloudWatch agent to send logs directly to Amazon S3.
D.Attach an EBS volume to each instance and store logs there.
AnswerA

Correct. Configuring the CloudWatch agent to use a persistent buffer on an EBS volume ensures log data is not lost during instance termination because the buffer is stored on a durable EBS volume that persists independently of the instance.

Why this answer

The CloudWatch agent can be configured with a persistent buffer on an EBS volume. This buffer stores log data temporarily until it is successfully sent to CloudWatch Logs. Even if an EC2 instance is terminated, the buffered logs on the EBS volume are retained and will be sent when the agent is configured to use that volume.

This ensures no log data is lost during instance replacement. Option B is incorrect because S3 Lifecycle policies manage object transitions in Amazon S3, not CloudWatch logs. Option C is incorrect because the CloudWatch agent does not send logs directly to S3; it sends to CloudWatch Logs.

Option D is incorrect because simply storing logs on an EBS volume without the agent's persistent buffer does not ensure automatic log collection and forwarding; the logs would only reside on the volume and not be centrally collected.

308
MCQhard

A company runs a web application on Amazon ECS with Fargate launch type behind an Application Load Balancer. The application stores session state in a local file system on the container. Users report that they are frequently logged out and lose session data. What is the most likely cause?

A.ECS tasks are being replaced by the service scheduler during deployments or health checks.
B.The security group for the ECS tasks is blocking inbound traffic from the ALB.
C.The ECS service is configured to scale out, causing new tasks to be created without existing session data.
D.The Application Load Balancer is not configured with sticky sessions.
AnswerA

Fargate tasks are ephemeral; replacement causes loss of local session data.

Why this answer

ECS tasks using Fargate are ephemeral; when the service scheduler replaces tasks during deployments or due to health check failures, any session data stored in the local file system is lost, causing users to be logged out. Option B is incorrect because security group misconfiguration would prevent traffic entirely, not cause intermittent session loss. Option C is incorrect because scaling out creates additional tasks but does not by itself cause existing tasks to lose their local data; the issue is replacement, not scaling.

Option D is incorrect because sticky sessions only route a user to the same target, but if the target container is replaced, the local session data is still lost regardless of stickiness.

309
MCQhard

A company runs a critical application on Amazon ECS with Fargate launch type. The application experiences intermittent latency spikes. CloudWatch metrics show high CPU utilization on tasks during these spikes. The current task definition has 1 vCPU and 2 GB memory. Which improvement will most effectively reduce latency without over-provisioning?

A.Increase the number of tasks (desired count) to distribute the load.
B.Increase the vCPU to 2 while keeping 2 GB memory.
C.Increase both memory and vCPU to 4 GB and 2 vCPUs.
D.Increase the memory to 4 GB while keeping 1 vCPU.
AnswerC

Balanced increase addresses both CPU and memory constraints.

Why this answer

Increasing both vCPU and memory improves performance for CPU-bound tasks and prevents memory contention. Option A is wrong because increasing the number of tasks (horizontal scaling) does not reduce latency for a single request if the task itself is underpowered; it distributes load but does not address high CPU on each task. Option B is wrong because increasing only vCPU might alleviate CPU pressure but could still be limited by memory if the application is also memory-intensive; however, increasing both ensures no bottleneck.

Option D is wrong because increasing memory alone does not address the high CPU utilization.

310
Multi-Selectmedium

A company is using AWS Lambda functions behind an Amazon API Gateway REST API. The Lambda functions are written in Python and use the boto3 SDK to interact with DynamoDB. Recently, the company has observed increased latency and occasional 5xx errors from the API. The operations team wants to implement continuous improvements. Which TWO actions should be taken to improve performance and reliability? (Choose 2)

Select 2 answers
A.Set Lambda reserved concurrency to 5 for each function.
B.Configure provisioned concurrency for all Lambda functions.
C.Enable API Gateway caching with a TTL of 60 seconds.
D.Increase the Lambda function timeout to 30 seconds.
E.Enable DynamoDB auto scaling for the table.
AnswersC, E

Caching reduces the number of requests reaching Lambda and DynamoDB, improving latency and reducing load.

Why this answer

Enabling API Gateway caching reduces load on Lambda and DynamoDB for repeated requests, improving latency and reducing errors. Option E: Enabling DynamoDB auto scaling adjusts capacity based on traffic patterns, reducing throttling-related 5xx errors. Option A (Lambda reserved concurrency) limits concurrency and could worsen throttling.

Option B (provisioned concurrency) helps with cold starts but does not address DynamoDB throttling. Option D (increasing Lambda timeout) may mask underlying issues without resolving root causes.

311
MCQmedium

A company is migrating an on-premises application to AWS. The application requires persistent shared storage that can be accessed by multiple EC2 instances simultaneously with strong consistency. Which AWS storage solution should the company use?

A.Amazon S3 with S3 File Gateway.
B.Amazon S3 Glacier Deep Archive.
C.Amazon EBS with Multi-Attach enabled.
D.Amazon EFS
AnswerD

Amazon EFS is a fully managed NFS file system that can be mounted by many EC2 instances with strong consistency, making it the correct choice.

Why this answer

Amazon EFS is a fully managed NFS file system that can be mounted by multiple EC2 instances and provides strong consistency. Option A is incorrect because Amazon S3 with S3 File Gateway provides file access to S3 but S3 is eventually consistent for overwrites, not strongly consistent. Option B is incorrect because Amazon S3 Glacier Deep Archive is designed for long-term archival storage with retrieval times of hours, not for active shared storage.

Option C is incorrect because Amazon EBS with Multi-Attach enabled allows a single EBS volume to be attached to multiple instances, but it is block storage and requires a cluster-aware file system; it is not a fully managed shared file system.

312
Multi-Selecthard

A company runs a microservices architecture on Amazon ECS with Fargate. The operations team observes that some services are experiencing high latency during peak hours. The team wants to identify the root cause. Which THREE approaches should the team use? (Choose THREE.)

Select 3 answers
A.Use AWS X-Ray to trace requests through the microservices
B.Enable AWS CloudTrail to log API calls
C.Enable VPC Flow Logs to analyze network traffic
D.Use Amazon CloudWatch ServiceLens to correlate metrics, logs, and traces
E.Enable Container Insights for Amazon ECS
AnswersA, D, E

Identifies bottlenecks in the application flow.

Why this answer

(AWS X-Ray) traces requests through microservices to pinpoint latency sources. Option D (Amazon CloudWatch ServiceLens) correlates metrics, logs, and traces for comprehensive analysis. Option E (Container Insights for Amazon ECS) provides resource metrics (e.g., CPU, memory, network) to identify bottlenecks.

Option B (AWS CloudTrail) logs API calls, not application performance. Option C (VPC Flow Logs) analyzes network traffic, not application-level latency.

313
MCQeasy

A company is using Amazon CloudFront to deliver content to users worldwide. The origin is an S3 bucket. Users in some regions experience high latency. What is the most effective way to reduce latency?

A.Add more CloudFront edge locations in the affected regions.
B.Enable CloudFront's SSL/TLS certificate using SNI only.
C.Use an origin shield to reduce the number of requests to the S3 bucket.
D.Enable S3 Transfer Acceleration on the bucket.
AnswerC

Origin shield increases cache hit ratio and reduces origin load.

Why this answer

Using an origin shield reduces the number of requests directly to the S3 bucket by serving cached content from a central location, which reduces latency for users. Option A is wrong because CloudFront automatically uses a global network of edge locations; you cannot manually add more. Option B is wrong because SSL/TLS certificates do not affect latency.

Option D is wrong because S3 Transfer Acceleration improves upload speeds, not download speeds to end users.

314
MCQhard

A company uses AWS CloudFormation to manage infrastructure. They have a stack that creates an S3 bucket and a Lambda function that processes objects uploaded to the bucket. Recently, updates to the Lambda code caused the stack update to fail because the S3 bucket already existed in the account. What is the most efficient way to allow future updates without error?

A.Use AWS CloudFormation resource import to bring the existing bucket into the stack.
B.Set the DeletionPolicy attribute to Retain on the S3 bucket resource in the CloudFormation template.
C.Use a custom resource to check if the bucket exists before creation.
D.Manually delete the S3 bucket before each stack update.
AnswerA

AWS CloudFormation resource import allows you to bring existing resources under the management of a CloudFormation stack. Importing the existing S3 bucket means CloudFormation recognizes it and will not try to create it again during future updates, thus avoiding the 'resource already exists' error.

Why this answer

The stack update failed because the S3 bucket already existed, likely due to it being removed from the template and then added back. By using AWS CloudFormation resource import, you can bring the existing bucket into the stack's management, preventing CloudFormation from attempting to create it again. This resolves the immediate error and allows future updates without conflict.

DeletionPolicy Retain only prevents deletion, not creation conflicts.

315
MCQhard

A company has a legacy monolithic application running on a single EC2 instance. The application stores customer data in an attached EBS volume. The company wants to modernize the application to improve scalability and availability. Which approach should a solutions architect recommend?

A.Use a larger EC2 instance with enhanced networking.
B.Configure multiple EC2 instances to share the same EBS volume using Multi-Attach.
C.Replace the EBS volume with an Aurora RDS database.
D.Refactor the application into microservices running on Amazon ECS with data stored in Amazon S3.
AnswerD

Containers and S3 provide scalability, availability, and stateless design.

Why this answer

Migrating to a containerized, stateless application decouples storage and allows scaling. Option A is wrong because a larger instance still has a single point of failure. Option B is wrong because Multi-Attach EBS volumes have limited support and multiple instances writing to the same volume can cause data corruption.

Option C is wrong because RDS is for databases, not for application data stored in files.

316
Multi-Selecteasy

A company is using Amazon CloudFront to distribute content globally. They want to improve the cache hit ratio. Which TWO actions are most effective? (Choose two.)

Select 2 answers
A.Configure the cache behavior to forward all query strings but cache based on a whitelist.
B.Increase the minimum TTL for objects.
C.Configure custom error responses to serve cached content on errors.
D.Decrease the default TTL for objects.
E.Enable automatic compression for compressible objects.
AnswersA, B

This prevents multiple cache entries for different query string orders.

Why this answer

Forwarding all query strings but caching based on a whitelist prevents cache fragmentation from unnecessary query parameters, improving the cache hit ratio. Option B is correct because increasing the minimum TTL ensures objects remain in the cache for a longer duration, increasing the likelihood of cache hits. Option C is incorrect because custom error responses serve alternative content on errors but do not improve the cache hit ratio.

Option D is incorrect because decreasing the default TTL reduces cache duration, leading to more misses. Option E is incorrect because compression improves transfer speed and reduces bandwidth, not the cache hit ratio.

Exam trap

A common trap is thinking that serving stale or cached content on errors improves cache hit ratio, but it only improves availability. Also, shortening TTL reduces cache hits, not improves.

317
Multi-Selecthard

A company is deploying a new application on AWS and wants to implement a least-privilege IAM policy for an EC2 instance that needs to read from an S3 bucket (my-bucket) and write logs to CloudWatch Logs. Which TWO statements should be included in the IAM policy? (Choose two.)

Select 2 answers
A.{"Effect": "Allow", "Action": ["s3:GetObject"], "Resource": "arn:aws:s3:::my-bucket/*"}
B.{"Effect": "Allow", "Action": ["s3:*"], "Resource": "arn:aws:s3:::my-bucket/*"}
C.{"Effect": "Allow", "Action": ["logs:CreateLogStream", "logs:PutLogEvents"], "Resource": "arn:aws:logs:us-east-1:123456789012:log-group:my-log-group:*"}
D.{"Effect": "Allow", "Action": ["logs:PutLogEvents"], "Resource": "*"}
E.{"Effect": "Allow", "Action": ["s3:PutObject"], "Resource": "arn:aws:s3:::my-bucket/*"}
AnswersA, C

Correct: Grants s3:GetObject on the bucket objects, allowing the EC2 instance to read data from S3 as required.

Why this answer

The correct answers are A and C. Option A grants s3:GetObject on the S3 bucket objects, allowing the EC2 instance to read data from the bucket. Option C grants the necessary permissions to create log streams and put log events to a specific CloudWatch Logs log group, enabling logging.

These two statements adhere to least-privilege by scoping to the exact actions and resources needed. Option E (s3:PutObject) is not required because the stem only specifies reading from S3; including it would violate the least-privilege principle. Options B and D are incorrect because B uses a wildcard action (s3:*) and D uses a wildcard resource, both of which are too broad and not scoped.

Exam trap

The trap is that candidates often include unnecessary permissions (like s3:PutObject) beyond what the stem explicitly requires, failing the least-privilege requirement. Always scope permissions to only the actions and resources stated.

318
MCQhard

A company is using t3.large instances in an Auto Scaling group. They want to launch instances that support both x86_64 and arm64 architectures. Based on the exhibit, can they meet this requirement with t3.large?

A.No, because t3.large instances only support x86_64 architecture.
B.Yes, because t3.large supports both architectures.
C.No, because t3.large is not a current generation instance type.
D.Yes, but only if they use a custom AMI that supports both architectures.
AnswerA

Correct. t3.large instances only support x86_64 architecture, not arm64. Therefore, they cannot meet the requirement of supporting both architectures.

Why this answer

T3.large instances only support the x86_64 architecture. They do not support arm64. Therefore, the company cannot meet the requirement of supporting both x86_64 and arm64 architectures with t3.large instances.

Options B and D are incorrect because t3.large does not support arm64, and a custom AMI cannot add architecture support beyond what the instance type offers. Option C is incorrect because t3.large is a current generation instance type, but that is not relevant to the architecture support limitation.

319
MCQhard

A financial services company runs a critical application on Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. The application uses an Amazon RDS for MySQL database with Multi-AZ deployment. The company has a recovery time objective (RTO) of 15 minutes and a recovery point objective (RPO) of 1 hour for the database. During a recent disaster recovery drill, the solutions architect simulated an Availability Zone failure by terminating all EC2 instances and the primary RDS instance in one AZ. The Auto Scaling group launched new instances in the other AZ, and the RDS Multi-AZ failover completed in about 2 minutes. However, the application remained unavailable for 30 minutes because the new EC2 instances could not connect to the RDS secondary instance. The security groups are configured correctly. The RDS instance is not publicly accessible. What is the MOST likely cause of the connectivity issue?

A.The security group for the EC2 instances does not allow outbound traffic to the RDS instance.
B.The RDS Multi-AZ failover took longer than expected, exceeding the RTO.
C.The RDS endpoint DNS record did not update to point to the new primary.
D.The application is using a hardcoded IP address or an endpoint that points to the old primary RDS instance instead of the RDS DNS name.
AnswerD

The application is likely using a hardcoded IP address or an endpoint pointing to the old primary RDS instance instead of the RDS DNS name, which fails after failover. This is the most likely cause. Option D is correct.

Why this answer

The RDS Multi-AZ failover promotes the standby to primary, changing the underlying IP address. If the application uses a hardcoded IP address or an endpoint that points to the old primary, it will fail to connect after failover. The correct approach is to use the RDS DNS name (CNAME) which automatically resolves to the current primary.

Option A is incorrect because the stem states the security groups are correctly configured. Option B is incorrect because the failover completed in about 2 minutes, which is within normal Multi-AZ failover time (1-2 minutes). Option C is incorrect because the RDS endpoint DNS record updates quickly (within seconds) after a failover.

320
Multi-Selecthard

A company runs a stateful web application on EC2 instances with EBS volumes. They want to improve resilience by distributing the workload across multiple Availability Zones. Which THREE steps should they take?

Select 3 answers
A.Use Amazon EFS for shared storage across AZs.
B.Attach the same EBS volume to instances in different AZs.
C.Place EC2 instances in an Auto Scaling group spanning multiple AZs.
D.Use an Application Load Balancer with targets in multiple AZs.
E.Configure EBS Read Replicas in another AZ.
AnswersA, C, D

EFS is a shared file system accessible from multiple AZs.

Why this answer

Correct answers are A, C, and D. Option A ensures data is available in multiple AZs. Option C distributes instances for high availability.

Option D handles traffic distribution and health checks. Option B is wrong because EBS volumes cannot be attached cross-AZ. Option E is wrong because Read Replicas are for RDS, not EBS.

321
MCQeasy

A company uses AWS CloudFormation to deploy infrastructure. They want to update a stack but need to ensure that a specific resource is not accidentally replaced. Which CloudFormation attribute should they use?

A.DeletionPolicy
B.UpdateReplacePolicy
C.CreationPolicy
D.UpdatePolicy
AnswerB

Correct. UpdateReplacePolicy with 'Retain' prevents replacement by keeping the old resource during an update.

Why this answer

UpdateReplacePolicy. This attribute allows you to specify how CloudFormation handles resource updates that require replacement. You can set it to 'Retain' to keep the old resource and prevent replacement during a stack update.

DeletionPolicy (option A) only controls what happens when a resource is deleted, not during updates that require replacement. CreationPolicy and UpdatePolicy do not address replacement prevention.

Exam trap

Candidates often confuse DeletionPolicy with UpdateReplacePolicy. DeletionPolicy applies when a resource is removed from the template or the stack is deleted, not when an update forces replacement.

322
MCQmedium

A company runs a web application on a single EC2 instance. They want to improve availability and fault tolerance with minimal architectural changes. What should they do?

A.Attach multiple EBS volumes to the instance.
B.Use an Auto Scaling group with a minimum of two instances across two Availability Zones.
C.Create multiple subnets in the same Availability Zone.
D.Upgrade to a larger instance type.
AnswerB

Spreading instances across AZs provides high availability and fault tolerance.

Why this answer

Using an Auto Scaling group with a minimum of two instances across two Availability Zones provides high availability and fault tolerance. If one Availability Zone fails, the other zone continues to serve traffic. Option A is wrong because multiple EBS volumes do not protect against instance or AZ failure.

Option C is wrong because multiple subnets in the same Availability Zone still share the same failure domain. Option D is wrong because a larger instance type does not add redundancy.

323
MCQhard

A company runs a stateful application on EC2 instances in an Auto Scaling group behind an ALB. They want to perform a rolling update without losing session state. Which solution is most appropriate?

A.Enable sticky sessions (session affinity) on the ALB and perform a rolling update.
B.Use a blue/green deployment with a new Auto Scaling group.
C.Scale out the Auto Scaling group, then scale in the old instances.
D.Terminate instances one by one and let Auto Scaling replace them.
AnswerA

Sticky sessions keep users on the same instance during transition.

Why this answer

Enabling sticky sessions (session affinity) on the ALB ensures that requests from a user are consistently routed to the same instance during the rolling update, preserving session state. Option B (blue/green deployment) would require external session state management or state replication. Option C (scale out then scale in) may route new requests to instances lacking state, and Option D (terminate instances one by one) loses the state when the instance is terminated.

324
MCQmedium

A company is using AWS Lambda functions to process data from an SQS queue. The Lambda function sometimes fails due to transient errors, but the messages are not being retried. Which configuration should the company check to ensure proper retry behavior?

A.Configure the Lambda function's dead-letter queue (DLQ)
B.Adjust the Maximum retries setting in the Lambda event source mapping
C.Set the SQS queue's redrive policy maxReceiveCount to a higher value
D.Increase the SQS queue's Default visibility timeout
AnswerB

This setting directly controls how many times Lambda retries failed messages from SQS.

Why this answer

The correct setting is the 'Maximum retries' in the Lambda event source mapping for SQS. This parameter controls how many times Lambda will retry a failed message batch (default is 3). Option A is incorrect because the dead-letter queue (DLQ) is used to store messages that have failed after all retries are exhausted, not to control the number of retries.

Option C is incorrect because the SQS queue's redrive policy 'maxReceiveCount' is used for SQS redrive to a DLQ, not for Lambda retries. Option D is incorrect because the SQS queue's Default visibility timeout determines how long a message is hidden after being received, but does not affect the retry count for Lambda processing.

325
MCQhard

A company runs a containerized microservices application on Amazon ECS with Fargate launch type. The application experiences intermittent latency spikes. The team wants to capture network traffic between containers for troubleshooting. Which solution should they implement?

A.Enable AWS X-Ray tracing on the ECS tasks.
B.Configure the awslogs driver to send container logs to CloudWatch Logs.
C.Use Amazon ECS Exec to access containers and run tcpdump.
D.Enable VPC Flow Logs on the ENIs attached to the ECS tasks.
AnswerD

Flow Logs capture IP traffic metadata.

Why this answer

Using Amazon ECS task networking with VPC and enabling VPC Flow Logs captures network traffic metadata. Option A is wrong because AWS X-Ray captures application-level traces, not network packets. Option B is wrong because CloudWatch Logs agent captures logs, not network traffic.

Option C is wrong because ECS Exec allows shell access but not traffic capture.

326
Multi-Selectmedium

A company has a stateful web application running on Amazon EC2 instances. They want to implement blue/green deployments to reduce downtime. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Migrate session state to Amazon ElastiCache or DynamoDB.
B.Use an Elastic Load Balancer (ELB) to manage the blue and green environments.
C.Use Amazon Route 53 weighted routing policies to shift traffic gradually.
D.Set a high TTL on the DNS record to prevent caching issues.
E.Immediately deregister the blue instances from the load balancer after deployment.
AnswersA, C

Decoupling session state from instances enables seamless blue/green.

Why this answer

For blue/green deployments with stateful applications, migrating session state to a durable store like ElastiCache or DynamoDB (Option A) ensures continuity across environments. Using Route 53 weighted routing (Option C) allows gradual traffic shifting to the green environment, minimizing downtime. Option B is incorrect because ELB itself does not manage blue/green deployments natively; it is used within the architecture but not the primary action.

Option D is incorrect because a high TTL on DNS records would delay traffic switching. Option E is incorrect because deregistering instances immediately would cause disruption; proper testing should occur first.

327
MCQhard

A company has a monolithic application running on a single Amazon RDS for MySQL DB instance. The application is experiencing performance issues due to heavy read traffic. The company wants to implement a solution that offloads read traffic with minimal application changes. What should a solutions architect do?

A.Create a read replica of the RDS instance and modify the application connection string to use the reader endpoint.
B.Migrate the application to use Amazon DynamoDB with global tables.
C.Use Amazon RDS Multi-AZ with a standby instance for read traffic.
D.Implement Amazon ElastiCache in front of the database to cache read queries.
AnswerA

Read replicas offload read traffic and the reader endpoint distributes reads.

Why this answer

Creating a read replica of the RDS for MySQL DB instance and modifying the application connection string to use the reader endpoint offloads read traffic from the primary instance with minimal application changes. The reader endpoint automatically distributes connections across all read replicas, reducing the load on the primary instance without requiring code changes beyond updating the connection string.

Exam trap

The trap here is that candidates often confuse Multi-AZ standby instances with read replicas, not realizing that Multi-AZ standby instances are strictly for high availability and cannot serve read traffic, while read replicas are specifically designed to offload read workloads.

How to eliminate wrong answers

Option B is wrong because migrating to Amazon DynamoDB with global tables would require significant application changes to adapt from a relational to a NoSQL data model, which contradicts the requirement for minimal application changes. Option C is wrong because Amazon RDS Multi-AZ with a standby instance does not support read traffic; the standby instance is only for failover and cannot serve read requests. Option D is wrong because implementing Amazon ElastiCache would require application code changes to implement caching logic, which does not meet the minimal application changes requirement.

328
Multi-Selectmedium

A company uses AWS Control Tower to manage a multi-account environment. The security team wants to ensure that all accounts conform to a set of baseline rules, including encryption at rest for S3 buckets. Which THREE steps should the team take to implement this control? (Choose THREE.)

Select 3 answers
A.Set up an automatic remediation action using AWS Config to enable encryption on non-compliant buckets.
B.Attach an IAM policy to each account's root user.
C.Create a Service Control Policy (SCP) that denies creating S3 buckets without encryption.
D.Define an AWS Config rule to check that S3 buckets have encryption enabled.
E.Enable AWS CloudTrail to log all S3 API calls.
AnswersA, C, D

Remediation can auto-fix violations detected by Config rules.

Why this answer

AWS Config can be configured with automatic remediation actions (e.g., using AWS Systems Manager Automation) to enable encryption on S3 buckets that are found non-compliant. Option C is correct because a Service Control Policy (SCP) can be applied to organizational units (OUs) in AWS Control Tower to deny the creation of S3 buckets without encryption, providing preventive governance. Option D is correct because an AWS Config rule can be defined to evaluate whether S3 buckets have encryption enabled, alerting on non-compliance.

Option B is incorrect because IAM policies attached to the root user are not effective for enforcing baseline rules across multiple accounts; SCPs are designed for that purpose. Option E is incorrect because AWS CloudTrail only logs API calls for auditing and does not enforce or remediate compliance; it is not a control mechanism for ensuring encryption at rest.

329
Multi-Selectmedium

A company uses AWS CloudFormation to manage infrastructure. A recent update to a stack failed, and the stack is now in a ROLLBACK_COMPLETE state. The team needs to investigate the cause and then redeploy the update. Which TWO actions should the team take? (Choose two.)

Select 2 answers
A.View the stack events in the CloudFormation console.
B.Review the previous stack template version.
C.Create a ChangeSet to review the proposed changes before applying.
D.Use AWS CloudFormation StackSets to redeploy across accounts.
E.Execute a rollback to continue the rollback process.
AnswersA, C

Stack events provide error messages that indicate the cause of failure.

Why this answer

After a stack update fails and reaches ROLLBACK_COMPLETE, the team should view stack events (Option A) to see detailed error messages for each resource, which helps identify the cause. Then, before redeploying, they should create a ChangeSet (Option C) to review the proposed changes and ensure they are correct. Option B is not directly helpful because the previous template version is already known.

Option D, StackSets, is for managing stacks across multiple accounts, not for debugging a single stack. Option E is incorrect because executing a rollback is unnecessary when the stack has already completed rollback.

330
MCQmedium

A company runs a containerized application on Amazon ECS with Fargate. The application uses an Application Load Balancer (ALB) to distribute traffic. The company has configured a target tracking scaling policy based on average memory utilization. During a traffic spike, the ECS service scales out, but the new tasks are immediately deregistered and replaced. The CloudWatch logs show that the new tasks are failing the ALB health check. The health check is configured to ping the '/health' endpoint on the container. The solutions architect verifies that the application container correctly responds to the '/health' endpoint with a 200 status code. What is the MOST likely cause of the health check failures?

A.The ALB is not configured with a proper listener rule to forward traffic to the target group.
B.The security group attached to the ECS tasks does not allow inbound traffic from the ALB on the health check port.
C.The deregistration delay (connection draining) is set too high, causing the ALB to think the tasks are unhealthy.
D.The health check path is incorrect; it should be '/index.html' instead of '/health'.
AnswerB

Without inbound rules allowing traffic from the ALB, health checks will fail.

Why this answer

Since the application container correctly responds to the '/health' endpoint with a 200 status code, the health check failures are likely due to network connectivity. For Fargate tasks, each task gets an ENI, and the security group attached to the tasks must allow inbound traffic from the ALB on the health check port. If this rule is missing, the ALB cannot reach the health check endpoint, causing tasks to be deregistered.

Option A is incorrect because the ALB listener rule is for routing traffic, not health checks. Option C is incorrect because a high deregistration delay would cause slow draining, not immediate health check failures. Option D is incorrect because the health check path is confirmed correct by the architect.

331
MCQhard

A company uses Amazon RDS for MySQL with Multi-AZ deployment. During a recent failover, the application experienced a 5-minute downtime. The application uses a connection pool with a 30-second connection timeout. The RDS DNS name is used as the endpoint. What is the MOST likely cause of the downtime?

A.The DNS TTL for the RDS endpoint is set too high
B.The connection pool timeout is too short to allow failover
C.The Multi-AZ failover took longer than expected
D.The application is using the wrong endpoint after failover
AnswerA

High DNS TTL causes clients to cache the old IP, leading to connection failures until cache expires.

Why this answer

During an RDS Multi-AZ failover, the DNS name remains the same but the underlying IP address changes. If the DNS TTL is set too high (default is 60 seconds but can be configured higher), clients may continue to use the old cached IP address for the duration of the TTL, leading to connection failures until the cache expires. This explains the 5-minute downtime, as the application's connection pool with a 30-second timeout cannot recover until the DNS record is refreshed.

Option B is incorrect because the 30-second timeout is sufficient to wait for failover, but the issue is DNS propagation, not timeout duration. Option C is incorrect because Multi-AZ failover typically completes within 1-2 minutes, not 5 minutes. Option D is incorrect because the endpoint (DNS name) does not change after failover; only the IP changes.

332
MCQhard

A company runs a containerized application on Amazon ECS using Fargate. The application experiences intermittent high latency during peak hours. The operations team suspects that the task placement strategy is causing resource contention. The cluster uses the default binpack strategy. What should the team do to improve performance?

A.Increase the memory and CPU for each task definition to reduce contention.
B.Increase the number of tasks to distribute the load evenly.
C.Change the task placement strategy to spread across Availability Zones.
D.Use a launch type of EC2 with GPU instances to handle the load.
AnswerC

Spread strategy distributes tasks, reducing resource contention.

Why this answer

Changing the task placement strategy to spread distributes tasks across Availability Zones, reducing resource contention and improving latency. Option A is wrong because increasing memory and CPU does not address placement-related contention. Option B is wrong because increasing the number of tasks with the default binpack strategy may worsen contention by packing tasks more densely.

Option D is wrong because using EC2 with GPU instances does not solve placement issues and introduces unnecessary complexity.

333
MCQmedium

An IAM policy condition allows launching EC2 instances only if the instance type is t2.micro or t2.small. A developer tries to launch a t2.medium instance. What happens?

A.The launch is denied only if the user does not have a separate policy allowing t2.medium.
B.The launch succeeds because the condition only allows, not denies.
C.The launch succeeds if the user has an additional Allow for t2.medium.
D.The launch is denied because t2.medium is not in the allowed list.
AnswerD

Only allowed types are permitted.

Why this answer

The IAM policy condition explicitly allows only t2.micro and t2.small. When the developer tries to launch a t2.medium instance, the condition restricts the allowed types, so the launch is denied. Option D is correct because t2.medium is not in the allowed list.

Option A is incorrect because the condition is explicit and no additional policy can override a deny from the condition. Option B is incorrect because the condition applies to both allow and deny. Option C is incorrect because even with an additional Allow for t2.medium, the condition would still deny it unless the condition is modified.

334
MCQmedium

A CloudFormation stack deployment failed with the status ROLLBACK_COMPLETE. What is the most likely cause?

A.The stack was created in the wrong AWS region.
B.The EC2 instance type is not available in the region.
C.The IAM role used by CloudFormation does not have permission to create EC2 instances.
D.The CloudFormation template has a syntax error.
AnswerC

Insufficient permissions cause resource creation to fail, leading to rollback.

Why this answer

A stack status of ROLLBACK_COMPLETE indicates that CloudFormation successfully initiated resource creation but one or more resources failed, triggering a rollback. The most common cause is that the IAM role associated with the stack lacks permissions to create the required resources (e.g., EC2 instances). A template syntax error would cause a validation error before any resource creation begins, resulting in a status like CREATE_FAILED without a rollback.

Wrong region selection would not cause a rollback after resources start being created; the stack would either succeed or fail due to availability issues. Option C is correct because insufficient IAM permissions are a frequent cause of resource creation failures leading to rollback.

335
MCQeasy

A company deploys the above CloudFormation template. After creation, they upload a file to the bucket and then delete it. What happens to the deleted object after 30 days?

A.All versions of the object are permanently deleted.
B.The delete marker is removed, and the object becomes current again.
C.The object is permanently deleted along with the delete marker.
D.The previous version is permanently deleted, but the delete marker remains.
AnswerD

Noncurrent version expires.

Why this answer

The lifecycle rule expires noncurrent versions after 30 days. Deleting the object creates a delete marker (current version) and the previous version becomes noncurrent. After 30 days, the noncurrent version is permanently deleted, but the delete marker remains.

Option A is wrong because the delete marker is not permanently deleted. Option B is wrong because the delete marker is not removed and the object does not become current again. Option C is wrong because only the noncurrent version is permanently deleted, not the delete marker.

336
MCQhard

A financial services company has a multi-account AWS Organization with hundreds of accounts. The security team needs to ensure that all S3 buckets across the organization are encrypted at rest and that no public read access is allowed. They want a solution that automatically remediates non-compliant buckets in real time. What is the MOST scalable and operationally efficient approach?

A.Use Service Control Policies to deny PutBucketPolicy that allows public access and require encryption
B.Use AWS Config conformance packs with remediation actions through AWS Systems Manager Automation
C.Use Amazon CloudWatch Events to detect bucket creation and trigger a Lambda function to apply encryption
D.Use AWS Config rules and AWS Lambda functions to scan buckets daily and send alerts
AnswerB

Provides continuous compliance and automatic remediation across the organization.

Why this answer

AWS Config conformance packs with remediation via Systems Manager Automation can be deployed across all accounts in an AWS Organization. This allows automatic detection and remediation of non-compliant S3 buckets (e.g., lacking encryption or having public read access) in near real-time, providing a scalable and operationally efficient solution without custom code. Option A (SCPs) can prevent public access policies but cannot enforce encryption on existing buckets.

Option C (CloudWatch Events) requires per-account setup and custom Lambda functions, and does not cover bucket modifications. Option D (daily Lambda scans) is not real-time and does not provide automatic remediation.

337
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. Recently, the application has been experiencing intermittent latency spikes. CloudWatch metrics show high CPU utilization on the instances during these spikes, but no corresponding increase in request count. Which action is MOST likely to identify the root cause?

A.Increase the instance size to handle the load.
B.Enable detailed monitoring on the EC2 instances.
C.Add a scaling policy based on CPU utilization.
D.Enable AWS CloudTrail to log EC2 API calls.
AnswerB

Detailed monitoring provides metrics at 1-minute granularity, helping to identify when spikes occur.

Why this answer

Enabling detailed monitoring on EC2 instances provides CloudWatch metrics at a 1-minute granularity, which is crucial for identifying the exact timing and duration of CPU spikes. The intermittent nature of the latency spikes and the lack of correlation with request count suggest that the root cause may be a specific process or internal instance activity. Detailed monitoring allows for more precise analysis of CPU usage patterns, helping to isolate the cause.

Option A is incorrect because increasing instance size only masks the symptom without addressing the underlying issue. Option C is incorrect because scaling policies respond to sustained high CPU utilization, not intermittent spikes, and would not help identify the root cause. Option D is incorrect because CloudTrail logs API calls and does not provide instance-level metric data needed to diagnose CPU spikes.

338
MCQhard

A media company runs a video processing pipeline on AWS. The pipeline uses AWS Step Functions to orchestrate multiple AWS Lambda functions. The first Lambda function downloads a video file from an S3 bucket, the second transcodes it using AWS Elemental MediaConvert, and the third uploads the transcoded files to a different S3 bucket. Recently, the pipeline has been failing intermittently with 'State machine execution timed out' errors. The Step Functions execution history shows that the first Lambda function takes up to 25 minutes to complete for large video files. The Step Functions state machine has a default execution timeout of 5 minutes. The company wants to fix the timeout issue without redesigning the entire pipeline. Which solution should the solutions architect recommend?

A.Increase the 'timeoutSeconds' value in the Step Functions state machine definition to 1800 (30 minutes) or more.
B.Increase the Lambda function timeout to 30 minutes in the Lambda configuration.
C.Increase the Lambda function timeout to 15 minutes and increase the state machine execution timeout to 30 minutes.
D.Replace the Lambda function with an Amazon SQS queue and have the Step Functions wait for a callback.
AnswerD

Replacing the Lambda function with an SQS queue and using a callback pattern allows the long-running download task to be processed asynchronously by a worker that can run for more than 15 minutes, without redesigning the entire pipeline. Step Functions waits for the callback, avoiding both the Lambda timeout and the state machine execution timeout.

Why this answer

The Lambda function has a maximum timeout of 15 minutes, so increasing the state machine timeout alone (Option A) does not solve the Lambda function's inability to run for 25 minutes. Replacing the Lambda with an SQS queue allows the long-running task to be processed asynchronously, with Step Functions waiting for a callback, avoiding the Lambda timeout limit and the state machine timeout error. Options B and C are invalid because Lambda cannot be configured beyond 15 minutes: setting it to 30 or 15 minutes still fails for a 25-minute task.

Option D changes only the problematic component, meeting the requirement to fix the issue without redesigning the entire pipeline.

Exam trap

Candidates often forget that Lambda has a hard timeout of 15 minutes. Simply increasing the state machine timeout does not fix the underlying Lambda timeout.

339
MCQhard

A security engineer runs the above command to list network interfaces attached to security group sg-12345678. The engineer notices that instance i-0a1b2c3d4e5f67890 has two network interfaces but only one is shown in the output. What is the MOST likely reason?

A.The second interface is not attached to the instance.
B.The second interface has a device index of 0.
C.The command only returns interfaces that are attached.
D.The second interface is associated with a different security group.
AnswerD

Filter limits to sg-12345678.

Why this answer

The command filters by security group ID, so only interfaces in that group are shown. The second interface may belong to a different security group. Option A is wrong because the filter is by group-id, not instance-id.

Option B is wrong because the command does not filter by device index. Option C is wrong because the command can list all interfaces in the group regardless of attachment.

340
MCQeasy

A company is migrating a monolithic application to microservices on AWS. They want to implement a continuous improvement process for existing services. Which AWS service should they use to collect and analyze operational metrics and logs from all microservices in a centralized location?

A.AWS Config
B.Amazon Inspector
C.Amazon CloudWatch
D.AWS X-Ray
AnswerC

CloudWatch provides centralized metrics and logs.

Why this answer

Amazon CloudWatch provides centralized monitoring of metrics and logs from all microservices. Option A is wrong because AWS Config tracks configuration changes and compliance, not operational metrics. Option B is wrong because Amazon Inspector performs automated security assessments, not log/metrics collection.

Option D is wrong because AWS X-Ray is used for tracing requests across services, not for centralized log and metric analysis.

341
MCQeasy

Refer to the exhibit. A company has an Amazon ECS task definition with two containers. The 'web' container is essential, and the 'sidecar' container is not. The 'sidecar' container exits unexpectedly. What will happen to the task?

A.The sidecar container will be marked as essential.
B.ECS will automatically restart the sidecar container.
C.The task continues running as normal.
D.The ECS task will be stopped.
AnswerC

Non-essential container failure does not affect the task.

Why this answer

Non-essential containers can fail without affecting the task. Option A is wrong because only essential container failure stops the task. Option B is wrong because ECS will not restart a non-essential container by default; it depends on the task definition restart policy.

Option D is wrong because the sidecar's CPU=0 means it can use up to the available CPU, but it still runs.

342
MCQhard

A company uses AWS Lambda with a VPC configuration to access an RDS database. After a recent change, the Lambda function times out when connecting to the database. The security group and network ACLs appear correct. What should the company check first?

A.That the database password has not been rotated.
B.That the Lambda function's reserved concurrency is not set to zero.
C.That the Lambda function has a route to the database via a NAT gateway or VPC endpoint.
D.That the Lambda function's environment variables are correctly set.
AnswerC

If the database is in a private subnet, a NAT gateway is needed for the Lambda function to access it.

Why this answer

When a Lambda function is configured with VPC access, it can communicate with RDS instances within the same VPC (or peered VPCs) using private IP addresses, assuming proper security group and network ACL rules. The most likely cause of a timeout after a change is a missing route in the Lambda function's subnet's route table to the RDS subnet. NAT gateways are only required for internet access, and VPC endpoints are for AWS services (not RDS).

Therefore, the administrator should first verify that the Lambda function's subnet has a route to the database's subnet. No password rotation, concurrency, or environment variable issue would cause a network timeout.

343
MCQhard

A solutions architect sees the above CloudWatch metric data for a Lambda function. The function is triggered by an SQS queue. The errors occur in a pattern: exactly 5 errors at 00:10, 00:30, and 00:50. What is the MOST likely cause?

A.The Lambda function is running out of memory.
B.The Lambda function is timing out due to long-running processing, and the SQS visibility timeout is set to 20 minutes, causing the same messages to be retried.
C.The Lambda function is hitting the reserved concurrency limit.
D.The Lambda function is using an incompatible runtime.
AnswerB

The pattern matches a timeout and retry cycle.

Why this answer

The pattern of errors occurring exactly at 00:10, 00:30, and 00:50 (20-minute intervals) indicates that the Lambda function is timing out after processing for a long duration, and the SQS visibility timeout is set to 20 minutes. When the function times out, the message becomes visible again in the queue after the visibility timeout, leading to a retry. This results in errors at regular intervals.

Option A is incorrect because memory exhaustion would cause out-of-memory errors, not timeouts. Option C is incorrect because hitting reserved concurrency would cause throttles (e.g., 429 errors), not function errors. Option D is incorrect because an incompatible runtime would cause all invocations to fail immediately, not in a pattern.

344
MCQmedium

A company has a production Amazon ECS service running on Fargate. The service needs to be updated to use a new task definition with different environment variables. The company wants to perform a rolling update with minimal impact. What is the correct way to update the service?

A.Delete the existing service and recreate it with the new task definition.
B.Modify the task definition and then restart the service.
C.Update the service with the new task definition and use a rolling update deployment controller.
D.Create a new service with the new task definition and delete the old one.
AnswerC

Rolling update replaces tasks gradually.

Why this answer

Updating the ECS service with the new task definition while using the rolling update deployment controller performs a rolling update with minimal downtime. Option A is wrong because deleting and recreating the service causes downtime. Option B is wrong because modifying the task definition alone does not trigger a deployment; you must update the service to use the new revision.

Option D is wrong because creating a new service duplicates resources and is unnecessary.

345
MCQeasy

A company uses AWS CloudFormation to deploy infrastructure. The operations team wants to automatically roll back a stack update if it fails, and receive a notification. What should be configured to meet these requirements?

A.Use AWS CloudTrail to monitor the UpdateStack API call and trigger a rollback via a Lambda function.
B.Use AWS Config rules to detect stack failure and revert changes.
C.Enable rollback on failure in the CloudFormation stack and configure an SNS notification topic.
D.Create a custom resource in the CloudFormation template that performs rollback.
AnswerC

CloudFormation can automatically roll back on failure and send SNS notifications.

Why this answer

CloudFormation natively supports automatic rollback on stack update failure via the 'Rollback on failure' setting. By configuring an SNS notification topic on the stack, the operations team receives alerts when a rollback occurs, meeting both requirements without additional custom logic.

Exam trap

The trap here is that candidates may overcomplicate the solution by adding unnecessary services like Lambda or Config, overlooking CloudFormation's native rollback and notification capabilities that directly satisfy the requirements.

How to eliminate wrong answers

Option A is wrong because AWS CloudTrail logs API calls but does not trigger actions directly; invoking a Lambda function from CloudTrail would require additional Amazon EventBridge rules and custom rollback logic, which is unnecessary when CloudFormation provides built-in rollback. Option B is wrong because AWS Config rules evaluate resource compliance against desired configurations and cannot detect stack update failures or revert changes; they are designed for continuous compliance, not stack lifecycle management. Option D is wrong because a custom resource in a CloudFormation template runs during stack operations but cannot perform a rollback of the entire stack; rollback is a stack-level operation controlled by CloudFormation, not by individual resources.

346
Multi-Selectmedium

A company uses AWS CodeBuild to compile and test code. The build process takes a long time because dependencies are downloaded from the internet each time. The company wants to speed up the build process. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Use AWS CodeArtifact to store and retrieve dependencies
B.Use a custom Docker image in CodeBuild that includes the dependencies
C.Use local build agents to run builds in parallel
D.Increase the compute type of the build environment
E.Enable the cache feature in CodeBuild to store dependencies in Amazon S3
AnswersB, E

Pre-installed dependencies eliminate download time.

Why this answer

Reduces build time by using a custom Docker image that pre-installs dependencies, avoiding repeated downloads. Option E caches dependency files in Amazon S3 so subsequent builds reuse them instead of downloading again. Option A (CodeArtifact) manages package storage but does not inherently speed up the initial build; it still requires downloading from CodeArtifact.

Option D (increasing compute) may help but does not address the root cause of repeated downloads. Option C (parallel builds) adds complexity without solving the dependency download issue.

347
Multi-Selectmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application uses a custom header for authentication. The security team wants to ensure that requests are only accepted from authenticated users. Which TWO actions should the team take?

Select 2 answers
A.Place an Amazon CloudFront distribution in front of the ALB and use signed URLs.
B.Configure the ALB to forward the custom header to the target group and validate it on the application.
C.Use AWS WAF to create a rule that inspects the custom header and blocks requests without it.
D.Use Amazon Cognito to authenticate users and pass the header.
E.Configure the ALB's security group to allow traffic only from known IP addresses.
AnswersB, C

The application can validate the header if forwarded by ALB.

Why this answer

Options B and C are correct. AWS WAF can inspect the custom header and block requests without it (Option C), and the ALB can forward the custom header to the target group where the application can validate it (Option B). Option A is incorrect because using CloudFront with signed URLs would add an extra layer but does not directly validate the custom header.

Option D is incorrect because Amazon Cognito is used for authentication and user management, not for custom header validation. Option E is incorrect because security groups operate at the network layer and cannot inspect application headers.

348
MCQeasy

A company runs a batch processing job on a schedule using AWS Lambda. The job processes files from an S3 bucket and writes results to another S3 bucket. Recently, the job has been failing with the error 'Access Denied' when trying to write to the destination bucket. The Lambda function's execution role has the following IAM policy attached: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::source-bucket/*", "arn:aws:s3:::source-bucket" ] }, { "Effect": "Allow", "Action": [ "s3:PutObject" ], "Resource": "arn:aws:s3:::destination-bucket/*" } ] } The Lambda function also has a VPC configuration to access an RDS instance. The S3 buckets are in the same region. The Solutions Architect verified that the destination bucket policy does not deny access. What is the MOST likely cause of the 'Access Denied' error?

A.The Lambda function is in a VPC without an S3 VPC endpoint, so it cannot reach S3.
B.The Lambda function does not have permissions to read from the source bucket.
C.The IAM policy does not allow s3:PutObject on the destination bucket.
D.The destination bucket policy denies the Lambda function's access.
AnswerA

Lambda in a VPC requires a VPC endpoint for S3 to access S3 APIs; without it, calls fail.

Why this answer

The Lambda function is attached to a VPC and does not have an S3 VPC endpoint. When a Lambda function is configured to access a VPC, it loses public internet connectivity unless a NAT gateway or VPC endpoints are provided. Without an S3 VPC endpoint (gateway type) in the VPC, the function cannot reach the S3 API, causing PutObject calls to fail with 'Access Denied' (even though the IAM policy allows it).

Option B is incorrect because the IAM policy allows s3:GetObject and s3:ListBucket on the source bucket, and the error is on write to the destination bucket. Option C is incorrect because the IAM policy explicitly allows s3:PutObject on the destination bucket. Option D is incorrect because the destination bucket policy does not deny access, as stated in the question.

349
MCQhard

A company runs a critical application on Amazon EC2 instances in an Auto Scaling group. The application uses a custom health check that reports instance health to Amazon CloudWatch. The Auto Scaling group is configured with an EC2 health check type. Recently, the company noticed that instances failing the custom health check are not being terminated and replaced. What should the solutions architect do to ensure that instances failing the custom health check are automatically replaced?

A.Manually terminate the unhealthy instances from the EC2 console.
B.Configure the Auto Scaling group to use instance metadata to report health.
C.Create a CloudWatch alarm based on the custom health check metric and configure the alarm to terminate the instance.
D.Change the Auto Scaling group health check type to ELB and ensure the custom health check is integrated with the ELB target group.
AnswerD

ELB health checks can be customized via the target group, and Auto Scaling will replace instances that fail ELB health checks.

Why this answer

Auto Scaling only uses EC2 status checks (system/reachability) by default. To use a custom health check, you must configure the Auto Scaling group to use ELB health checks and integrate the custom health check with the ELB target group, so that instances failing the custom check are marked unhealthy by the ELB and automatically replaced. Option A is wrong because manually terminating instances is not automated and defeats the purpose of Auto Scaling.

Option B is wrong because instance metadata cannot be used to report custom health to Auto Scaling; it only provides instance metadata, not health information. Option C is wrong because a CloudWatch alarm alone cannot terminate instances; you would need a lifecycle hook or EventBridge to act on the alarm.

350
Multi-Selecteasy

A company is using Amazon RDS for PostgreSQL with Multi-AZ deployment. The database experiences high write latency during peak hours. The solutions architect suggests using an RDS read replica to offload read traffic. Which THREE steps are necessary to implement this solution?

Select 3 answers
A.Ensure the read replica is in the same Availability Zone as the primary.
B.Create a read replica from the source DB instance.
C.Modify the application to send read-only queries to the read replica endpoint.
D.Enable Multi-AZ on the read replica.
E.Configure the read replica to be in a different Availability Zone for high availability.
AnswersB, C, E

A read replica is needed to offload read traffic.

Why this answer

To implement the solution of offloading read traffic using an RDS read replica, three steps are necessary. First, create a read replica from the source DB instance (option B), which provides a separate read-only copy of the database. Second, modify the application to send read-only queries to the read replica endpoint (option C); otherwise, the replica won't be utilized.

Third, configure the read replica to be in a different Availability Zone for high availability (option E). While not strictly required for basic read offloading, this step enhances fault tolerance and is considered a necessary part of the solution to ensure high availability of the read replica. Option A is incorrect because placing the read replica in the same AZ does not provide high availability and is not a necessary step.

Option D is incorrect because Multi-AZ is a feature for the primary instance, not for read replicas, and enabling it on a read replica is not supported.

351
MCQhard

A company is using Amazon S3 to store sensitive documents. The security team requires that all objects be encrypted at rest using a customer-managed key (CMK) stored in AWS KMS. Additionally, the CMK must be rotated automatically every year. How should the company configure this?

A.Use S3 default encryption with SSE-KMS and create a new CMK every year.
B.Use S3 bucket policies to enforce encryption and use KMS manual key rotation.
C.Use S3 default encryption with SSE-KMS and enable automatic key rotation on the CMK.
D.Use S3 default encryption with SSE-S3 and enable KMS automatic key rotation.
AnswerC

This ensures all objects are encrypted with the CMK and the key is rotated annually.

Why this answer

Enable S3 default encryption with SSE-KMS and configure automatic key rotation on the CMK. This meets both requirements.

352
MCQhard

A security engineer runs the command above and finds an ENI attached to a Lambda function. The security group sg-12345678 allows inbound traffic on port 443 from 0.0.0.0/0. The Lambda function is used to process API requests. The engineer is concerned about security. What should the engineer do?

A.Modify the Lambda function to not use a VPC.
B.Add a deny rule for inbound 0.0.0.0/0 and allow only from the Lambda function's own IP.
C.Remove the VPC attachment from the Lambda function and use a VPC endpoint.
D.Restrict the security group source to the API Gateway's VPC endpoint or the ALB security group.
AnswerD

Limits inbound traffic to only the expected source.

Why this answer

The Lambda function should not be directly accessible from the internet. The security group sg-12345678 currently allows inbound traffic on port 443 from 0.0.0.0/0, which exposes the function to unnecessary risk. The function is intended to process API requests, typically invoked via API Gateway or an ALB.

Therefore, the security group should restrict inbound traffic to only the source from the API Gateway's VPC endpoint or the ALB's security group. Option A is incorrect because the Lambda function might need to be in a VPC to access internal resources, and removing VPC attachment is not the best security measure. Option B is incorrect because Lambda functions do not have their own static IP; the ENI's IP is dynamic and cannot be used as a source restriction.

More importantly, the source should be the API Gateway, not the Lambda function itself. Option C is incorrect because while using a VPC endpoint is beneficial, simply removing the VPC attachment does not solve the security group issue; the function may still need VPC access. The most direct fix is to modify the security group rule.

353
MCQeasy

A company uses Amazon S3 to store critical data. The company wants to ensure that data is protected against accidental deletion and that deleted objects can be recovered within 30 days. Which S3 feature should the company enable?

A.S3 Versioning
B.S3 Server Access Logging
C.S3 Object Lock in governance mode
D.S3 Intelligent-Tiering
AnswerA

Preserves all versions, allowing recovery of deleted objects.

Why this answer

(S3 Versioning) is correct because when enabled, it retains all versions of objects, allowing recovery of deleted or overwritten objects within a specified retention period. Combined with a lifecycle policy to expire old versions after 30 days, it meets the requirement. Option B (S3 Server Access Logging) is used for auditing access, not for data recovery.

Option C (S3 Object Lock in governance mode) prevents object deletion or overwrites by enforcing retention settings, but it is designed for compliance and does not inherently allow recovery of already deleted objects unless combined with versioning. Option D (S3 Intelligent-Tiering) optimizes storage costs based on access patterns, not for data protection or recovery.

354
Multi-Selecthard

A company is using Amazon API Gateway with a Lambda authorizer to authenticate requests. The Lambda authorizer function times out frequently during peak traffic. The company wants to improve authorization performance without changing the authentication logic. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Enable caching of authorization responses in API Gateway.
B.Use AWS WAF to block suspicious requests.
C.Increase the Lambda function timeout.
D.Increase the Lambda reserved concurrency.
E.Enable request validation in API Gateway.
AnswersA, C

Caching reduces Lambda invocations for repeated requests.

Why this answer

(enabling caching of authorization responses) is correct because it caches the authorizer's response for a specified time, reducing the number of Lambda invocations during peak traffic and improving performance without changing authentication logic. Option C (increasing the Lambda function timeout) is correct because if the authorizer times out during peak traffic, increasing the timeout gives it more time to complete. Option B (using AWS WAF) is incorrect because WAF blocks suspicious requests at the web application layer, but does not improve the performance of the Lambda authorizer.

Option D (increasing Lambda reserved concurrency) is incorrect because the issue is timeouts, not concurrency limits; reserved concurrency ensures capacity but does not prevent timeouts. Option E (enabling request validation in API Gateway) is incorrect because request validation checks request structure before reaching the authorizer, but does not affect authorizer performance.

355
MCQeasy

A solutions architect notices that an Auto Scaling group's instances are continuously being terminated and replaced. CloudWatch logs show that health checks are failing due to high memory usage. The instances run a memory-intensive application. What should the architect do to improve stability?

A.Change the instance type to a memory-optimized family like R5.
B.Use a scheduled scaling policy to add instances during peak hours.
C.Increase the minimum number of instances in the Auto Scaling group.
D.Create a CloudWatch alarm for memory utilization and attach it to a scaling policy.
AnswerD

Memory alarm triggers scaling before health check failures.

Why this answer

Creating a CloudWatch alarm for memory utilization and attaching it to a scaling policy allows the Auto Scaling group to dynamically add instances when memory usage is high, preventing health check failures. Option A is incorrect because switching to memory-optimized instances may help but does not provide automatic scaling based on memory pressure. Option B is incorrect because scheduled scaling is for predictable traffic patterns, not for responding to real-time memory usage.

Option C is incorrect because increasing the minimum number of instances does not address the root cause; it only adds more instances but does not adapt to varying memory demand.

356
MCQmedium

A company runs a critical application on Amazon RDS for PostgreSQL. The database experiences high read traffic. The application is read-heavy and can tolerate eventual consistency for some queries. What is the MOST effective way to improve read performance without significant architectural changes?

A.Enable Multi-AZ deployment for failover.
B.Create one or more Read Replicas in the same region.
C.Use Amazon ElastiCache to cache frequent queries.
D.Upgrade to a larger instance type.
AnswerB

Read Replicas handle read queries, reducing load on primary.

Why this answer

Creating Read Replicas offloads read traffic from the primary instance. Option A increases cost unnecessarily, C requires application changes, and D does not directly improve read performance.

357
MCQhard

A company runs a stateless web application on EC2 instances behind an Application Load Balancer (ALB). During peak traffic, some instances become unhealthy and are replaced by Auto Scaling, but users experience errors. What is the MOST likely cause?

A.The EC2 instances are of a burstable performance type.
B.The Auto Scaling group's minimum size is too small.
C.The health check target path or port is misconfigured.
D.The health check interval is too long.
AnswerC

Misconfigured health checks can mark healthy instances as unhealthy, causing them to be replaced and disrupting traffic.

Why this answer

If the health check target path or port is misconfigured, healthy instances may fail health checks and be replaced, causing errors during peak traffic. Option A is incorrect because burstable performance instances are not directly related to health check failures; health checks depend on the configured endpoint. Option B is incorrect because a small minimum size affects capacity, not the accuracy of health checks.

Option D is incorrect because a longer health check interval delays detection of unhealthy instances but does not cause healthy instances to be mistakenly replaced.

358
MCQmedium

Refer to the exhibit. An IAM policy is attached to a group. A user in the group tries to stop an EC2 instance with the tag 'Environment=production'. The action fails. What is the MOST likely reason?

A.The ec2:ResourceTag condition key is not supported for ec2:StopInstances.
B.The Resource element is set to '*', which does not include the specific instance.
C.The ec2:StopInstances action is not listed in the policy.
D.The policy requires a resource ARN for the condition to work.
AnswerA

The ec2:ResourceTag condition key is not supported for ec2:StopInstances or ec2:StartInstances actions.

Why this answer

The ec2:ResourceTag condition key is not supported for the ec2:StopInstances action; it is only supported for read actions such as ec2:DescribeInstances. Therefore, even though the instance has the tag 'Environment=production', the condition is not evaluated and the action fails. Option B is incorrect because the Resource element '*' includes all instances.

Option C is incorrect because the policy does include ec2:StopInstances. Option D is incorrect because a resource ARN is not required for the condition to work; the issue is the unsupported condition key.

359
Multi-Selecthard

A company is running a production web application on Amazon EKS. The application experiences intermittent latency spikes. The operations team suspects that the issue is related to pod networking. Which THREE tools should they use to diagnose the issue? (Choose 3)

Select 3 answers
A.tcpdump on worker nodes
B.VPC Flow Logs
C.Amazon CloudWatch Logs
D.Amazon CloudWatch Container Insights
E.AWS CodePipeline
AnswersB, C, D

Captures network traffic metadata.

Why this answer

The correct tools for diagnosing intermittent latency spikes in an Amazon EKS pod networking issue are VPC Flow Logs (B), Amazon CloudWatch Logs (C), and Amazon CloudWatch Container Insights (D). VPC Flow Logs capture network traffic metadata, helping identify packet loss or delays. CloudWatch Logs aggregate container logs for debugging application behavior.

Container Insights provides metrics like network usage and pod performance. Option A (tcpdump) is a Linux command-line tool that can capture packets but is not an AWS managed service and may require elevated access; it is not optimal for production troubleshooting on EKS. Option E (AWS CodePipeline) is a CI/CD service unrelated to network diagnostics.

360
MCQhard

A company is running a stateful web application on EC2 instances in an Auto Scaling group behind an ALB. The application stores session data locally on the instance. The company notices that users are frequently logged out and lose session data during scaling events. What is the MOST operationally efficient way to preserve session state?

A.Migrate session data to ElastiCache for Redis and modify the application to use it.
B.Create a custom AMI that pre-populates session data from Amazon S3.
C.Increase the Auto Scaling group's cooldown period to 600 seconds.
D.Enable sticky sessions (session affinity) on the ALB.
AnswerA

Externalizing session state ensures data persists across instance replacements.

Why this answer

Migrating session state to ElastiCache for Redis provides a centralized, external, and highly available session store that persists independently of EC2 instance lifecycles. This ensures that when instances are terminated or added during Auto Scaling events, session data remains intact and accessible from any instance, eliminating user logouts and data loss. It is operationally efficient as it requires minimal application code changes and leverages a fully managed, in-memory data store optimized for low-latency access.

Exam trap

The trap here is that candidates often choose sticky sessions (Option D) thinking it solves session persistence, but they overlook that sticky sessions only route traffic to the same instance and do not protect against data loss when that instance is terminated during scaling events.

How to eliminate wrong answers

Option B is wrong because pre-populating a custom AMI with session data from S3 is impractical and inefficient: session data is dynamic and changes constantly, so a static AMI cannot reflect real-time session states, and this approach would require frequent AMI rebuilds and complex synchronization. Option C is wrong because increasing the cooldown period to 600 seconds only delays scaling events but does not prevent session loss when instances are eventually terminated; it also reduces the Auto Scaling group's ability to respond to load changes, potentially impacting availability. Option D is wrong because enabling sticky sessions (session affinity) on the ALB only binds a user's session to a specific instance, but if that instance is terminated during a scale-in event, the session data is still lost; it does not provide a durable, shared session store.

361
MCQmedium

A company uses Amazon S3 to store sensitive data. The security team requires that all S3 buckets be encrypted at rest using SSE-KMS. The company has thousands of existing buckets, some of which are not encrypted. Which approach will enforce encryption on all buckets with minimal effort?

A.Use S3 default encryption to automatically encrypt new objects.
B.Use an AWS Config rule to check for encryption and automatically remediate by enabling SSE-S3.
C.Use an SCP to deny creation of buckets without SSE-KMS and use an AWS Config rule with remediation to enable SSE-KMS on existing buckets.
D.Create an AWS Lambda function that scans all buckets and enables encryption.
AnswerC

SCP prevents new non-compliant buckets, Config remediates existing ones.

Why this answer

An SCP can deny creation of buckets without SSE-KMS, and AWS Config with automatic remediation can enable SSE-KMS on existing buckets. Option A is wrong because S3 default encryption only encrypts new objects, not existing ones. Option B is wrong because SSE-S3 does not meet the KMS requirement.

Option D is wrong because a Lambda function is reactive and requires custom code, whereas the combination of SCP and Config provides a more scalable and policy-driven approach.

362
MCQmedium

A company is using an Application Load Balancer (ALB) in front of an Auto Scaling group of EC2 instances. The application has a health check endpoint at /health. Recently, the ALB is marking instances as unhealthy even though the application is running. The health check settings are: interval 30 seconds, timeout 5 seconds, unhealthy threshold 2. What is the most likely cause?

A.The health check interval of 30 seconds is too long.
B.The unhealthy threshold of 2 is too high.
C.The health check timeout of 5 seconds is too short for the application to respond.
D.The health check path /health is not accessible from the ALB.
AnswerC

A short timeout can cause false unhealthy markings.

Why this answer

A timeout of 5 seconds may be insufficient if the application's /health endpoint takes longer to respond due to high load or backend processing. The ALB expects a response within the timeout; if not received, it marks the instance unhealthy. Option A is wrong because a 30-second interval is standard and not too long; reducing it would increase load but not fix the timeout issue.

Option B is wrong because an unhealthy threshold of 2 is reasonable; lowering it would mark instances unhealthy more quickly but does not address the root cause of slow responses. Option D is wrong because the path /health is accessible (the application is running), so the ALB can reach it; the problem is the response time.

363
Multi-Selecthard

A company has a production AWS account with multiple VPCs connected via a Transit Gateway. The security team wants to centrally inspect all traffic between VPCs using a third-party firewall appliance. The firewall must be able to process traffic, and the solution must be highly available. Which THREE steps should the company take?

Select 3 answers
A.Attach Elastic Network Interfaces (ENIs) of the firewall instances to the inspection VPC subnets.
B.Configure the Transit Gateway to propagate routes directly between VPCs.
C.Deploy the firewall appliance as an EC2 instance in each AZ, with auto scaling groups.
D.Use a single route table in the Transit Gateway for all VPC attachments.
E.Create a dedicated inspection VPC with firewall instances in different Availability Zones.
AnswersA, C, E

ENIs are required for traffic to pass through the firewall.

Why this answer

Options A, C, and E are correct. A: Attaching ENIs of firewall instances to the inspection VPC subnets allows traffic to be forwarded to the firewall for inspection. C: Deploying the firewall appliance as an EC2 instance in each AZ with auto scaling groups ensures high availability and scalability.

E: Creating a dedicated inspection VPC with firewall instances in different Availability Zones centralizes inspection and provides fault tolerance. Option B is incorrect because propagating routes directly between VPCs would bypass the inspection firewall. Option D is incorrect because using a single route table in the Transit Gateway would not allow for selective routing to the inspection VPC and limits high availability.

364
Multi-Selectmedium

A company runs a stateless web application on EC2 instances in an Auto Scaling group. The application experiences high latency during peak hours. The operations team suspects that the instances are overloaded. Which TWO actions should the team take to improve performance and scalability? (Choose two.)

Select 2 answers
A.Increase the Auto Scaling group's desired capacity to a higher fixed value.
B.Configure an Application Load Balancer in front of the Auto Scaling group.
C.Switch to a different Amazon Machine Image (AMI) with optimized performance.
D.Launch the Auto Scaling group in multiple Availability Zones.
E.Increase the instance size to a larger type.
AnswersB, D

ALB distributes traffic evenly across instances.

Why this answer

An Application Load Balancer distributes incoming traffic across multiple EC2 instances, reducing load on individual instances and improving scalability. Option D is correct because launching instances in multiple Availability Zones increases fault tolerance and allows the Auto Scaling group to scale across zones, improving availability and performance during peak hours. Option A is incorrect because increasing desired capacity to a fixed value does not adapt to variable demand and may lead to overprovisioning.

Option C is incorrect because changing the AMI does not address the root cause of overload; performance improvements from AMI changes are negligible compared to scaling. Option E is incorrect because increasing instance size (vertical scaling) has limits and does not provide the elasticity and cost-efficiency of horizontal scaling.

365
MCQmedium

A company runs a stateful web application on EC2 instances in an Auto Scaling group. The application uses a shared EFS file system for persistent data. The operations team notices that during scale-in events, some requests fail because the instance is terminated while still processing. What is the BEST way to prevent request failures during scale-in?

A.Use a Network Load Balancer with connection draining enabled
B.Increase the cooldown period for the Auto Scaling group
C.Decrease the scale-in threshold to reduce the frequency of termination
D.Use lifecycle hooks to put the instance in a 'terminating:wait' state and complete request processing
AnswerD

Lifecycle hooks allow graceful shutdown.

Why this answer

Lifecycle hooks allow the Auto Scaling group to put the instance in a 'terminating:wait' state, giving it time to complete processing existing requests before termination. Option A (Network Load Balancer with connection draining) can help drain new connections but does not ensure that in-flight requests are completed, especially for a stateful application using EFS. Option B (increase cooldown) only delays scaling decisions and does not prevent termination of an instance that is already processing.

Option C (decrease scale-in threshold) reduces the frequency of scale-in events but does not prevent request failures when termination occurs.

366
MCQmedium

A company uses AWS CloudFormation to deploy infrastructure. They have a stack that creates an Amazon RDS for MySQL database. The stack creation fails with the error 'The following resource(s) failed to create: [DBInstance]'. The solutions architect needs to troubleshoot the issue. Which approach should be taken first?

A.Review the CloudFormation stack events in the AWS Management Console.
B.Check the RDS console for any database events.
C.Delete the stack and deploy again with the same parameters.
D.Use AWS CloudTrail to view the CreateStack API call.
AnswerA

Stack events provide the specific failure reason.

Why this answer

When a CloudFormation stack creation fails, the stack events provide detailed status reasons for each resource, including the specific error message for the DBInstance. This is the first step to diagnose the failure. Option B is incorrect because while RDS events may show database-level issues, the failure occurred during stack creation and CloudFormation events are more direct.

Option C is incorrect because deleting and redeploying without understanding the cause is inefficient. Option D is incorrect because CloudTrail logs API calls but does not provide the detailed resource failure reasons that CloudFormation events do.

367
MCQmedium

A company is running a web application on AWS using an Application Load Balancer (ALB) in front of an Auto Scaling group of EC2 instances. The application experiences periodic traffic spikes that cause increased latency. The company wants to implement a solution to automatically adjust capacity in anticipation of traffic changes. What should a solutions architect do?

A.Configure a simple scaling policy based on CPU utilization.
B.Configure a scheduled scaling policy to add instances during known peak hours.
C.Configure a target tracking scaling policy based on average CPU utilization.
D.Configure a predictive scaling policy using historical traffic patterns.
AnswerD

Predictive scaling uses machine learning to forecast traffic and proactively scale.

Why this answer

Predictive scaling uses historical traffic patterns to forecast future demand and proactively adjust capacity before traffic spikes occur, which directly addresses the requirement to anticipate changes. This approach reduces latency by ensuring sufficient resources are available ahead of time, unlike reactive policies that only respond after utilization increases.

Exam trap

The trap here is that candidates often confuse reactive scaling policies (simple, step, or target tracking) with proactive predictive scaling, assuming that maintaining a target metric like CPU utilization is sufficient to handle anticipated spikes, but only predictive scaling uses historical patterns to act before the load increases.

How to eliminate wrong answers

Option A is wrong because a simple scaling policy based on CPU utilization is reactive, only adjusting capacity after a threshold is breached, which cannot anticipate traffic spikes and may still cause latency during the scaling cooldown period. Option B is wrong because scheduled scaling assumes fixed peak hours, but the scenario describes periodic spikes that may not follow a strict schedule, making it inflexible and potentially wasteful or insufficient. Option C is wrong because target tracking scaling, while more sophisticated than simple scaling, is still reactive—it maintains a target metric (e.g., average CPU) but does not proactively forecast demand, so it cannot eliminate latency during sudden spikes.

368
MCQeasy

A company is using AWS Config to evaluate resource compliance. They want to receive notifications when a noncompliant resource is detected. Which AWS service should be used to send these notifications to an email endpoint?

A.Amazon Simple Queue Service (SQS)
B.Amazon Simple Notification Service (SNS)
C.Amazon CloudWatch Events
D.AWS Lambda
AnswerB

SNS can send email notifications directly.

Why this answer

(Amazon SNS) is correct because Amazon SNS can send email notifications when triggered by AWS Config rules to notify about noncompliant resources. Option A (SQS) is incorrect because SQS is a message queue service that does not directly send email. Option C (CloudWatch Events) can trigger other actions but cannot directly send email to endpoints.

Option D (AWS Lambda) can process notifications but requires additional services like SNS to send email.

369
MCQhard

A company has a serverless application using AWS Lambda functions that process messages from an Amazon SQS queue. The queue receives a burst of messages daily. The Lambda function sometimes times out, causing messages to return to the queue and be reprocessed. How can the company improve the application to handle the burst without reprocessing failures?

A.Reduce the batch size in the Lambda event source mapping.
B.Increase the Lambda function's reserved concurrency and timeout.
C.Increase the SQS visibility timeout to 6 minutes.
D.Configure a dead-letter queue for the SQS queue.
AnswerB

Increasing reserved concurrency allows Lambda to scale to handle the burst, and increasing the timeout prevents timeouts during processing, thus reducing reprocessing.

Why this answer

Increasing the reserved concurrency ensures Lambda can scale to handle the burst, and increasing the timeout allows the function to complete processing without timing out. Option A is wrong because reducing the batch size may reduce the number of messages processed per invocation but does not address the timeout issue. Option C is wrong because increasing the SQS visibility timeout would cause messages to be delayed before becoming visible again after a timeout, but it does not solve the root cause of the Lambda function timing out; it just delays reprocessing.

Option D is wrong because a dead-letter queue is used to capture messages that repeatedly fail processing after maximum retries, not to prevent reprocessing of timeout failures.

370
MCQhard

A company runs a critical application on Amazon ECS Fargate. The application uses an Application Load Balancer as the front end. Recently, the application experienced a spike in traffic, and many tasks were marked as unhealthy and replaced. The team wants to improve resilience to traffic spikes without over-provisioning. What should the team do?

A.Use a step scaling policy with a lower scale-out threshold and a larger adjustment
B.Increase the task memory allocation to improve performance
C.Increase the health check interval to reduce the number of tasks marked unhealthy
D.Use a target tracking scaling policy with a higher target value
AnswerA

Step scaling can add more tasks faster when CPU exceeds thresholds.

Why this answer

Step scaling policies can respond more aggressively to larger traffic spikes by using a lower scale-out threshold and a larger adjustment, adding capacity faster when needed. Option B (increase task memory) does not directly affect scaling behavior. Option C (increase health check interval) would actually delay detection of unhealthy tasks, potentially reducing resilience.

Option D (target tracking) is reactive and may not handle sudden spikes as effectively as step scaling.

371
MCQhard

A company uses AWS CodePipeline to automate deployments of a microservices application to Amazon ECS. The pipeline builds a Docker image, pushes it to Amazon ECR, and updates the ECS service. Recently, deployments have failed because insufficient IAM permissions cause the pipeline to fail when updating the ECS service. The development team wants to implement least privilege permissions. Which IAM policy statement should be added to the CodePipeline service role to allow it to update the ECS service?

A.{"Effect":"Allow","Action":["ecs:UpdateService"],"Resource":"*"}
B.{"Effect":"Allow","Action":["ecr:PutImage"],"Resource":"*"}
C.{"Effect":"Allow","Action":["ecs:RunTask"],"Resource":"*"}
D.{"Effect":"Allow","Action":["ecs:RegisterTaskDefinition"],"Resource":"*"}
AnswerA

UpdateService is the action needed to update the ECS service.

Why this answer

The CodePipeline service role needs the ecs:UpdateService permission to trigger an ECS service update after a new Docker image is pushed to Amazon ECR. This action allows the pipeline to instruct ECS to redeploy the service using the updated task definition, which is the specific step that was failing due to insufficient permissions. The resource wildcard is acceptable here because the pipeline role is scoped by the pipeline's own trust policy and resource-based policies on the ECS service.

Exam trap

The trap here is that candidates confuse the permissions needed for different stages of the pipeline (e.g., pushing to ECR or registering a task definition) with the specific permission required to update the ECS service, leading them to select options that are valid for other actions but not for the failing step.

How to eliminate wrong answers

Option B is wrong because ecr:PutImage is used to push Docker images to an ECR repository, which is typically performed by the build stage (e.g., CodeBuild) rather than the CodePipeline service role that updates the ECS service. Option C is wrong because ecs:RunTask is used to run standalone tasks, not to update an existing ECS service; updating a service requires ecs:UpdateService. Option D is wrong because ecs:RegisterTaskDefinition is used to create a new task definition revision, which is usually done by the build or deploy stage, not by the pipeline service role when updating the service itself.

372
Multi-Selectmedium

A company is deploying a web application on EC2 instances behind an Application Load Balancer. The application experiences high traffic during business hours and low traffic at night. The company wants to automatically scale the instances based on CPU utilization. Which TWO steps are required to achieve this?

Select 2 answers
A.Configure a scheduled scaling policy to add instances during business hours.
B.Replace the ALB with a Network Load Balancer for better performance.
C.Create a dynamic scaling policy based on the average CPU utilization metric.
D.Create an Auto Scaling group and associate it with the ALB.
E.Create a CloudWatch alarm that sends an email when CPU exceeds 80%.
AnswersC, D

Scales based on CPU.

Why this answer

To automatically scale EC2 instances based on CPU utilization, you need an Auto Scaling group to manage the instances (Option D) and a dynamic scaling policy based on the average CPU utilization metric (Option C). Option A is a scheduled scaling policy based on time, not CPU utilization. Option B is incorrect because a Network Load Balancer is not required for scaling based on CPU.

Option E is incorrect because while a CloudWatch alarm can be used to trigger scaling, it is not a required step on its own; the scaling policy is the primary requirement.

373
MCQmedium

A company runs a stateless web application on AWS Elastic Beanstalk. The application experiences periodic spikes in traffic that cause CPU utilization to reach 90% on the EC2 instances. The company wants to automatically scale the environment based on CPU usage. They also want to ensure that the scaling is proactive and can handle sudden traffic surges. What should they do?

A.Configure a simple scaling policy based on CPU utilization with a cooldown period.
B.Configure a predictive scaling policy using AWS Auto Scaling.
C.Manually increase the instance count when traffic spikes are expected.
D.Use scheduled scaling to add instances during known peak times.
AnswerB

Predictive scaling uses historical data to forecast and proactively add capacity before spikes.

Why this answer

Predictive scaling policies in AWS Auto Scaling use historical data to forecast future traffic and proactively adjust capacity, handling sudden surges. Option A: Simple scaling policies react after alarms trigger, causing delays. Option C: Manual scaling is not automated.

Option D: Scheduled scaling works for known peak times but not for unpredictable surges.

374
Multi-Selecthard

A company is migrating a legacy application to AWS. The application requires a relational database with high I/O and low latency. The database size is 2 TB and growing. The Solutions Architect must choose a storage solution that provides the best price-performance. Which TWO solutions meet these requirements?

Select 2 answers
A.Use Amazon Aurora with I/O-Optimized cluster configuration.
B.Use Amazon RDS with Provisioned IOPS (io2) volumes.
C.Use Amazon DynamoDB with provisioned capacity.
D.Use Amazon Redshift with dense compute nodes.
E.Use Amazon RDS with gp3 storage.
AnswersA, B

Aurora I/O-Optimized is cost-effective for high I/O.

Why this answer

Options A and B are correct: Amazon Aurora with I/O-Optimized cluster configuration provides high I/O and low latency for demanding workloads, often at a lower cost than Provisioned IOPS for sustained high I/O. Amazon RDS with Provisioned IOPS (io2) volumes delivers consistent low latency and high throughput, suitable for I/O-intensive applications. Option C is wrong because DynamoDB is a NoSQL database, not a relational one.

Option D is wrong because Redshift is a data warehouse for analytics, not a relational database for OLTP. Option E is wrong because gp3 storage is general-purpose and not optimized for high I/O workloads.

375
MCQmedium

A company runs a critical application on EC2 instances behind an Application Load Balancer (ALB) in a production AWS account. Recently, the application has experienced intermittent timeouts. The operations team notices that the CPU utilization of the instances spikes to 100% for a few minutes during the timeouts. The Auto Scaling group is configured with a target tracking scaling policy based on average CPU utilization at 70%. What should a solutions architect do to improve the application's availability and reduce timeouts?

A.Increase the ALB idle timeout to 120 seconds.
B.Add a step scaling policy to scale out by 2 instances when CPU exceeds 80% for 1 minute.
C.Enable cross-zone load balancing on the ALB.
D.Reduce the target tracking scaling threshold to 50% average CPU.
AnswerB

Step scaling can add capacity quickly in response to high CPU, reducing timeouts.

Why this answer

Adding a step scaling policy that triggers at 80% CPU for 1 minute provides a faster, more aggressive scale-out response than the existing target tracking policy alone. This helps preempt the CPU spikes that reach 100% and cause timeouts, improving application availability by adding capacity before performance degrades.

Exam trap

The trap here is that candidates assume reducing the target tracking threshold (Option D) is sufficient, but they overlook that target tracking cannot react quickly enough to sudden spikes, whereas a step scaling policy provides the immediate, aggressive scale-out needed to prevent 100% CPU utilization and timeouts.

How to eliminate wrong answers

Option A is wrong because increasing the ALB idle timeout to 120 seconds does not address the root cause of CPU spikes; it only keeps connections open longer, which can mask timeouts but does not prevent them. Option C is wrong because cross-zone load balancing is already enabled by default on ALBs and does not affect CPU utilization or scaling behavior. Option D is wrong because reducing the target tracking threshold to 50% average CPU would cause the Auto Scaling group to maintain a lower average utilization, but it does not provide the rapid, proactive scaling needed to handle sudden spikes that reach 100% CPU.

← PreviousPage 5 of 6 · 410 questions totalNext →

Ready to test yourself?

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