Courseiva

CCNA Continuous Improvement Questions

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

226
Multi-Selectmedium

A company is building a serverless application using AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. They want to improve performance and reduce costs. Which THREE actions should they take? (Choose THREE.)

Select 3 answers
A.Enable Lambda Provisioned Concurrency for the function.
B.Use DynamoDB on-demand capacity mode.
C.Use DynamoDB Accelerator (DAX) for read-heavy workloads.
D.Enable API Gateway caching to reduce backend calls.
E.Increase the Lambda function timeout to 5 minutes.
AnswersA, C, D

Reduces cold start latency for predictable traffic.

Why this answer

Options A, C, and D are correct. A: Lambda Provisioned Concurrency reduces cold starts for predictable traffic, improving performance. C: Using DAX reduces read latency and can lower DynamoDB read costs by offloading reads from the table.

D: API Gateway caching reduces the number of requests to Lambda and DynamoDB, improving response times and reducing costs. Option B is incorrect because DynamoDB on-demand capacity mode is typically more expensive for predictable workloads compared to provisioned capacity. Option E is incorrect because increasing the Lambda function timeout does not improve performance and may increase costs due to longer execution time.

227
Multi-Selecteasy

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores session state in an Amazon ElastiCache Redis cluster. The operations team has noticed that during peak hours, application response times increase significantly. They need to improve performance without downtime. Which THREE actions should they take? (Choose 3)

Select 3 answers
A.Enable connection draining on the ALB.
B.Decrease the idle timeout of the ALB.
C.Increase the EC2 instance size to a larger instance type.
D.Add read replicas to the ElastiCache Redis cluster.
E.Add more EC2 instances to the Auto Scaling group.
AnswersA, D, E

Connection draining allows existing connections to complete before instances are deregistered, improving availability during scaling events.

Why this answer

(Enable connection draining on the ALB) allows in-flight requests to complete before instances are deregistered or replaced, ensuring no disruption during scaling events. Option D (Add read replicas to the ElastiCache Redis cluster) offloads read traffic from the primary Redis node, reducing latency for session reads. Option E (Add more EC2 instances to the Auto Scaling group) horizontally scales the application, distributing load and improving response times during peak hours.

Option B (Decrease the idle timeout of the ALB) would prematurely close connections, not improve performance. Option C (Increase the EC2 instance size) is vertical scaling, which could cause downtime unless done with rolling replacement, and is not the best approach for handling increased load with zero downtime.

228
Multi-Selecteasy

A company runs a stateless web application on EC2 instances in an Auto Scaling group. The application occasionally receives traffic spikes that cause the Auto Scaling group to launch new instances. However, the new instances take several minutes to become healthy, causing a temporary performance degradation. Which TWO actions would improve the scaling responsiveness? (Select TWO.)

Select 2 answers
A.Increase the Auto Scaling group cooldown period.
B.Reduce the target group health check interval to 5 seconds.
C.Decrease the health check grace period to 30 seconds.
D.Use a launch template with a pre-provisioned AMI that includes the application and dependencies.
E.Configure a scheduled scaling policy to add instances before expected traffic spikes.
AnswersD, E

Pre-warmed AMI reduces launch time.

Why this answer

Using a launch template with a pre-provisioned AMI reduces instance startup time, allowing new instances to become healthy faster during traffic spikes. Option E is correct because a scheduled scaling policy can add instances before expected traffic spikes, proactively handling the load. Option A is incorrect because increasing the cooldown period would delay additional scaling actions, worsening responsiveness.

Option B is incorrect because reducing the health check interval does not speed up instance initialization; it only checks health more frequently. Option C is incorrect because decreasing the health check grace period may cause instances to be terminated prematurely before they have a chance to become healthy.

229
MCQeasy

A company has a legacy application that runs on an Amazon EC2 instance. The application writes logs to a local file. The company wants to centralize log monitoring without modifying the application code. Which solution should the company use?

A.Use Amazon Kinesis Agent to stream the log file to Amazon Kinesis Data Firehose.
B.Install the Amazon CloudWatch agent on the EC2 instance and configure it to tail the log file.
C.Modify the application to use the AWS SDK for logging to Amazon CloudWatch Logs.
D.Turn on AWS CloudTrail for the EC2 instance to capture logs.
E.Configure the application to write logs to Amazon S3 using the AWS SDK.
AnswerB

CloudWatch agent can collect logs from files and send to CloudWatch Logs.

Why this answer

The Amazon CloudWatch agent can be installed on the EC2 instance without modifying the application code. It tails the local log file and sends the logs to Amazon CloudWatch Logs for centralized monitoring. Option A is incorrect because Amazon Kinesis Agent streaming to Kinesis Data Firehose adds unnecessary complexity for simple log ingestion.

Option C is incorrect because it requires modifying the application code. Option D is incorrect because AWS CloudTrail captures API activity, not application logs. Option E is incorrect because it requires modifying the application code to write to Amazon S3.

230
Multi-Selecthard

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

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

Key metrics for DR planning.

Why this answer

Options A, B, and C are correct. A: RTO and RPO define recovery objectives. B: Data replication strategy (synchronous vs. asynchronous) impacts consistency and latency.

C: DNS failover using Route 53 directs traffic to the DR site during a disaster. D is incorrect because deploying across multiple Availability Zones addresses high availability, not disaster recovery across regions. E is incorrect because larger instance sizes improve performance, not disaster recovery readiness.

231
MCQmedium

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

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

Target tracking automatically adjusts capacity to maintain the target metric value.

Why this answer

A target tracking scaling policy automatically adjusts the number of instances to maintain a target value for the custom metric, which is efficient for variable workloads. Option A is incorrect because scheduled scaling assumes predictable patterns. Option B is incorrect because using Lambda adds complexity and overhead.

Option C is incorrect because step scaling requires manual configuration of steps and is less efficient than target tracking.

232
MCQhard

A financial services company runs a critical application on EC2 instances in an Auto Scaling group across multiple Availability Zones. They need to ensure that in the event of a single AZ failure, the application remains available with no data loss. The application uses EBS volumes for persistent storage. What should a solutions architect recommend?

A.Take periodic EBS snapshots and restore in another AZ.
B.Use Amazon EFS instead of EBS volumes.
C.Use an EBS volume in one AZ and attach it to instances in another AZ.
D.Use an EBS multi-attach volume with a cluster-aware file system.
AnswerB

Correct. Amazon EFS provides a regional file system that is automatically replicated across multiple AZs, ensuring availability and no data loss during a single AZ failure.

Why this answer

Amazon EFS is a regional, fully managed file system that automatically replicates data across multiple Availability Zones, providing high availability and durability. This ensures no data loss during a single AZ failure. Option A is incorrect because periodic snapshots introduce a recovery point objective (RPO) that may result in data loss.

Option C is incorrect because EBS volumes are tied to a single AZ and cannot be attached to instances in another AZ. Option D is incorrect because EBS multi-attach volumes only allow attachment within the same AZ, not across different AZs, thus cannot provide cross-AZ high availability.

Exam trap

EBS multi-attach volumes are often mistaken as a cross-AZ solution, but they only work within a single AZ. For cross-AZ high availability with no data loss, consider using Amazon EFS or a replication mechanism.

233
Multi-Selectmedium

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

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

Blue/green deployments reduce risk by switching traffic between environments.

Why this answer

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

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

234
MCQhard

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

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

CloudWatch Logs Insights is the most efficient way to query across multiple log groups with a single query, enabling centralized search without additional infrastructure.

Why this answer

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

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

Exam trap

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

235
MCQeasy

A company is using Amazon RDS for MySQL and wants to minimize downtime during a major version upgrade. Which approach is the MOST effective?

A.Take a snapshot, restore as a new instance with the new version, and update the application endpoint.
B.Create a read replica with the new version, promote it to primary, and update the application endpoint.
C.Launch a new RDS instance with the new version, use DMS to migrate data, and switch the application endpoint.
D.Use the AWS RDS modify-db-instance command with the --allow-major-version-upgrade option. This typically causes a few minutes of downtime but is the simplest.
AnswerB

This approach minimizes downtime as the promotion is fast.

Why this answer

Creating a read replica, upgrading it, and then promoting it to primary minimizes downtime because the promotion is a quick operation.

236
MCQmedium

A company is using AWS CodePipeline to build and deploy a Java application to Elastic Beanstalk. Recently, deployments have been failing due to unit test failures in the build stage. The team wants to receive immediate notifications when a pipeline fails. What is the MOST efficient way to achieve this?

A.Configure CodePipeline to send notifications to an Amazon SNS topic when the pipeline fails.
B.Have the build script send a notification on failure using the AWS CLI.
C.Set up a CloudWatch Events rule to trigger an AWS Lambda function that sends an email via Amazon SES.
D.Create a CloudWatch alarm on the CodePipeline failure metric.
AnswerA

Direct and efficient.

Why this answer

AWS CodePipeline natively supports sending notifications to Amazon SNS topics when pipeline state changes occur, such as failure. This is the most direct and efficient method without requiring additional services. Option B is incorrect because while the build script could use the AWS CLI to send a notification, this would require modifying the build script and does not leverage CodePipeline's built-in notification capability.

Option C is incorrect because although a CloudWatch Events (EventBridge) rule can trigger a Lambda function to send email via SES, this approach is more complex and less efficient than using SNS directly from CodePipeline. Option D is incorrect because CloudWatch alarms are designed for metric-based thresholds, not for pipeline state changes; CodePipeline events are better handled via SNS or EventBridge.

237
MCQhard

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

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

Increasing allocated storage and provisioned IOPS directly improves I/O capacity, reducing write latency. It is a viable and cost-effective solution for high write loads.

Why this answer

To improve write performance, increasing allocated storage and provisioned IOPS can reduce write latency by providing more I/O capacity. While other options like sharding could theoretically help, Option C is not feasible because Amazon RDS for PostgreSQL does not support multiple write replicas; only read replicas are available. Option D is the most practical and cost-effective solution among the given choices.

238
MCQmedium

A financial services company uses Amazon RDS for MySQL as the backend for a trading application. The application runs on EC2 instances in an Auto Scaling group behind an ALB. The database is a Multi-AZ DB instance with 500 GB provisioned storage. During peak trading hours, the application becomes slow. The RDS metrics show high CPU utilization and high read IOPS. The application performs many read-heavy queries. The team needs to improve performance without application changes. What should they do?

A.Create one or more read replicas and direct read traffic to them.
B.Modify the DB instance to a larger instance type with more vCPUs.
C.Enable Performance Insights and create a CloudWatch dashboard.
D.Convert the DB instance to a Multi-AZ cluster with two readable standbys.
AnswerA

Read replicas offload read queries, reducing load on the primary instance.

Why this answer

Creating read replicas offloads read traffic from the primary DB instance, reducing CPU utilization and read IOPS during peak hours. This improves performance without requiring application changes. Option B (larger instance type) may help but could involve downtime and does not address the read-heavy nature as effectively.

Option C (Performance Insights) provides monitoring but does not directly improve performance. Option D (Multi-AZ cluster with readable standbys) is for high availability and read scaling, but the two readable standbys may not be as cost-effective as dedicated read replicas, and converting to a cluster may require application changes or downtime.

239
Multi-Selectmedium

A company is running a critical application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. The application needs to process a large batch job that runs once per month and takes 2 hours. The company wants to optimize costs while ensuring the batch job has sufficient capacity. Which THREE steps should a solutions architect recommend?

Select 3 answers
A.Create a scheduled scaling policy that increases the desired capacity before the batch job starts.
B.Use a launch template with multiple instance types to increase the chances of obtaining Spot capacity.
C.Use On-Demand Instances only for the batch job to ensure availability.
D.Use Spot Instances in the Auto Scaling group for the batch job.
E.Purchase Reserved Instances for the batch job capacity.
AnswersA, B, D

Scheduled scaling ensures capacity is available when needed.

Why this answer

A scheduled scaling policy allows you to increase the desired capacity of the Auto Scaling group before the batch job starts, ensuring sufficient resources are available exactly when needed. This proactive approach avoids the latency of dynamic scaling and optimizes cost by not maintaining extra capacity outside the batch window.

Exam trap

The trap here is that candidates may assume On-Demand or Reserved Instances are required for reliability, but the question emphasizes cost optimization and the batch job's fault tolerance, making Spot Instances with a scheduled scaling policy the correct approach.

240
MCQhard

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

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

Cell-based architecture isolates failures to one cell, reducing overall impact.

Why this answer

Cell-based architecture isolates failures to individual cells, reducing blast radius. Option A is wrong because sharing a data store creates a single point of failure. Option C is wrong because a single Application Load Balancer creates a single point of failure and bottleneck.

Option D is wrong because a single Availability Zone and shared database are single points of failure.

241
MCQeasy

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

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

Metric filters convert log events into metrics, and alarms can trigger notifications.

Why this answer

The simplest way to notify when a specific error message appears in CloudWatch Logs is to create a metric filter on the log group for the error message, then set up a CloudWatch alarm on that metric. This is native, requires no custom code, and provides real-time alerting. Option A is incorrect because S3 event notifications apply to S3 objects, not CloudWatch Logs content.

Option B is incorrect because subscribing a Lambda function is more complex than using a metric filter and alarm. Option D is incorrect because CloudWatch Logs Insights queries are not real-time and require manual or scheduled execution.

242
Multi-Selecthard

A company runs a critical application on Amazon RDS for MySQL. The database size is 500 GB and growing. The application experiences high write latency during peak hours. A Solutions Architect needs to improve write performance with minimal downtime. Which THREE actions should the architect take? (Choose three.)

Select 3 answers
A.Migrate the database to Amazon Aurora with MySQL compatibility.
B.Add a read replica to offload read traffic.
C.Enable Multi-AZ deployment for the DB instance.
D.Change the storage type to Provisioned IOPS.
E.Increase the allocated storage of the DB instance.
AnswersA, D, E

Aurora offers better write throughput and scalability compared to RDS MySQL.

Why this answer

Migrating to Amazon Aurora (A) improves write performance because Aurora uses a distributed storage subsystem with better throughput and lower latency than standard RDS for MySQL. Changing the storage type to Provisioned IOPS (D) guarantees consistent low-latency I/O, directly improving write performance. Increasing allocated storage (E) increases the baseline IOPS for gp2 volumes, which can reduce write latency under high load.

Option B (read replica) offloads read traffic but does not help write performance. Option C (Multi-AZ) provides high availability but does not improve write performance.

243
MCQhard

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

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

This incremental approach minimizes downtime and risk, allowing both old and new to coexist.

Why this answer

A strangler fig pattern allows incremental migration of functionality from the monolith to microservices, with the ALB routing traffic to either the monolith or new services. This minimizes downtime because the old application remains operational while pieces are moved. Option A is wrong because a lift-and-shift of the entire application into a single container does not decompose it into microservices.

Option C is wrong because running both the monolith and new services on the same instance but on different ports does not inherently minimize downtime and complicates routing. Option D is wrong because refactoring the entire application at once introduces significant risk and downtime.

244
MCQmedium

A company uses AWS Systems Manager Patch Manager to patch Amazon EC2 instances. After a patching operation, some instances fail to report their compliance status. What is the MOST efficient way to identify the cause of the failure?

A.Run a script on each instance to list missing patches.
B.Use Systems Manager Inventory to query patch compliance details and identify non-compliant instances.
C.Use the Patch Manager dashboard in the AWS Management Console.
D.Check the EC2 console for each instance's patch status.
AnswerB

Inventory provides detailed compliance data that can be queried.

Why this answer

Use Systems Manager Inventory to query patch compliance details and identify non-compliant instances. This is the most efficient approach because Systems Manager Inventory provides a centralized view of patch compliance across all managed instances, allowing you to quickly identify which instances are non-compliant and investigate the reasons for patch failures. Option A is inefficient because it requires running scripts manually on each instance.

Option C is incorrect because the Patch Manager dashboard (if available) may not provide detailed failure reasons. Option D is inefficient and does not directly address compliance failure causes.

245
MCQeasy

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

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

EventBridge can filter CloudTrail events and trigger actions.

Why this answer

Amazon EventBridge can be configured with a rule that matches the 'CreateAccessKey' API call from CloudTrail and sends an SNS notification to alert the security team. Option A is incorrect because S3 event notifications are triggered by object-level operations (e.g., object created/deleted) in the S3 bucket, not by API calls logged by CloudTrail. Option B is incorrect because enabling log file validation on a CloudTrail trail only ensures the integrity of log files, it does not generate alerts.

Option C is incorrect because AWS Config rules evaluate the configuration state of AWS resources (e.g., whether an IAM user has a key older than 90 days), not real-time API calls.

246
MCQmedium

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

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

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

Why this answer

Enabling Cluster Mode and deploying Redis in Multi-AZ with replicas provides automatic failover and data replication across Availability Zones, ensuring high availability for session data. Option B is wrong because a single-node cluster with backups does not provide automatic failover; backups only help with recovery, not availability. Option C is wrong because disabling persistence reduces durability and does not improve availability.

Option D is wrong because increasing instance size does not provide failover or redundancy.

247
MCQhard

A company uses AWS Lambda functions within a VPC to process data from an Amazon SQS queue. The Lambda functions frequently timeout with the error 'Task timed out after 3.00 seconds'. The functions perform database operations on an RDS instance in the same VPC. The average database query takes 2 seconds. What is the MOST likely cause of the timeouts?

A.The Lambda function does not have the required VPC permissions to access the RDS instance.
B.The VPC does not have a NAT gateway, so the Lambda function cannot poll the SQS queue.
C.The Lambda function timeout should be increased to accommodate database query time.
D.The RDS instance is under-provisioned and causing slow queries.
AnswerB

Lambda in a VPC needs a NAT gateway to access public endpoints like SQS; without it, SQS polling fails, causing timeouts.

Why this answer

Lambda functions in a VPC require a NAT gateway or VPC endpoints to access the SQS API, which is outside the VPC. Without a NAT gateway, the function cannot poll the SQS queue, causing timeouts. Option A is wrong because Lambda can access RDS within the same VPC without special permissions.

Option C is wrong because the timeout is due to SQS polling failure, not the database query time. Option D is wrong because the RDS instance is under-provisioned would cause slow queries, but the error is a timeout after exactly 3 seconds, indicating the function is waiting on something else (SQS polling).

Exam trap

The timeout occurs because the Lambda function cannot reach the SQS API from within the VPC without a NAT gateway or VPC endpoint. The database query time is irrelevant here.

248
MCQhard

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

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

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

Why this answer

Implementing the Saga pattern with AWS Step Functions allows orchestrating distributed transactions across services, managing rollbacks and compensating actions. This is the best approach for eventual consistency with minimal code changes.

249
MCQhard

A media company runs a video transcoding pipeline on AWS using Amazon EC2 Spot Instances. The pipeline uses a custom AMI with pre-installed software. The operations team notices that the latest AMI is not always used when new instances launch, causing inconsistent transcoding results. What should the team do to ensure that all new Spot Instances use the latest AMI?

A.Create a new launch configuration each time a new AMI is released and associate it with the Auto Scaling group.
B.Use AWS CloudFormation to update the stack with the new AMI ID and then manually trigger a rolling update.
C.Manually update the AMI ID in the EC2 Auto Scaling group configuration every time a new AMI is released.
D.Use an EC2 Auto Scaling group with a launch template that dynamically references the latest AMI ID from AWS Systems Manager Parameter Store.
AnswerD

This allows automatic retrieval of the latest AMI ID at launch time.

Why this answer

Using an EC2 Auto Scaling group with a launch template that dynamically references the latest AMI ID from AWS Systems Manager Parameter Store ensures that new instances automatically use the most recent AMI without manual intervention. Option A is incorrect because launch configurations are immutable and cannot reference dynamic parameters like SSM Parameter Store; they require creating a new launch configuration each time the AMI changes. Option B is incorrect because CloudFormation updates require manual initiation and do not automatically track the latest AMI.

Option C is incorrect because manually updating the AMI ID in the Auto Scaling group configuration is error-prone and not automated.

250
Multi-Selectmedium

A company stores sensitive data in an S3 bucket. The security team requires that all data be encrypted at rest and that the encryption keys be rotated automatically every year. The company also needs to audit who accessed the key and when. Which THREE services should the solutions architect use to meet these requirements?

Select 3 answers
A.S3 server-side encryption with AWS KMS (SSE-KMS).
B.AWS CloudTrail to log KMS Decrypt and GenerateDataKey events.
C.AWS Identity and Access Management (IAM) to control access to the keys.
D.AWS Key Management Service (KMS) with automatic key rotation enabled.
E.S3 server-side encryption with S3-managed keys (SSE-S3).
AnswersA, B, D

SSE-KMS uses KMS keys for encryption, enabling rotation and auditing.

Why this answer

Options A, B, and D are correct. AWS KMS (SSE-KMS) provides encryption with customer-managed keys that can be automatically rotated annually (option A and D). AWS CloudTrail logs KMS API calls such as Decrypt and GenerateDataKey, enabling auditing of key usage (option B).

Option C is incorrect because IAM controls access to resources, not encryption keys directly; key access is managed via KMS key policies. Option E is incorrect because SSE-S3 uses S3-managed keys that do not allow customer-controlled rotation or auditing.

251
MCQhard

An IAM policy is attached to an IAM user. The user reports being unable to download objects from the bucket 'example-bucket' when connecting from their office IP address 203.0.113.5. What is the most likely reason?

A.The user's IP address is not in the allowed range.
B.The condition key 'aws:SourceIp' is invalid.
C.The resource ARN is incorrect.
D.The s3:GetObject action is misspelled.
AnswerA

The condition restricts access to 192.0.2.0/24.

Why this answer

The IAM policy likely includes a condition that restricts access to a specific IP range (e.g., 192.0.2.0/24), and the user's office IP 203.0.113.5 is not within that allowed range. Option B is incorrect because 'aws:SourceIp' is a valid condition key in IAM policies. Option C is incorrect because the resource ARN (arn:aws:s3:::example-bucket/*) is correctly specified.

Option D is incorrect because the s3:GetObject action is spelled correctly; the issue is the condition, not the action name.

252
MCQeasy

A company uses AWS CodePipeline to deploy a static website to an S3 bucket. The pipeline includes a source stage from GitHub and a deploy stage that syncs the S3 bucket. Recently, the deployment has been failing intermittently with the error 'Access Denied' when the pipeline tries to write to the S3 bucket. The bucket policy allows the pipeline's service role to perform s3:PutObject. The service role has the following IAM policy attached: { 'Effect': 'Allow', 'Action': 's3:PutObject', 'Resource': 'arn:aws:s3:::my-bucket/*' }. What is the MOST likely cause of the failure?

A.The S3 bucket has default encryption enabled.
B.The pipeline is in a VPC without an S3 VPC endpoint.
C.The pipeline's source stage is not configured with Git credentials.
D.The bucket has a bucket policy that denies the pipeline's service role.
AnswerD

An explicit deny in the bucket policy overrides the IAM allow.

Why this answer

The bucket policy can explicitly deny access even if the IAM role attached to the pipeline allows s3:PutObject. Since both policies are evaluated, an explicit deny in the bucket policy overrides any allow. Option A is incorrect because default encryption does not affect IAM permissions.

Option B is incorrect because the pipeline uses the service role, not Git credentials; that would affect source stage authentication, not S3 write access. Option C is incorrect because S3 VPC endpoints are for private connectivity, not required for public S3 access via the internet, and an Access Denied error points to a permissions issue, not a network issue.

253
Multi-Selecthard

A company runs a web application on Amazon ECS with Fargate launch type. The application is behind an Application Load Balancer. During traffic spikes, the application becomes slow. The team suspects that the ECS service is not scaling fast enough. Which TWO actions should the team take to improve the scalability? (Choose two.)

Select 2 answers
A.Decrease the number of subnets in the VPC.
B.Decrease the scale-in and scale-out cooldown periods.
C.Decrease the ALB idle timeout.
D.Increase the maximum number of tasks in the ECS service.
E.Increase the target value for the scaling metric (e.g., CPU utilization).
AnswersB, D

Decreasing cooldown periods allows more frequent scaling actions, helping the service respond faster to traffic spikes; correct.

Why this answer

Options B and D are correct. Decreasing cooldown periods (option B) allows scaling to happen more frequently, reducing lag during traffic spikes. Increasing the maximum number of tasks (option D) ensures the service can scale out to a higher capacity to handle increased load.

Option A is incorrect because decreasing subnets does not improve scalability and reduces fault tolerance. Option C is incorrect because decreasing the ALB idle timeout does not directly affect scaling behavior; it only affects connection persistence. Option E is incorrect because increasing the target value for the scaling metric (e.g., CPU utilization) makes the scaling threshold harder to reach, reducing scaling aggressiveness.

The correct action would be to decrease the target value.

Exam trap

A common pitfall is assuming that increasing the target value for a scaling metric improves scalability. In fact, it makes scaling less aggressive, worsening the problem. The correct action is to decrease the target value.

254
MCQeasy

A company uses an Application Load Balancer (ALB) to distribute traffic to an Auto Scaling group of EC2 instances. The operations team notices that the ALB is returning a high number of 504 errors during peak hours. Which configuration change is MOST likely to reduce the 504 errors?

A.Enable cross-zone load balancing on the ALB.
B.Increase the idle timeout setting on the ALB.
C.Increase the health check interval for the target group.
D.Increase the deregistration delay on the target group.
AnswerB

Higher idle timeout allows longer-lived connections to complete without timing out.

Why this answer

Increasing the idle timeout setting on the ALB can help prevent premature connection closures that cause 504 errors. Option A is wrong because increasing the deregistration delay only affects instance draining, not idle timeouts. Option C is wrong because enabling cross-zone load balancing does not address timeout issues.

Option D is wrong because increasing the health check interval does not affect idle timeouts.

255
MCQhard

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

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

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

Why this answer

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

Exam trap

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

How to eliminate wrong answers

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

256
Multi-Selecteasy

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

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

Provides high availability and automated backups.

Why this answer

Options B and E are correct. Option B: Amazon RDS with Multi-AZ deployment provides high availability through automatic failover to a standby instance and automated backups. Option E: Amazon Aurora is a relational database engine compatible with MySQL and PostgreSQL, offering built-in high availability, automated backups, and fault tolerance.

Option A is incorrect because Amazon Redshift is a data warehouse, not a relational database for transactional workloads. Option C is incorrect because Amazon ElastiCache is an in-memory caching service, not a relational database. Option D is incorrect because Amazon DynamoDB is a NoSQL database, not relational.

257
MCQeasy

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

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

ResourceNotFoundException means the resource is not found.

Why this answer

A ResourceNotFoundException indicates that the specified DynamoDB table does not exist or has been deleted. Option A is incorrect because a Lambda timeout would result in a timeout error, not a ResourceNotFoundException. Option C is incorrect because insufficient permissions to access DynamoDB would produce an AccessDeniedException.

Option D is incorrect because throttling by DynamoDB would cause a ProvisionedThroughputExceededException.

258
Multi-Selectmedium

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

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

Encrypts objects at rest.

Why this answer

Options B and C are correct. B: Enabling default encryption (SSE-S3) ensures data is encrypted at rest, protecting it from unauthorized access. C: Enabling S3 Block Public Access prevents any public access to the bucket and its objects, reducing the risk of data exposure.

Option A is incorrect because server access logging provides audit trails, not a direct security improvement. Option D is incorrect because versioning helps with data recovery, not security. Option E is incorrect because lifecycle policies manage storage costs, not security.

259
MCQeasy

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

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

Offloads reads, enabling a smaller primary instance to handle writes.

Why this answer

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

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

260
MCQmedium

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

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

More instances and proper scaling prevent zero healthy hosts during spikes.

Why this answer

Increasing the size of the Auto Scaling group and adjusting scaling policies ensures sufficient capacity during traffic spikes, preventing the healthy host count from dropping to zero. Option A is wrong because instance refresh is for rolling updates, not for handling spikes. Option C is wrong because Reserved Instances do not add on-demand capacity.

Option D is wrong because a larger Network Load Balancer does not address the root cause of insufficient EC2 capacity.

261
MCQeasy

A company uses Amazon ECS with Fargate launch type for a web application. During deployments, the new tasks fail health checks and the deployment rolls back. What should the team do to identify why the new tasks are failing?

A.View the stopped task logs in Amazon CloudWatch Logs.
B.Review the task definition for misconfigured environment variables.
C.Check the ECS service event stream for error messages.
D.Use ECS Exec to connect to the failing tasks and debug.
AnswerA

Stopped tasks send logs to CloudWatch, revealing failure reasons.

Why this answer

When tasks fail health checks and are stopped, their logs are sent to CloudWatch Logs (if configured). Viewing the stopped task logs reveals application errors that caused the health check failure. Option B is incorrect because misconfigured environment variables would likely affect the old running tasks as well; the issue is specific to new tasks, so the task definition is probably fine.

Option C is incorrect because the ECS service event stream shows deployment events (like rollback triggers) but not the detailed error logs of the failing tasks. Option D is incorrect because ECS Exec requires the task to be running; since the tasks are failing health checks and stopping, ECS Exec cannot connect to them.

262
MCQeasy

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

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

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

Why this answer

The 'ResourceNotFoundException' error indicates that the DynamoDB table does not exist in the account and region where the Lambda function is running. The most common cause is a misspelled table name in the Lambda code (Option D). Cross-account permission issues (Option C) typically result in an 'AccessDeniedException' rather than 'ResourceNotFoundException', because the resource does exist but access is denied.

Option A is incorrect because Lambda uses temporary credentials from its execution role, and credential issues would cause authentication errors. Option B is incorrect because DynamoDB is accessible over the public internet or via a VPC endpoint; lack of a VPC endpoint would cause a timeout, not a resource-not-found error.

263
MCQmedium

A company uses Amazon CloudFront to serve static content from an S3 bucket. Users in Europe report slow load times. The CloudFront distribution uses the default cache behavior. What is the MOST cost-effective improvement?

A.Enable CloudFront Lambda@Edge to optimize content delivery.
B.Use an S3 Transfer Acceleration to speed up content delivery.
C.Configure CloudFront with multiple origins and use geographic restrictions to route users to the nearest origin.
D.Add additional cache behaviors to serve different content from different origins.
AnswerA

Lambda@Edge can be used to redirect users based on location, improving latency. It is cost-effective for this use case.

Why this answer

Using Lambda@Edge to route users based on their geographic location can direct European users to a closer CloudFront distribution or origin, reducing latency. This approach is cost-effective as it avoids the need for additional infrastructure. Option B is incorrect because S3 Transfer Acceleration is designed for uploads, not for accelerating content delivery to end users.

Option C is incorrect because geographic restrictions are for access control, not routing; they cannot route users to the nearest origin. Option D is incorrect because additional cache behaviors control caching policies, not which origin serves content; they do not inherently reduce latency.

264
MCQhard

A financial services company runs a critical trading application on Amazon EC2 instances behind an Application Load Balancer (ALB) in three Availability Zones. The application uses a MySQL-compatible Amazon RDS for MariaDB database with Multi-AZ deployment. Recently, the operations team noticed that during periods of heavy trading, the database CPU utilization spikes to 100%, causing query timeouts and application errors. The team has already reviewed slow query logs and enabled Performance Insights, but the issue persists. The application is read-heavy with frequent writes. The team needs to reduce database load with minimal changes to the application code. Which solution is the MOST effective and scalable?

A.Migrate the database to Amazon Aurora MySQL-Compatible Edition with Auto Scaling and enable performance insights.
B.Implement an in-memory caching layer using Amazon ElastiCache for Memcached and modify the application to check the cache first.
C.Replace the RDS database with Amazon DynamoDB and use DynamoDB Accelerator (DAX) for caching.
D.Create read replicas of the RDS for MariaDB instance and configure the application to send read queries to the read replicas.
AnswerD

Read replicas offload read traffic with minimal application changes (connection string).

Why this answer

(RDS for MariaDB read replicas with read-only database connections) offloads read traffic without code changes, as read replicas can be used by modifying the connection string. Option A (Aurora) would require migration. Option B (ElastiCache) requires application code to cache data.

Option C (DynamoDB Accelerator) is for DynamoDB, not MariaDB.

265
MCQmedium

A company is running a containerized microservices application on Amazon ECS with Fargate launch type. The application experiences increased latency during peak hours. Upon investigation, the CPU utilization of the tasks reaches 90%. The ECS service is configured with a target tracking scaling policy based on average CPU at 70%. However, scaling is not keeping up with demand. What should a solutions architect do to improve the responsiveness of the scaling?

A.Increase the task-level CPU limit to 2048 units.
B.Decrease the target tracking value to 50% average CPU.
C.Add a step scaling policy that adds 4 tasks when CPU exceeds 80% for 1 minute.
D.Decrease the scale-in cooldown period to 60 seconds.
AnswerC

Step scaling can add capacity in larger increments, improving response to spikes.

Why this answer

Adding a step scaling policy provides a more aggressive and immediate scaling response when CPU exceeds 80% for 1 minute, which complements the existing target tracking policy. Target tracking scaling policies are reactive and may not scale quickly enough during rapid demand spikes, whereas step scaling can add a fixed number of tasks instantly when a breach occurs, reducing latency during peak hours.

Exam trap

The trap here is that candidates assume decreasing the target tracking threshold (Option B) will make scaling faster, but they overlook that target tracking is inherently gradual and cannot match the immediate response of a step scaling policy during sudden load spikes.

How to eliminate wrong answers

Option A is wrong because increasing the task-level CPU limit to 2048 units (2 vCPU) does not address the scaling responsiveness issue; it only allows each task to use more CPU, which may not help if tasks are already CPU-bound and scaling is slow. Option B is wrong because decreasing the target tracking value to 50% average CPU would cause the service to scale out at a lower threshold, but it does not improve the speed of scaling; target tracking still uses a gradual, proportional approach that may not keep up with rapid demand spikes. Option D is wrong because decreasing the scale-in cooldown period to 60 seconds affects scale-in behavior (reducing tasks), not scale-out responsiveness; it could even cause thrashing if tasks are scaled in too quickly after a spike.

266
MCQhard

A company runs a stateful web application on EC2 instances behind an Application Load Balancer (ALB). The application uses WebSockets for real-time communication. During scale-in events, users experience disconnections. How can the company maintain WebSocket connections during scaling?

A.Replace the ALB with a Network Load Balancer (NLB).
B.Use sticky sessions (session affinity) on the ALB.
C.Enable connection draining on the ALB target group.
D.Use an Auto Scaling lifecycle hook to delay instance termination.
AnswerC

Connection draining allows existing connections to complete before the instance is deregistered.

Why this answer

Connection draining on the ALB target group allows existing WebSocket connections to complete before the instance is terminated, preventing disconnections during scale-in. Option A is wrong because an NLB is not required for WebSockets; ALB supports WebSocket connections. Option B is wrong because sticky sessions alone do not prevent disconnections during scale-in.

Option D is wrong because lifecycle hooks can delay termination but do not handle existing connections; connection draining is specifically designed for this purpose.

267
MCQmedium

A company runs a production database on Amazon RDS for PostgreSQL. They need to perform a major version upgrade with minimal downtime. Which strategy should they use?

A.Use AWS Database Migration Service (DMS) to replicate data to a new instance.
B.Create a read replica of the current database using the new version, promote it, and update the connection string.
C.Create a new RDS instance with the new version and migrate data using pg_dump.
D.Take a snapshot of the database, perform an in-place upgrade, and restore if needed.
AnswerB

This approach reduces downtime to a brief cutover window.

Why this answer

Creating a read replica with the new PostgreSQL version, promoting it, and updating the connection string minimizes downtime by allowing the replica to catch up before promotion. Option A (DMS) adds complexity and potential lag. Option C (pg_dump) involves export/import time and potential data loss.

Option D (in-place upgrade) causes downtime during the upgrade and risk of failure.

268
MCQhard

A company has a legacy application that runs on an EC2 instance with a single EBS volume. The application stores temporary data on a second EBS volume that is attached to the instance. The company wants to improve durability of the temporary data without increasing costs significantly. What should the company do?

A.Increase the IOPS of the current EBS volume to improve performance.
B.Use Amazon S3 for temporary data storage.
C.Add additional EBS volumes and set up RAID 1 for mirroring.
D.Move the temporary data to an instance store volume if the instance type supports it.
AnswerB

S3 provides high durability at low cost, making it ideal for improving durability of temporary data without significant cost increase.

Why this answer

Using Amazon S3 for temporary data storage improves durability because S3 offers 99.999999999% durability, far exceeding the durability of a single EBS volume or instance store. It is cost-effective as you pay only for the storage used, with no upfront investment or additional volume costs. Although S3 is object storage, it is suitable for temporary data that does not require block-level access.

Option A is incorrect because increasing IOPS does not improve durability. Option C is incorrect because adding EBS volumes and RAID 1 mirroring increases costs significantly due to additional volume charges. Option D is incorrect because moving to instance store reduces durability, as instance store is ephemeral and data is lost on instance stop/termination.

269
MCQmedium

A company runs a stateful web application on EC2 instances behind an Application Load Balancer. The application stores session data locally on the instances. The company wants to improve availability and scalability. What should a solutions architect recommend?

A.Move session state to Amazon ElastiCache and make the application stateless.
B.Use Auto Scaling to add more EC2 instances.
C.Enable sticky sessions on the ALB.
D.Use larger EC2 instances to handle more sessions.
AnswerA

This decouples session state from instances, enabling scaling and fault tolerance.

Why this answer

Moving session state to Amazon ElastiCache makes the application stateless, allowing EC2 instances to be added or removed without session loss, which improves both availability and scalability. Option B (Auto Scaling alone) is wrong because without external session storage, scaling out will cause new instances to lack existing session data, and terminating instances will lose sessions. Option C (sticky sessions) is wrong because it only routes a user to the same instance, but if that instance fails, the session is lost.

Option D (larger instances) is wrong because it does not address scalability; it only increases capacity of individual instances, but does not allow for horizontal scaling or improve availability beyond a single instance.

270
MCQhard

A company uses Amazon DynamoDB with on-demand capacity. They notice that a specific table frequently exceeds the write throughput limit and experiences throttling. The table has a partition key with high cardinality. What is the MOST likely cause of throttling?

A.A sudden spike in write traffic exceeds the table's burst capacity
B.The table is using DynamoDB Accelerator (DAX) for writes
C.The write workload exceeds the table's provisioned write capacity
D.The table has auto scaling disabled
AnswerA

On-demand tables have a throughput limit based on previous traffic; spikes beyond that cause throttling.

Why this answer

On-demand DynamoDB tables can handle traffic spikes up to double the previous peak. If write traffic exceeds that threshold, throttling occurs. The table's burst capacity is limited to the previous peak for on-demand, so a sudden spike exceeding that will cause throttling.

Option B is incorrect because DAX is a caching layer for reads, not writes, and does not affect write throughput. Option C is incorrect because the table is using on-demand capacity, not provisioned; on-demand does not have provisioned write capacity. Option D is incorrect because auto scaling is not applicable for on-demand tables; on-demand automatically scales, but still has a limit based on previous peak.

271
MCQhard

A company has a multi-account strategy using AWS Organizations. They want to enforce that all newly created S3 buckets in any account have server-side encryption enabled. What is the most scalable solution?

A.Configure AWS CloudFormation StackSets to deploy a bucket creation template with encryption.
B.Apply a service control policy (SCP) that denies PutBucketEncryption with no encryption.
C.Create an AWS Config rule in each account to remediate non-compliant buckets.
D.Use AWS CloudTrail to detect bucket creation and trigger a Lambda function to enable encryption.
AnswerB

SCPs can enforce policies across all accounts in the organization.

Why this answer

Using an SCP in AWS Organizations to deny creation of buckets without encryption is the most scalable solution, as it applies to all accounts in the organization. Option B is correct. Option A is per-account.

Option C is reactive. Option D is not scalable across accounts.

272
Multi-Selecthard

A company has a mission-critical application running on Amazon RDS for PostgreSQL. The database experiences high read traffic that causes performance degradation. The company wants to improve read scalability without modifying the application. Which THREE solutions should a solutions architect recommend?

Select 3 answers
A.Implement an Amazon ElastiCache cluster to cache frequently accessed data.
B.Deploy a Multi-AZ RDS instance for automatic failover.
C.Create one or more read replicas of the RDS instance and configure the application to use the reader endpoint.
D.Implement database sharding by splitting the data across multiple RDS instances.
E.Use Amazon RDS Proxy to manage database connections and reduce load.
AnswersA, C, E

Caching reduces database read load, and the application can be modified to read from cache without major changes if using a caching layer.

Why this answer

Options A, C, and E are correct. Amazon ElastiCache reduces database load by caching frequently accessed data. Read replicas offload read traffic from the primary database.

RDS Proxy helps manage database connections and reduce load on the database. Option B (Multi-AZ) provides high availability and automatic failover but does not improve read scalability. Option D (database sharding) requires application modifications and is not the recommended approach for read scalability without modifying the application.

273
Multi-Selecteasy

A company uses AWS CloudFormation to manage infrastructure. The operations team wants to ensure that all future stack updates follow best practices for change management. Which THREE actions should the team implement?

Select 3 answers
A.Enable drift detection to identify resources that have changed outside of CloudFormation.
B.Use IAM policies to restrict who can update stacks and require approval.
C.Use nested stacks to reuse templates across multiple environments.
D.Apply a stack policy to protect critical resources from accidental updates.
E.Require change sets to be created and reviewed before executing stack updates.
AnswersB, D, E

IAM policies control who can perform stack updates.

Why this answer

Options B, D, and E are correct. IAM policies enforce least privilege and require approval for updates (B), stack policies protect critical resources from accidental changes (D), and change sets allow review and approval before execution (E). Option A (drift detection) is a monitoring tool, not a change management control.

Option C (nested stacks) promotes template reuse but does not enforce change management processes.

274
MCQeasy

A company is using AWS CloudFormation to manage infrastructure. The operations team wants to be notified when a stack operation fails. Which approach is the MOST efficient?

A.Create a scheduled CloudWatch Events rule that calls the DescribeStacks API and sends an alert if status is FAILED
B.Configure an SNS topic as a notification option in the CloudFormation stack
C.Use a Lambda function that is invoked by CloudFormation via custom resource
D.Use Amazon EventBridge to monitor CloudFormation API calls and trigger a Lambda function
AnswerB

CloudFormation sends real-time notifications on stack events.

Why this answer

CloudFormation can directly publish to SNS topics on stack events, including failures. Option A is inefficient because it requires polling. Option C is not native.

Option D is expensive and complex.

275
MCQeasy

A development team deploys a web application on Amazon EC2 instances behind an Application Load Balancer. The application experiences intermittent 503 errors. A Solutions Architect notices that the errors coincide with high CPU utilization on the EC2 instances. What is the MOST effective way to improve the application's availability?

A.Increase the idle timeout setting on the Application Load Balancer.
B.Decrease the health check interval on the Application Load Balancer.
C.Configure an Auto Scaling group for the EC2 instances with a scaling policy based on average CPU utilization.
D.Use larger EC2 instance types to handle the load.
AnswerC

Auto Scaling dynamically adds/removes instances based on demand, maintaining availability and reducing 503 errors.

Why this answer

An Auto Scaling group with a scaling policy based on average CPU utilization dynamically adds or removes EC2 instances to handle load spikes, reducing 503 errors. Option A is wrong because increasing the idle timeout on the ALB does not address high CPU utilization on the instances. Option B is wrong because decreasing the health check interval may cause premature instance replacement without resolving the underlying capacity issue.

Option D is wrong because using larger instance types may help but does not provide dynamic scaling and may be less cost-effective; it does not automatically adjust to fluctuating demand.

276
MCQmedium

An IAM policy is attached to a user. What is the result when the user tries to upload an object with SSE-KMS encryption?

A.The upload succeeds because the Deny statement has no Principal specified.
B.The upload is denied only if the object is larger than 5 GB.
C.The upload succeeds because the user has an Allow for s3:PutObject.
D.The upload is denied because the Deny statement applies to all uploads.
AnswerD

The Deny is unconditional.

Why this answer

The explicit Deny statement without any condition applies to all uploads, overriding any Allow statements. Option A is incorrect because the Deny statement still applies even without a Principal (since it's attached to the user). Option B is incorrect because there is no size condition; the Deny applies to all uploads regardless of size.

Option C is incorrect because the explicit Deny overrides the Allow for s3:PutObject.

277
Multi-Selecteasy

A company is using AWS CloudFormation to deploy infrastructure. They want to ensure that updates to a stack do not cause downtime for a critical web application. Which THREE strategies should they consider? (Choose THREE.)

Select 3 answers
A.Use the DeletionPolicy attribute to retain resources.
B.Apply a stack policy to protect critical resources.
C.Use a rolling update strategy with an appropriate batch size.
D.Use Change Sets to preview stack updates.
E.Use nested stacks to isolate components.
AnswersB, C, D

Stack policies prevent accidental updates to protected resources.

Why this answer

The correct answers are B, C, D. Option B: Apply a stack policy to protect critical resources. A stack policy is an IAM resource-based policy that controls which stack resources can be updated or deleted.

By setting a stack policy with a Deny for updates on critical resources, you prevent accidental modification during stack updates, thus reducing downtime risk. Option C: Use a rolling update strategy with an appropriate batch size. When updating an Auto Scaling group or other resources that support rolling updates, you can configure the update policy to update instances in batches.

This minimizes downtime by ensuring that only a portion of the instances are replaced at a time, keeping the application available. Option D: Use Change Sets to preview stack updates. Change sets allow you to review the changes that will be made to your stack before executing them.

This helps identify potential issues or unintended modifications that could cause downtime, giving you a chance to reject the changes. Option A is incorrect because the DeletionPolicy attribute is used to preserve or back up resources when a stack is deleted, not during updates. It does not prevent downtime during updates.

Option E is incorrect because nested stacks help organize resources into reusable components but do not inherently prevent downtime during updates; they are a management and modularity tool, not a downtime prevention strategy.

278
MCQmedium

A company uses AWS CloudFormation to deploy infrastructure. A stack update fails with a resource update failure. The team wants to investigate the specific error without rolling back the stack. What is the BEST approach?

A.Rerun the stack update with the --disable-rollback flag and then describe the stack events.
B.Delete the stack and review the CloudFormation logs.
C.Create a change set to preview the updates.
D.Use the AWS CLI describe-stack-resources command to see the status of each resource.
AnswerA

Rerunning with --disable-rollback prevents rollback and allows you to describe stack events to find the specific error reason.

Why this answer

Using the --disable-rollback flag when rerunning the update prevents the stack from rolling back on failure, allowing the team to describe stack events and investigate the specific error without losing the failed state. Option B is incorrect because deleting the stack would remove the failure logs and prevent investigation. Option C is incorrect because a change set is used to preview updates before execution, not to troubleshoot a failure that has already occurred.

Option D is incorrect because describe-stack-resources only shows resource status (e.g., CREATE_FAILED) but does not provide the detailed error reason; you need stack events to see the specific error message.

279
MCQmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). They have configured an Auto Scaling group with a dynamic scaling policy based on CPU utilization. During a traffic spike, the Auto Scaling group launches new instances, but users report slow response times. What should the company do to improve the scaling responsiveness?

A.Decrease the CPU utilization threshold for scale-out.
B.Increase the cooldown period for the Auto Scaling group.
C.Implement scheduled scaling actions to add capacity before known peak times.
D.Change the scaling policy to step scaling with a higher step adjustment.
AnswerC

Scheduled scaling proactively adds capacity based on expected traffic.

Why this answer

Scheduled scaling can proactively add capacity before known peak times, preventing slow response times during traffic spikes. Option A is incorrect because decreasing the CPU utilization threshold would cause the Auto Scaling group to scale out sooner, which could help with responsiveness but may lead to over-provisioning and increased costs; however, it does not address the slow response times during a spike that has already started. Option B is incorrect because increasing the cooldown period delays subsequent scaling actions, making the system less responsive during a spike.

Option D is incorrect because step scaling with a higher step adjustment is still a reactive measure; it does not add capacity before the spike and may cause abrupt scaling that could overshoot.

280
MCQeasy

A company is using Amazon S3 to store sensitive customer data. The security team requires that all data be encrypted at rest. Currently, the S3 bucket uses server-side encryption with S3 managed keys (SSE-S3). The company wants to use a key stored in AWS KMS for additional control. What is the simplest way to achieve this?

A.Add a lifecycle policy to transition objects to SSE-KMS.
B.Use S3 Batch Operations to copy objects and re-encrypt with SSE-KMS.
C.Change the bucket's default encryption configuration to SSE-KMS.
D.Use a bucket policy to deny uploads without SSE-KMS.
AnswerC

Default encryption applies automatically to all new objects; existing objects remain with SSE-S3.

Why this answer

Changing the default encryption configuration to SSE-KMS automatically encrypts new objects with the specified KMS key without re-uploading existing objects. Option A is incorrect because a lifecycle policy does not change encryption. Option B is incorrect because bucket policies do not control encryption keys.

Option D is incorrect because existing objects are not re-encrypted by default encryption changes.

281
MCQeasy

A company uses Amazon RDS for MySQL with Multi-AZ deployment. The database experiences a failover event. After the failover, the application team notices that the new primary DB instance has higher latency than expected. What is the most likely cause?

A.The read replica in a different region is now serving traffic.
B.The Multi-AZ configuration was disabled during the failover.
C.A pending modification to the DB instance was applied during failover.
D.The DB parameter group was changed to a less efficient configuration.
AnswerC

Pending modifications are applied during failover, which can cause latency.

Why this answer

The most likely cause because during a failover, any pending modifications (e.g., scaling, instance type changes) that were scheduled are applied to the new primary, which can cause a brief performance impact. This is a known behavior in AWS RDS. Option A is incorrect because read replicas in a different region do not affect latency of the primary after failover; Multi-AZ does not use read replicas.

Option B is incorrect because Multi-AZ configuration is not disabled during failover; it remains enabled. Option D is incorrect because DB parameter group changes require a manual reboot, not a failover event.

282
Multi-Selectmedium

A company is using AWS CloudFormation to deploy a web application. The stack creation fails with the error: 'The following resource(s) failed to create: [MyEC2Instance].' The EC2 instance creation failed because of an insufficient IAM permissions error. Which TWO actions should the company take to resolve this issue? (Choose two.)

Select 2 answers
A.Modify the CloudFormation template to use a different instance type.
B.Create a new IAM service role for CloudFormation and assign it to the stack.
C.Update the IAM role associated with the CloudFormation stack to include ec2:RunInstances permission.
D.Grant the user additional IAM permissions to create EC2 instances.
E.Execute a stack update with the corrected IAM role.
AnswersC, E

The CloudFormation service needs permission to create the EC2 instance.

Why this answer

Options C and E are correct. The error indicates that the IAM role used by CloudFormation to create the EC2 instance lacks the ec2:RunInstances permission. Therefore, updating the IAM role to include this permission (C) and then executing a stack update (E) will resolve the issue.

Option A is incorrect because the instance type is not related to the IAM permissions error. Option B is incorrect because creating a new role is unnecessary; updating the existing role suffices. Option D is incorrect because granting permissions to the user does not affect the CloudFormation service role's permissions.

283
MCQmedium

A solutions architect deployed an AWS Lambda function using a deployment package. The function logs the error shown in the exhibit. What is the most likely cause?

A.The deployment package does not include the 'express' npm dependency.
B.The Lambda function has exceeded the maximum memory limit.
C.The Lambda function handler is incorrectly configured.
D.The Lambda execution role does not have permissions to access the module.
AnswerA

The error 'Cannot find module' means the module is missing from the package.

Why this answer

The error indicates that the 'express' module is not found, which means it was not included in the deployment package. Option B is wrong because the function ran, so the handler is correct. Option C is wrong because the Lambda execution role does not affect module availability.

Option D is wrong because the error is a missing module, not a memory issue.

284
MCQmedium

A company uses AWS Lambda to process incoming messages from an SQS queue. The Lambda function is triggered by SQS and processes messages in batches of 10. Recently, the number of messages has increased significantly, and some messages are being processed multiple times. What should a solutions architect do to ensure exactly-once processing?

A.Use a DynamoDB table to store unique message IDs and check for duplicates before processing.
B.Set the Lambda function's reserved concurrency to a higher value to prevent throttling.
C.Increase the visibility timeout of the SQS queue to 30 minutes.
D.Change the SQS queue to a FIFO queue and enable content-based deduplication.
AnswerD

Correct. Using an SQS FIFO queue with content-based deduplication ensures that duplicate messages are not introduced and each message is processed exactly once. Lambda supports SQS FIFO as an event source.

Why this answer

Exactly-once processing is achieved by using an SQS FIFO queue with content-based deduplication. FIFO queues guarantee that a message is delivered exactly once and consumers receive messages in order. Lambda supports SQS FIFO as an event source, though it has lower throughput limits.

Option A (DynamoDB-based idempotency) also works but adds complexity and cost. Option B (increasing reserved concurrency) only helps with scaling but does not prevent duplicates if a message is processed but the function fails after processing. Option C (increasing visibility timeout) delays reprocessing but does not guarantee exactly-once if the function is throttled or fails.

285
MCQeasy

A company uses AWS CloudFormation to manage infrastructure. They want to update a stack that fails due to a resource limit exceeded error. Which approach minimizes downtime while fixing the issue?

A.Manually modify the resource to reduce its capacity and then continue the update.
B.Create a change set that replaces the resource causing the limit error with a smaller instance type.
C.Roll back the stack update and ignore the error.
D.Delete the stack and recreate it with the corrected template.
AnswerB

A change set allows you to review and execute the update with minimal downtime.

Why this answer

Creating a change set that replaces the resource causing the limit error with a smaller instance type allows the update to proceed without manual intervention, minimizing downtime. Option A is wrong because manually modifying the resource can cause stack drift and may not be safe. Option C is wrong because rolling back does not resolve the underlying resource limit issue.

Option D is wrong because deleting and recreating the stack would cause significant downtime.

286
MCQmedium

A company has a serverless application using AWS Lambda and Amazon API Gateway. The application experiences cold starts that cause latency spikes. Which solution would reduce the impact of cold starts?

A.Configure Provisioned Concurrency for the Lambda function.
B.Increase the Lambda function memory allocation.
C.Decrease the Lambda function timeout.
D.Use a VPC and enable Lambda to access resources in the VPC.
AnswerA

Ensures a set number of environments are initialized and ready.

Why this answer

Provisioned Concurrency keeps a specified number of execution environments initialized and ready to respond immediately, eliminating cold starts for the configured concurrency level. Option B (increasing memory) can reduce cold start duration but does not eliminate it. Option C (decreasing timeout) does not affect cold starts.

Option D (enabling VPC access) typically adds network latency and may worsen cold starts due to ENI creation.

287
MCQmedium

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application uses an Amazon RDS MySQL Multi-AZ DB instance. During a recent load test, the application became unresponsive for several minutes. The monitoring shows that the RDS instance CPU utilization spiked to 100% during the test. The application reads and writes to the same database. Which design change would provide the BEST improvement in database scalability and reduce CPU contention?

A.Create RDS read replicas for the DB instance and route read queries from the application to the replicas.
B.Configure an in-memory cache like Amazon ElastiCache to cache frequent queries.
C.Increase the instance size of the RDS DB instance to a larger instance type.
D.Enable Multi-AZ for the RDS instance to distribute the load across two instances.
AnswerA

Read replicas offload read traffic, reducing CPU on the primary.

Why this answer

Creating RDS read replicas offloads read queries from the primary DB instance, reducing CPU contention from read-heavy workloads. Since the application reads and writes to the same database, directing read traffic to replicas decreases the primary instance's CPU utilization, directly addressing the 100% CPU spike observed during the load test. This improves database scalability by distributing read operations horizontally without altering write capacity.

Exam trap

The trap here is that candidates often confuse Multi-AZ with read replicas, thinking Multi-AZ distributes read traffic, when in fact Multi-AZ only provides a standby replica for failover and does not serve read requests.

How to eliminate wrong answers

Option B is wrong because while an in-memory cache like ElastiCache reduces read load on the database, it does not address CPU contention from write operations or provide the same level of scalability as read replicas for read-heavy workloads; it is a complementary solution, not the best improvement for database scalability in this scenario. Option C is wrong because scaling vertically (increasing instance size) provides only a temporary fix and does not improve scalability; it increases cost without addressing the root cause of read contention, and the CPU spike could recur under higher load. Option D is wrong because enabling Multi-AZ provides high availability and failover support, not load distribution; the standby instance in a Multi-AZ deployment is not active for reads or writes, so it does not reduce CPU contention on the primary instance.

288
MCQhard

A company is experiencing increased latency in their web application running on EC2 instances behind an Application Load Balancer. The application uses an RDS MySQL database. The CloudWatch metrics show elevated CPU utilization on the database instance during peak hours. Which design change would be MOST effective to reduce database load without application code changes?

A.Add a second RDS read replica to distribute read traffic.
B.Upgrade the RDS instance to a larger instance type with more vCPUs.
C.Implement an ElastiCache for Redis cluster to cache frequently accessed data.
D.Enable RDS Proxy to manage database connections.
AnswerD

RDS Proxy improves connection management but does not reduce CPU load from queries.

Why this answer

RDS Proxy is a database proxy that manages connection pooling, reducing the CPU overhead associated with opening and closing many database connections. It requires only a change in the database endpoint configuration, not application code changes, making it the most effective solution that satisfies the requirement of no code changes. Option A (read replica) would require application changes to direct read traffic to the replica.

Option B (upgrading instance type) vertically scales the database but does not reduce the load; it only provides more capacity to handle the same load. Option C (ElastiCache for Redis) reduces database read load by caching frequent queries, but implementing it typically requires application code modifications to integrate the caching logic, which conflicts with the stem's requirement.

289
MCQhard

A gaming company uses Amazon DynamoDB as the database for a leaderboard feature. The table has a partition key of 'game_id' and a sort key of 'score'. The table uses on-demand capacity mode. During a new game launch, write traffic to a few popular game_id partitions becomes very hot, causing throttling. The company wants to improve performance for these hot partitions without changing the application code. What should they do?

A.Add a global secondary index with a different partition key.
B.Enable DynamoDB Accelerator (DAX) for the table to cache frequently accessed data.
C.Switch to provisioned capacity and increase read/write capacity units for the table.
D.Implement an Amazon SQS queue to buffer write requests.
AnswerD

Amazon SQS buffers write requests, allowing them to be processed at a steady rate, reducing the likelihood of throttling on hot partitions.

Why this answer

Amazon SQS can buffer write requests to DynamoDB, smoothing out traffic spikes and reducing throttling on hot partitions. The SQS queue decouples the application from DynamoDB, allowing writes to be processed at a manageable pace. Option A is incorrect because adding a GSI does not reduce write load on the base table's partitions.

Option B is incorrect because DAX is a read cache and does not help with write throttling. Option C is incorrect because switching to provisioned capacity does not resolve per-partition throttling limits; hot partitions still have a maximum throughput regardless of table-level capacity.

290
Multi-Selecthard

A company runs a critical application on EC2 instances in an Auto Scaling group. They want to ensure that during a patching cycle, the application remains available and no requests are dropped. Which TWO strategies should they implement? (Choose TWO.)

Select 2 answers
A.Increase the desired capacity of the Auto Scaling group before patching.
B.Stop all instances at the same time to apply patches consistently.
C.Perform a rolling update using a batch size of 50% with a pause time.
D.Use an Auto Scaling lifecycle hook to wait for a custom action before terminating instances.
E.Use Amazon Inspector to automatically patch instances.
AnswersC, D

Rolling update ensures that only a portion of instances are replaced at a time.

Why this answer

(rolling update with a batch size of 50% and pause time) is correct because it gradually replaces instances, allowing the application to remain available during patching. Option D (lifecycle hook for custom action before termination) is correct because it can drain connections gracefully before an instance is terminated. Option A is wrong because increasing desired capacity does not guarantee no dropped requests during patching and may cause additional cost.

Option B is wrong because stopping all instances simultaneously causes downtime. Option E is wrong because Amazon Inspector only identifies vulnerabilities but does not apply patches.

Exam trap

Candidates often confuse rolling updates with blue/green deployments or think lifecycle hooks are only for instance launch, not termination.

291
Multi-Selecthard

A company is using AWS CloudTrail to log API activity. The security team wants to ensure that log files are tamper-proof and can be used for forensic analysis. Which TWO actions should the company take?

Select 2 answers
A.Enable S3 Object Lock on the CloudTrail S3 bucket.
B.Enable CloudTrail log file validation.
C.Use server-side encryption with AWS KMS managed keys (SSE-KMS).
D.Enable S3 Transfer Acceleration on the CloudTrail S3 bucket.
E.Set an S3 Lifecycle policy to transition logs to Amazon S3 Glacier.
AnswersA, B

Prevents deletion and overwrites.

Why this answer

S3 Object Lock prevents objects from being deleted or overwritten, ensuring tamper-proof logs. Option B is correct because CloudTrail log file validation creates digest files that allow integrity verification. Option C is incorrect because server-side encryption with KMS protects data at rest but does not prevent tampering or deletion.

Option D is incorrect because S3 Transfer Acceleration speeds up uploads but does not provide security. Option E is incorrect because lifecycle policies transition objects to cheaper storage classes but do not prevent modification or deletion.

292
MCQmedium

Refer to the exhibit. An IAM policy is attached to an IAM group. When a user in the group tries to start a stopped EC2 instance with the tag 'Environment: production', the action fails. What is the MOST likely reason?

A.The policy is attached to a group, not directly to the user.
B.The user does not have MFA enabled.
C.The policy does not allow 'ec2:StartInstances' on all resources.
D.The 'ec2:StartInstances' action does not support resource-level conditions.
AnswerD

StartInstances only supports instance-level conditions, but the condition is on the resource tag; however, the condition must be on the request, not resource, for such actions.

Why this answer

The policy includes a condition requiring the resource tag 'Environment: production', but the ec2:StartInstances action does not support resource-level condition keys (like ec2:ResourceTag). Therefore, the condition is never evaluated, and the action is denied by default. Option A is incorrect because attaching the policy to a group effectively applies it to all group members.

Option B is incorrect because the policy does not require MFA. Option C is incorrect because the policy does allow ec2:StartInstances on specific resources, but the condition is the issue.

293
MCQeasy

A company runs a critical application on Amazon EC2 instances in an Auto Scaling group. The application needs to maintain a fixed number of instances and should automatically replace any unhealthy instance. Which scaling policy should be used?

A.Scheduled scaling policy
B.Simple scaling policy
C.Target tracking scaling policy
D.Manual scaling with health check replacement
AnswerD

Manual scaling sets the desired capacity and health checks replace unhealthy instances.

Why this answer

A manual scaling policy set to maintain a fixed number of instances combined with health checks ensures that unhealthy instances are replaced.

294
MCQhard

A company has a VPC with a public subnet and a private subnet. An EC2 instance in the private subnet needs to download patches from the internet. The instance does not have a public IP. What is the most secure way to provide internet access?

A.Create a VPC endpoint for the internet.
B.Launch a NAT instance in the private subnet.
C.Attach an Internet Gateway directly to the private subnet.
D.Add a NAT Gateway in the public subnet and update the private subnet's route table.
AnswerD

NAT Gateway provides outbound internet access securely.

Why this answer

A NAT Gateway in a public subnet enables instances in a private subnet to initiate outbound internet traffic for tasks like downloading patches, while preventing inbound connections from the internet. Option A is incorrect because a VPC endpoint is used for private connectivity to AWS services, not for general internet access. Option B is incorrect because a NAT instance is less managed and secure than a NAT Gateway, and it must be placed in a public subnet.

Option C is incorrect because an Internet Gateway is attached to the VPC, not directly to a subnet, and attaching it to a private subnet would not function correctly and could expose the instance to inbound traffic.

295
MCQhard

A company runs a critical application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application experiences intermittent latency spikes. The operations team has enabled detailed CloudWatch metrics and logs, but cannot identify the root cause. What is the MOST effective way to troubleshoot the latency issue?

A.Enable detailed ALB metrics and create a CloudWatch dashboard.
B.Migrate the application to AWS Lambda to eliminate EC2 overhead.
C.Replace the ALB with a Network Load Balancer (NLB) for lower latency.
D.Use AWS X-Ray to trace requests from the ALB to the application and downstream services.
E.Add more EC2 instances behind the ALB to distribute the load.
AnswerD

X-Ray provides end-to-end tracing to pinpoint latency sources.

Why this answer

AWS X-Ray provides end-to-end tracing of requests from the ALB to the EC2 instances and downstream services, allowing the team to identify the specific component causing latency spikes. Option A is wrong because detailed ALB metrics only provide aggregate data, not per-request traces. Option B is wrong because migrating to Lambda would not necessarily resolve latency and adds significant architectural change.

Option C is wrong because a Network Load Balancer operates at Layer 4 and does not provide application-level tracing or visibility. Option E is wrong because while adding instances might reduce load, it does not help identify the root cause of intermittent latency spikes.

296
MCQmedium

A solutions architect runs the above commands for an EC2 instance. The instance state is 'running' but the system status is 'impaired'. What should the solutions architect do to restore the instance?

A.Start the instance.
B.Stop and start the instance.
C.Modify the instance type.
D.Reboot the instance.
AnswerB

Stop/start migrates the instance to new hardware.

Why this answer

When the system status check fails, it indicates a hardware issue. AWS recommends stopping and starting the instance to move it to new underlying hardware. Option A is incorrect because the instance is already running, so starting it does nothing.

Option C is incorrect because modifying the instance type does not resolve underlying hardware issues. Option D is incorrect because rebooting the instance does not change the underlying hardware and may not resolve the impairment.

297
MCQmedium

A company is running a web application on Amazon EC2 instances behind an Application Load Balancer. The application is experiencing high latency. A Solutions Architect reviews the CloudWatch metrics and notices that the ALB's SurgeQueueLength is consistently high. What does this indicate, and how should the architect respond?

A.The ALB is buffering requests because the backend instances are overwhelmed; increase the number of instances or improve instance performance.
B.The backend instances are failing health checks; review the health check configuration.
C.Clients are sending too many requests; implement API rate limiting.
D.The ALB is experiencing a high number of new connections; increase the idle timeout setting.
AnswerA

SurgeQueueLength indicates request buffering; scaling out the backend will reduce latency.

Why this answer

A high SurgeQueueLength means the ALB is receiving more requests than the healthy instances can handle, causing queuing. Option B is wrong because surge queue is for HTTP requests, not connections. Option C is wrong because it is not a client-side issue.

Option D is wrong because the queue is at the ALB level, not instance level.

298
MCQhard

A company runs a customer-facing web application on EC2 instances behind an Application Load Balancer. The application stores session data in an RDS MySQL database. Recently, they have been experiencing increased latency and occasional timeouts during peak hours. The operations team has observed that the RDS instance's CPU utilization is consistently above 80%, and the number of database connections is near the maximum allowed. The application code is not easily modifiable in the short term. The company needs a solution that reduces the load on the database with minimal changes to the application. What should a solutions architect recommend?

A.Increase the RDS instance size to a larger instance type.
B.Create an RDS read replica and offload read traffic to it.
C.Implement an Amazon ElastiCache cluster and modify the application to cache frequent queries.
D.Migrate the database to Amazon Aurora with Multi-AZ.
AnswerC

Caching reduces database load and can be done with minimal code changes if using a caching abstraction.

Why this answer

Implementing an in-memory cache like Amazon ElastiCache can offload frequent read queries from the database, reducing CPU utilization and the number of connections. This can be achieved with minimal code changes if the application uses caching libraries or can be configured to use a caching layer for session data or frequently accessed data. Option A is incorrect: increasing the RDS instance size might temporarily alleviate CPU pressure but does not reduce the number of connections and is not a scalable solution; it also requires downtime for resizing.

Option B is incorrect: creating an RDS read replica offloads read traffic but does not reduce write load or the connection count on the primary instance; session data typically involves both reads and writes, so a read replica would not significantly help with the primary's CPU or connection limit. Option D is incorrect: migrating to Amazon Aurora Multi-AZ provides better performance and high availability, but the migration process is not minimal and does not directly reduce the load on the database; it also does not address the connection limit issue.

299
MCQhard

A company has a hybrid architecture with an AWS Direct Connect connection to its on-premises data center. The company wants to improve network availability and ensure that if the Direct Connect fails, traffic automatically uses a VPN backup. Which configuration should the company implement?

A.Use a NAT gateway to route traffic through the internet as a backup.
B.Configure a Direct Connect gateway and attach a VPN to it, then advertise the same prefixes via BGP with lower priority on the VPN.
C.Create a Site-to-Site VPN connection and update route tables to point all traffic to the VPN.
D.Set up a second Direct Connect connection from a different provider.
AnswerB

Allows automatic failover to VPN if Direct Connect fails.

Why this answer

AWS VPN CloudHub provides a hub-and-spoke model for multiple VPN connections, but for failover, using BGP with Direct Connect and VPN as backup is standard. However, the best answer is to use a Direct Connect gateway with a VPN attachment for failover. Option A is wrong because it adds latency.

Option C is wrong because it bypasses Direct Connect. Option D is wrong because it does not provide automatic failover.

300
Multi-Selecthard

A company is designing a serverless event-driven application using AWS Lambda. The application processes messages from an Amazon SQS queue. The team needs to ensure that messages are processed in order and exactly once. Which THREE steps should be taken?

Select 3 answers
A.Enable Lambda function's batch window to 0.
B.Configure the Lambda event source mapping to use the FIFO queue.
C.Use a standard SQS queue.
D.Set the Lambda function's reserved concurrency to 1.
E.Use a FIFO SQS queue with a message deduplication ID.
AnswersB, D, E

The event source mapping must be configured to read from the FIFO queue.

Why this answer

To achieve message ordering and exactly-once processing with Lambda and SQS, you must use a FIFO queue (option B) because FIFO queues preserve the order of messages. Additionally, enable the queue's content-based deduplication or provide a deduplication ID (option E) to prevent duplicate messages from being processed. Finally, set the Lambda function's reserved concurrency to 1 (option D) to ensure that only one instance of the function processes messages at a time, maintaining the order.

Option A (batch window 0) is incorrect because it would cause Lambda to wait longer, but does not help with ordering. Option C (standard queue) does not guarantee ordering or deduplication.

← PreviousPage 4 of 6 · 410 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Continuous Improvement questions.