Courseiva

CCNA Continuous Improvement for Existing Solutions Questions

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

376
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer. Users report intermittent slowdowns. CloudWatch metrics show high CPU utilization on the instances. The company wants to improve performance with minimal architectural changes. What should a solutions architect do?

A.Use Amazon ElastiCache to offload database queries.
B.Configure an Auto Scaling group with a dynamic scaling policy based on CPU utilization.
C.Replace the EC2 instances with a larger instance type.
D.Enable Amazon CloudFront in front of the ALB to cache content.
AnswerB

Auto Scaling adds instances during high demand, distributing load and reducing CPU per instance.

Why this answer

Auto Scaling with a dynamic scaling policy based on CPU utilization automatically adds or removes EC2 instances in response to load, handling spikes without manual intervention. This is a minimal architectural change. Option A is wrong because ElastiCache offloads database queries, but the high CPU may be from compute-intensive operations, not database.

Option C is wrong because vertical scaling (larger instances) has an upper limit and may require downtime during resizing. Option D is wrong because CloudFront caches static content at the edge, but it does not reduce CPU load from dynamic requests or compute processing on the instances.

377
MCQmedium

A company's AWS CloudTrail logs are stored in an S3 bucket. A Solutions Architect needs to analyze the logs to identify API calls that created or modified IAM roles in the last 30 days. What is the MOST efficient way to perform this analysis?

A.Use Amazon CloudWatch Logs Insights to query the logs.
B.Use Amazon Athena to run SQL queries on the logs.
C.Use an AWS Lambda function to process the logs and export to Amazon Redshift.
D.Use S3 Select to filter the records.
AnswerB

Athena can directly query CloudTrail logs in S3 using SQL, making it efficient for this analysis.

Why this answer

Amazon Athena enables running SQL queries directly on CloudTrail logs stored in S3 without the need to move or transform data. This is the most efficient method for analyzing historical CloudTrail data. Option A is incorrect because CloudWatch Logs Insights is designed for logs stored in CloudWatch Logs, not for S3-stored CloudTrail logs.

Option C is incorrect because using Lambda to export to Redshift adds unnecessary complexity and cost compared to querying in place with Athena. Option D is incorrect because S3 Select is limited to filtering data within a single object and does not support complex SQL queries across multiple log files.

378
MCQmedium

A company runs a stateful application on EC2 instances in an Auto Scaling group behind a Network Load Balancer (NLB). The application requires that client sessions are maintained to the same instance. The operations team notices that after scaling events, some clients lose their sessions. Which configuration change should the team implement to ensure session persistence?

A.Disable cross-zone load balancing on the NLB.
B.Enable cookie-based stickiness on the NLB listener.
C.Switch to an Application Load Balancer and enable cookie-based stickiness.
D.Enable source IP stickiness on the NLB target group.
AnswerD

NLB target groups can be configured with source IP stickiness, which binds a client's session to a specific target instance based on the client's IP address.

Why this answer

Network Load Balancer (NLB) supports target group stickiness based on source IP address, which ensures that client requests are routed to the same EC2 instance, maintaining session persistence. This is the appropriate method for stateful applications. Option A is incorrect because disabling cross-zone load balancing does not provide stickiness; it only restricts traffic to instances in the same Availability Zone.

Option B is incorrect because NLB does not support cookie-based stickiness; that is a feature of Application Load Balancer. Option C is incorrect because while ALB does support cookie-based stickiness, switching to ALB is unnecessary; NLB already supports source IP stickiness.

Exam trap

Candidates often mistakenly believe that NLB cannot do stickiness or that they must switch to ALB for session persistence. However, NLB supports source IP-based stickiness, which is sufficient for this use case.

379
MCQmedium

A company applies the above IAM policy to an S3 bucket. An IAM user attempts to upload an object without specifying encryption. Will the upload succeed?

A.Yes, because the user can override the policy with s3:PutObjectAcl.
B.Yes, because the bucket has default encryption enabled.
C.No, because the user needs additional permissions.
D.No, because the policy denies the request.
AnswerD

The policy explicitly denies PutObject without AES256 encryption.

Why this answer

The IAM policy denies the s3:PutObject action when the encryption header is not present or does not match AES256. Since the user did not specify encryption, the condition is triggered, and the request is denied. Options A and B are incorrect because policy evaluation occurs before default encryption is applied and ACL permissions cannot override a deny.

Option C is incorrect because the user does not need additional permissions; the policy explicitly denies the request.

380
Multi-Selecthard

A company is migrating a monolithic application to microservices on Amazon ECS. They want to implement a service mesh for observability and traffic management. Which THREE AWS services should they consider?

Select 3 answers
A.Amazon Route 53
B.AWS X-Ray
C.Amazon CloudWatch
D.AWS App Mesh
E.AWS Step Functions
AnswersB, C, D

X-Ray provides distributed tracing.

Why this answer

Options B, C, and D are correct. AWS App Mesh is a service mesh that provides observability and traffic management. AWS X-Ray provides tracing for microservices.

Amazon CloudWatch provides monitoring and logs. Option A is wrong because Amazon Route 53 is DNS, not a service mesh. Option E is wrong because AWS Step Functions is for orchestrating workflows, not service mesh.

381
MCQeasy

A company uses AWS CodePipeline for CI/CD. The deployment stage uses AWS CodeDeploy to deploy to EC2 instances. The team wants to automatically test the application after deployment and roll back if tests fail. Which approach should the team use?

A.Create a separate CodePipeline for testing and use a cross-pipeline trigger to initiate rollback.
B.Add a manual approval step after deployment to run tests manually.
C.Use a CloudWatch alarm to monitor test results and trigger a rollback.
D.Add a test stage in CodePipeline after the deployment stage and configure CodeDeploy to automatically roll back on pipeline failure.
AnswerC

This is correct. Using a CloudWatch alarm to monitor test results allows automatic rollback when tests fail. The test stage can publish metrics to CloudWatch, and if the alarm triggers (e.g., test failure), it can invoke a Lambda function to roll back the deployment via CodeDeploy API.

Why this answer

It allows automatic testing and rollback by integrating CloudWatch alarms. After deployment, a test stage can run tests and publish a custom metric to CloudWatch. If the metric breaches a threshold (indicating test failure), a CloudWatch alarm triggers a rollback action, such as an AWS Lambda function that calls the CodeDeploy API to roll back the deployment.

This approach automates the entire process without manual intervention. Option A is incorrect because creating a separate pipeline introduces unnecessary complexity and cross-pipeline triggers are not straightforward for rollback. Option B is incorrect because manual approval steps require human interaction, which is not automatic.

Option D is incorrect because CodeDeploy cannot automatically roll back based on a pipeline failure; CodeDeploy only rolls back on its own deployment failures, not failures in subsequent pipeline stages. The test stage is part of the pipeline, and if it fails, the pipeline fails, but CodeDeploy's rollback is not triggered by pipeline stage failures.

382
MCQeasy

A company uses Amazon RDS for PostgreSQL and needs to apply a minor version upgrade. They want to minimize downtime. Which approach should they use?

A.Apply the upgrade during the maintenance window
B.Create a read replica, upgrade it, and promote it
C.Use a Multi-AZ deployment and apply the upgrade
D.Modify the DB parameter group to set the version
AnswerC

Using a Multi-AZ deployment and applying the upgrade takes advantage of the built-in failover mechanism: the standby is upgraded first, then a failover occurs, minimizing downtime to just the time needed for the failover (typically less than a minute).

Why this answer

To minimize downtime for a PostgreSQL minor version upgrade on Amazon RDS, the best approach is to use a Multi-AZ deployment and then apply the upgrade. With Multi-AZ, RDS upgrades the standby instance first, then performs a failover, resulting in very minimal downtime (typically under a minute). Option A (maintenance window) can cause longer downtime depending on the window.

Option B (read replica) is more complex and can have a longer cutover time, and is not the most efficient for minor upgrades. Option D (modify parameter group) does not upgrade the engine version.

383
Multi-Selectmedium

A company is running a critical application on Amazon EC2 instances in an Auto Scaling group. The application stores data on an Amazon EBS volume. To improve recovery time in the event of an AZ failure, which TWO actions should the company take? (Choose two.)

Select 2 answers
A.Create an Amazon Machine Image (AMI) from the instance.
B.Use EBS multi-attach to attach the volume to instances in another AZ.
C.Copy the EBS volume to another AZ using the AWS Management Console.
D.Take regular EBS snapshots and copy them to another region.
E.Configure the Auto Scaling group to launch instances in multiple AZs.
AnswersA, E

Creating an AMI provides a pre-configured instance template that can be launched in another AZ quickly, reducing recovery time.

Why this answer

Options A and E are correct. Creating an AMI from the instance (A) allows you to quickly launch a new instance in another AZ with the same configuration, improving recovery time. Configuring the Auto Scaling group to launch instances in multiple AZs (E) ensures that the application is already running in another AZ, minimizing downtime during an AZ failure.

Option B is incorrect because EBS multi-attach is for attaching a volume to multiple instances in the same AZ, not for cross-AZ recovery. Option C is incorrect because you cannot directly copy an EBS volume to another AZ; you must create a snapshot and then create a volume in the target AZ within the same region. Option D is incorrect because copying snapshots to another region is designed for regional disasters, not for within-region AZ failures; for AZ failure, you would restore snapshots within the same region.

384
MCQhard

A company is migrating a legacy application to AWS. The application requires a fixed IP address for whitelisting by a third-party service. The application will run on EC2 instances behind an Application Load Balancer. The company needs a solution that provides a static IP address for outbound traffic. What should a solutions architect do?

A.Replace the ALB with a Network Load Balancer and assign Elastic IPs.
B.Assign an Elastic IP address to the Application Load Balancer.
C.Place the EC2 instances in a private subnet and route outbound traffic through a NAT Gateway with an Elastic IP.
D.Attach an Internet Gateway to the VPC and assign an Elastic IP to it.
AnswerC

NAT Gateway with Elastic IP provides a static source IP for outbound traffic.

Why this answer

A NAT Gateway in a public subnet with an Elastic IP provides a static IP for outbound traffic from instances in private subnets. This allows the third-party service to whitelist that IP address. Option A is incorrect because replacing the ALB with an NLB would affect inbound traffic handling and does not solve outbound static IP requirements.

Option B is incorrect because an Application Load Balancer cannot be assigned an Elastic IP; it uses dynamic IP addresses. Option D is incorrect because an Internet Gateway does not provide a static IP; it allows communication between VPC and internet but does not source traffic from a fixed IP.

385
MCQmedium

A company is running a web application on Amazon EC2 instances behind an Application Load Balancer. The application experiences high latency during peak hours. The company wants to improve performance by enabling HTTP/2. What is the simplest way to achieve this?

A.Configure the EC2 instances to support HTTP/2.
B.Place an Amazon CloudFront distribution in front of the ALB and enable HTTP/2.
C.Enable HTTP/2 on the Application Load Balancer's HTTPS listener.
D.Upgrade the load balancer to a Network Load Balancer.
AnswerC

Enabling HTTP/2 on the ALB's HTTPS listener is the simplest and most direct way to utilize HTTP/2 for the application.

Why this answer

Enabling HTTP/2 on the Application Load Balancer's HTTPS listener is the simplest way to improve performance during peak hours because ALB natively supports HTTP/2 and can be configured directly in the listener settings without additional infrastructure. Option A is incorrect because configuring EC2 instances to support HTTP/2 does not affect the load balancer's protocol handling. Option B is incorrect because adding a CloudFront distribution in front of the ALB is more complex and does not leverage the ALB's built-in HTTP/2 support.

Option D is incorrect because Network Load Balancers do not support HTTP/2; upgrading to NLB would not achieve the desired performance improvement.

386
MCQhard

A company uses AWS CodeBuild to run unit tests. The build process is taking longer than expected. The buildspec.yml file includes a pre-build phase that downloads dependencies from a public repository. What is the most effective way to reduce build time?

A.Configure the build project to use an S3 cache for dependencies.
B.Run the build in parallel across multiple build projects.
C.Increase the compute type of the build environment to use more vCPUs.
D.Reduce the build timeout setting to force faster execution.
AnswerA

Correct. Caching dependencies in S3 prevents repeated downloads, saving significant time.

Why this answer

Caching dependencies in an S3 bucket avoids re-downloading them from the public repository on every build, which is the most effective way to reduce build time as network downloads are typically the bottleneck. Increasing compute resources (Option C) may not help if the bottleneck is network bandwidth, and parallel builds (Option B) are for running multiple builds concurrently, not speeding up a single build. Reducing the build timeout (Option D) does not speed up execution; it just cancels a build that exceeds the limit.

387
MCQhard

A company uses AWS CloudFormation to deploy infrastructure. The team wants to ensure that all resources are tagged with a CostCenter tag. They want to automatically remediate any stack that creates resources without the required tag. Which approach is MOST effective?

A.Create a Lambda function that tags resources after creation.
B.Use IAM policies to require tagging on all resource creation.
C.Use a CloudFormation stack policy with a deny effect for resource creation without tags.
D.Use an AWS Config rule with auto-remediation via SSM Automation.
AnswerD

Correct: An AWS Config rule can evaluate resources as they are created and trigger an SSM Automation document to automatically apply the required CostCenter tag, providing near real-time remediation.

Why this answer

Using an AWS Config rule with auto-remediation via SSM Automation can detect untagged resources in near real-time and automatically apply the required CostCenter tag, ensuring compliance without manual intervention. Option A is incorrect because tagging after creation is reactive and does not prevent untagged resources from existing temporarily. Option B is incorrect because IAM policies cannot enforce tagging across all services consistently, and many services allow resource creation without tags even with IAM restrictions.

Option C is incorrect because CloudFormation stack policies only control updates and deletions, not creation; they cannot prevent the creation of untagged resources.

388
Multi-Selectmedium

A company uses an Amazon RDS for MySQL DB instance. The database is experiencing high read latency. The team wants to improve read performance with minimal application changes. Which TWO actions should the team take? (Choose two.)

Select 2 answers
A.Create one or more read replicas and direct read queries to them.
B.Enable Multi-AZ deployment for failover support.
C.Migrate the database to Amazon Aurora.
D.Increase the max_connections parameter.
E.Increase the DB instance size (e.g., from db.r5.large to db.r5.xlarge).
AnswersA, E

Read replicas offload read traffic, reducing latency.

Why this answer

A: Read replicas offload read queries from the primary instance, reducing read latency with minimal application changes (only need to modify connection strings for read queries). E: Increasing the DB instance size provides more CPU and memory, which can improve query processing and reduce read latency, and does not require application changes beyond a potential brief downtime. C is incorrect because migrating to Aurora is a significant change that requires database migration and possible application modifications, not a minimal change.

B is incorrect because Multi-AZ only provides failover, not read performance improvement. D is incorrect because max_connections does not directly affect read latency.

389
MCQeasy

A company is using Amazon S3 to store critical data. The security team requires that all data at rest be encrypted using AWS KMS with automatic rotation of the customer master key (CMK) every year. What should a solutions architect do to meet this requirement?

A.Use SSE-S3 (Amazon S3-managed keys) and rely on S3's automatic key rotation.
B.Enable S3 default encryption with AWS KMS and enable automatic rotation of the KMS key.
C.Use SSE-C (customer-provided keys) and manage key rotation manually.
D.Use client-side encryption with a KMS CMK and upload the encrypted data.
AnswerB

This ensures all objects are encrypted at rest with a rotating KMS key.

Why this answer

It enables S3 default encryption with AWS KMS and enables automatic rotation of the KMS key, meeting the requirement for encryption at rest with automatic key rotation. Option A is wrong because SSE-S3 uses Amazon S3-managed keys, not KMS, and does not allow automatic rotation of a customer-managed key. Option C is wrong because SSE-C uses customer-provided keys, not KMS, and requires manual key rotation.

Option D is wrong because client-side encryption does not use S3 server-side encryption and does not leverage S3's default encryption settings.

390
MCQhard

A company uses an AWS CodePipeline to deploy a serverless application. The pipeline includes a build stage that runs on AWS CodeBuild and a deploy stage that updates an AWS Lambda function. The company wants to add a manual approval step before the deploy stage. What is the most efficient way to implement this?

A.Add an AWS Lambda function that sends an email for approval.
B.Use an AWS CloudFormation stack with a wait condition.
C.Configure an Amazon SNS topic to notify approvers.
D.Add a manual approval action in the CodePipeline stage before deploy.
AnswerD

CodePipeline supports manual approval actions.

Why this answer

AWS CodePipeline has a built-in manual approval action that can be added as a stage before the deploy stage, providing the most efficient way to add manual approval. Option A is incorrect because using a Lambda function for approval is unnecessarily complex compared to the built-in action. Option B is incorrect because a CloudFormation wait condition is not designed for approval workflows in CodePipeline.

Option C is incorrect because an SNS topic can notify approvers but does not integrate directly as an approval action in CodePipeline; the manual approval action is the native solution.

391
MCQhard

A company has a web application behind an Application Load Balancer that uses sticky sessions. The application is deployed on EC2 instances in an Auto Scaling group. During a deployment, the team notices that users are experiencing errors after new instances are launched. What is the MOST likely cause?

A.The target group's deregistration delay is too short.
B.The stickiness duration is set too long, causing requests to be routed to terminated instances.
C.The Auto Scaling group's scale-in policy is terminating instances with active sessions.
D.The ALB health check is not configured for the new instances.
AnswerC

Stickiness ties sessions to instances; if an instance is terminated, users lose session data. The correct fix is to externalize session state.

Why this answer

The correct answer. The issue occurs during deployment when new instances are launched. With sticky sessions enabled, user sessions are tied to specific instances.

If the Auto Scaling group's scale-in policy terminates instances that have active sessions (e.g., during a rolling update or instance replacement), users lose their session data and experience errors. Option A is incorrect because the deregistration delay is about waiting for in-flight requests to complete, not about session stickiness. Option B is incorrect because if stickiness duration were too long, requests would still be routed to terminated instances, but the issue here is after new instances are launched (scale-out), not scale-in.

Option D is incorrect because health checks are configured and would pass for new healthy instances; the errors stem from missing session data on the new instances.

392
MCQeasy

A company uses AWS Lambda functions to process messages from an Amazon SQS queue. The Lambda function is CPU-bound and takes close to the 15-minute timeout. The operations team notices that the function sometimes times out during peak hours. What is the SIMPLEST way to improve the function's performance?

A.Increase the reserved concurrency of the Lambda function.
B.Increase the batch size in the SQS event source mapping.
C.Use a Lambda function URL instead of SQS invocation.
D.Increase the memory (and CPU) allocation for the Lambda function.
E.Migrate the Lambda function to run on Amazon ECS with Fargate using a larger task size.
AnswerD

Lambda allocates CPU proportionally to memory, so more memory speeds up CPU-bound tasks.

Why this answer

Increasing the Lambda function's memory also increases CPU allocation proportionally, which directly speeds up CPU-bound processing and reduces the chance of timeout during peak hours. Option A is wrong because increasing reserved concurrency only allows more parallel invocations, but does not improve per-invocation performance; it could actually increase load on the same slow function. Option B is wrong because increasing the batch size makes each invocation process more messages, which would further increase processing time and worsen timeouts.

Option C is wrong because using a Lambda function URL changes the invocation source but does not affect CPU allocation or timeout behavior. Option E is wrong because migrating to ECS with Fargate is more complex and not the simplest solution; increasing Lambda memory is a simpler and effective change.

393
MCQhard

A company runs a containerized application on Amazon ECS with Fargate. The application needs to securely access an Amazon S3 bucket. The company wants to follow the principle of least privilege. What should a solutions architect recommend?

A.Define an IAM task role with S3 access policies and reference it in the ECS task definition.
B.Attach an IAM role to the underlying EC2 instance.
C.Assign an IAM role to the ECS service using the ECS service-linked role.
D.Store AWS credentials in the container environment variables.
AnswerA

The task role grants permissions to the container application.

Why this answer

An IAM task role is the recommended mechanism for granting least-privilege permissions to ECS tasks using the Fargate launch type. The task role is defined in the ECS task definition and assumed by the container runtime, allowing the application to securely access the S3 bucket without embedding credentials. This approach follows AWS best practices by scoping permissions to the specific task rather than the underlying infrastructure.

Exam trap

The trap here is that candidates may confuse the ECS service-linked role (used for ECS service management) with the IAM task role (used for granting permissions to the containerized application), or incorrectly assume that Fargate tasks require an underlying EC2 instance role.

How to eliminate wrong answers

Option B is wrong because Fargate does not use underlying EC2 instances; the infrastructure is fully managed by AWS, so attaching an IAM role to an EC2 instance is irrelevant and violates the principle of least privilege by granting permissions to all tasks on that instance. Option C is wrong because the ECS service-linked role (AWSServiceRoleForECS) is used by the ECS service itself to manage resources, not by the containers to access S3; assigning it to the service does not grant permissions to the application code. Option D is wrong because storing AWS credentials in container environment variables is insecure, violates the principle of least privilege, and is unnecessary when IAM task roles provide automatic credential rotation via the AWS STS endpoint.

394
MCQmedium

A company is running a stateful web application on Amazon EC2 instances in an Auto Scaling group. The instances store session data in an Amazon ElastiCache for Redis cluster. The company wants to improve the application's fault tolerance and ensure that session data is not lost if an Availability Zone fails. What should the solutions architect do?

A.Enable Cluster Mode on the ElastiCache for Redis cluster and configure Multi-AZ.
B.Configure the ElastiCache for Redis cluster to have multiple read replicas in the same region.
C.Increase the instance size of the EC2 instances to handle more load.
D.Migrate from ElastiCache for Redis to ElastiCache for Memcached.
AnswerA

Cluster Mode with Multi-AZ provides replication and automatic failover across AZs, protecting against AZ failure.

Why this answer

Enabling Cluster Mode on the ElastiCache for Redis cluster and configuring Multi-AZ provides automatic sharding and replication across Availability Zones. This ensures that session data is not lost if an AZ fails, as replicas in other AZs can take over. Option B is incorrect because read replicas alone do not provide automatic failover or data durability across AZ failures unless Multi-AZ is enabled.

Option C is incorrect because increasing instance size does not protect against AZ failure. Option D is incorrect because ElastiCache for Memcached does not support persistence or replication, so data would be lost on node failure.

395
Multi-Selecthard

A company is using AWS CodePipeline to deploy a web application. The pipeline includes a build stage and a deploy stage. The company wants to add a test stage that runs automated integration tests after the build stage and before the deploy stage. Which THREE actions should the company take? (Choose three.)

Select 3 answers
A.Configure AWS CodeBuild to run the integration tests as part of the test stage.
B.Use AWS CloudFormation to create a test environment.
C.Add a test stage in the CodePipeline between build and deploy.
D.Use an AWS Lambda function to run the integration tests.
E.Set up a manual approval step after the test stage.
AnswersA, C, E

CodeBuild can run test scripts.

Why this answer

Options A, C, and E are correct. Option A: AWS CodeBuild is well-suited for running integration tests as part of a CodePipeline test stage. Option C: Adding a test stage between build and deploy is the correct way to insert testing into the pipeline.

Option E: A manual approval step after the test stage provides a safety checkpoint before deployment. Option B is incorrect because CloudFormation is used for infrastructure provisioning, not for running tests. Option D is incorrect because Lambda functions are not designed for running integration tests directly; they are better for lightweight event-driven tasks.

396
Multi-Selecteasy

A company wants to implement a centralized logging solution for multiple AWS accounts. Which TWO services should be used together?

Select 2 answers
A.Amazon S3
B.AWS CloudTrail
C.Amazon RDS
D.Amazon Athena
E.AWS Config
AnswersA, D

S3 is a durable and cost-effective storage for logs.

Why this answer

Amazon S3 serves as a central log repository, and Amazon Athena allows querying logs directly in S3.

397
MCQeasy

A company has a production AWS account with multiple VPCs connected via a transit gateway. The security team wants to centrally capture all VPC flow logs for analysis in Amazon Athena. What is the MOST cost-effective way to store the flow logs?

A.Publish VPC Flow Logs to an Amazon S3 bucket with S3 Intelligent-Tiering enabled.
B.Publish VPC Flow Logs to both CloudWatch Logs and S3 for redundancy.
C.Use Amazon Kinesis Data Firehose to stream flow logs to an S3 bucket.
D.Publish VPC Flow Logs to Amazon CloudWatch Logs and export them to S3 after 30 days.
AnswerA

S3 is cost-effective for log storage, and Intelligent-Tiering automatically moves data to lower-cost tiers.

Why this answer

VPC Flow Logs can be published directly to S3, and using S3 Intelligent-Tiering optimizes costs for logs that may be accessed infrequently. Option B is wrong because CloudWatch Logs is more expensive for long-term storage. Option C is wrong because Kinesis Data Firehose adds cost and complexity.

Option D is wrong because it duplicates storage.

398
MCQeasy

A company has deployed a web application on Amazon ECS with Fargate. The application needs to access an Amazon RDS database. The security team mandates that the database must not be publicly accessible. What is the best way to securely connect the ECS tasks to the RDS database?

A.Use a NAT gateway to route traffic from ECS tasks to RDS.
B.Attach an internet gateway to the VPC and route through it.
C.Enable public accessibility on the RDS instance and restrict access to the ECS task public IP.
D.Place the ECS tasks and RDS instance in the same VPC, and configure security groups to allow traffic on the database port.
AnswerD

This ensures traffic stays within the VPC.

Why this answer

Placing ECS tasks and RDS in the same VPC allows private communication via security groups. This ensures the database is not publicly accessible. Option A is incorrect because a NAT gateway is for outbound internet access, not for inbound traffic to RDS.

Option B is incorrect because an internet gateway would expose the RDS instance to the internet. Option C is incorrect because enabling public accessibility would violate the security mandate even with IP restrictions.

399
Multi-Selecthard

A company runs a critical application on Amazon RDS for MySQL. They want to implement a disaster recovery (DR) strategy across AWS Regions with a Recovery Point Objective (RPO) of 1 second and Recovery Time Objective (RTO) of 1 minute. Which TWO strategies meet these requirements? (Choose TWO.)

Select 1 answer
A.Use Amazon RDS Multi-AZ deployment in the primary Region with a standby in another Region.
B.Take manual snapshots of the RDS instance every hour and copy them to another Region.
C.Use Amazon Aurora Global Database with a primary in one Region and a secondary in another Region.
D.Use AWS Database Migration Service (DMS) for continuous replication to another Region.
E.Configure cross-Region read replicas for RDS MySQL.
AnswersC

Correct. Amazon Aurora Global Database provides synchronous cross-Region replication and automatic failover, achieving an RPO of 1 second and RTO of 1 minute. This requires migrating from RDS MySQL to Aurora but is a valid strategy.

Why this answer

Amazon RDS Multi-AZ does not support cross-Region standby; it only provides high availability within a single region. Option C is correct: Amazon Aurora Global Database offers synchronous cross-Region replication with automatic failover, typically achieving an RPO of less than 1 second and RTO of 1 minute, although it requires migrating from RDS MySQL to Aurora. Option D is incorrect: AWS DMS with continuous change data capture (CDC) uses asynchronous replication, which cannot guarantee a 1-second RPO.

Option B is incorrect because manual snapshots every hour cannot achieve an RPO of 1 second. Option E is incorrect because cross-Region read replicas use asynchronous replication, so RPO is not guaranteed to be 1 second, and manual promotion takes longer than 1 minute.

Exam trap

The trap here is that cross-Region read replicas are often mistaken for a valid DR solution, but their manual promotion process prevents meeting a 1-minute RTO.

400
Multi-Selecteasy

A company uses AWS Organizations to manage multiple accounts. The security team wants to ensure that all new accounts created through the organization automatically have a specific AWS Config rule enabled that requires S3 buckets to be encrypted. Which TWO actions should the team take?

Select 2 answers
A.Use AWS CloudFormation StackSets to deploy the Config rule to all accounts.
B.Create a Service Control Policy (SCP) that denies PutBucketEncryption actions.
C.Create a conformance pack in the management account and deploy it to the organization.
D.Create an AWS Config rule in the management account that applies to all accounts via AWS Organizations.
E.Enable AWS Config in every account of the organization.
AnswersC, E

Correct. A conformance pack deployed to the organization from the management account applies AWS Config rules to all existing and new accounts.

Why this answer

To automatically enable an AWS Config rule for all new accounts in AWS Organizations, the team should enable AWS Config in every account (Option E) and create a conformance pack in the management account deployed to the organization (Option C). AWS Config conformance packs allow deploying a set of AWS Config rules and remediation actions across accounts via Organizations. Enabling Config in all accounts is a prerequisite for rules to evaluate resources.

Option A (CloudFormation StackSets) can deploy rules but does not automatically enable Config per account. Option B (SCP) denies actions but does not enforce the Config rule itself. Option D (management account rule) would not automatically apply to other accounts unless using conformance packs.

Exam trap

A common trap is confusing conformance packs with individual AWS Config rules. Conformance packs can be deployed organization-wide, but a single rule in the management account does not propagate to all accounts.

401
MCQhard

A media company runs a video processing pipeline on AWS. Videos are uploaded to an S3 bucket (input-bucket), which triggers an AWS Lambda function that starts an AWS Glue job. The Glue job processes the video metadata and stores results in a DynamoDB table. Then, a second Lambda function triggers an Amazon ECS Fargate task to transcode the video into multiple formats. The transcoded videos are stored in another S3 bucket (output-bucket). Recently, the company started receiving complaints about delays in video availability. The operations team notices that CloudWatch Logs show no errors, but the ECS tasks often take longer than expected. They also see that the DynamoDB table has a high number of throttled write events. The video upload rate has increased by 50% in the last month. The team needs to improve the pipeline's performance and reduce delays. What should they do?

A.Enable DynamoDB auto scaling on the table with a target utilization of 70%.
B.Increase the Lambda function timeout for both functions to 15 minutes.
C.Introduce an Amazon SQS queue between the second Lambda and ECS to buffer requests.
D.Set reserved concurrency on the first Lambda function to 10 to control throttling.
AnswerA

Auto scaling will dynamically adjust write capacity to handle increased traffic, reducing throttling.

Why this answer

The primary bottleneck is DynamoDB throttling due to increased write load. Enabling DynamoDB auto scaling (Option A) dynamically adjusts read/write capacity to match demand, reducing throttling and delays. Option B (increasing Lambda timeout) does not address DynamoDB throttling.

Option C (SQS queue) improves decoupling but does not directly solve the DynamoDB issue. Option D (reserved concurrency) limits Lambda concurrency, which could reduce load on DynamoDB but also slows down processing and is not the best solution.

402
MCQhard

A company uses AWS CodePipeline to deploy a web application to Amazon ECS. The deployment often fails because the ECS service's desired count is not met during the update. The company wants to implement a blue/green deployment with automated rollback on failure. What is the MOST effective approach?

A.Use CodePipeline with a Lambda function to swap target groups and monitor health.
B.Use CodeDeploy with an in-place deployment configuration and a manual approval step.
C.Use CodePipeline with ECS rolling update and CloudWatch alarms to trigger rollback.
D.Use CodePipeline with CodeDeploy to perform a blue/green deployment on ECS and configure automatic rollback.
AnswerD

CodeDeploy natively supports blue/green deployments on ECS with traffic shifting and automatic rollback based on CloudWatch alarms.

Why this answer

CodeDeploy with ECS blue/green deployment provides built-in traffic shifting and automated rollback. Option A is wrong because it lacks traffic shifting. Option B is wrong because it does not support blue/green.

Option C is wrong because it lacks automated rollback.

403
MCQeasy

A company is using AWS CloudFormation to deploy infrastructure. The security team requires that all Amazon S3 buckets created by CloudFormation must be encrypted at rest. What should a solutions architect do to enforce this requirement?

A.Enable default encryption on each bucket using SSE-S3.
B.Add an S3 bucket policy that denies s3:PutObject without the x-amz-server-side-encryption header.
C.Require that all buckets use AWS KMS managed keys for encryption.
D.Use a CloudFormation stack policy to prevent modification of bucket encryption settings.
AnswerB

The bucket policy rejects unencrypted uploads.

Why this answer

An S3 bucket policy that denies s3:PutObject unless the request includes the x-amz-server-side-encryption header enforces encryption at rest for all objects uploaded to the bucket. This policy condition works regardless of how the bucket is created, including via CloudFormation, and ensures that any PutObject operation without the required encryption header is rejected, meeting the security team's requirement.

Exam trap

The trap here is that candidates often confuse default encryption (which passively encrypts objects but does not enforce encryption) with a bucket policy that actively denies unencrypted uploads, leading them to choose Option A instead of the correct enforcement mechanism.

How to eliminate wrong answers

Option A is wrong because enabling default encryption on each bucket only applies encryption to objects that are uploaded without specifying encryption headers; it does not prevent unencrypted uploads, as a user could still override the default by explicitly omitting encryption headers. Option C is wrong because requiring AWS KMS managed keys is a specific encryption type, not a mechanism to enforce encryption; it does not block unencrypted uploads and may introduce additional cost and complexity without addressing the enforcement requirement. Option D is wrong because a CloudFormation stack policy prevents modifications to stack resources after deployment but does not enforce encryption on S3 buckets; it cannot block unencrypted PutObject requests at the bucket level.

404
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). Users report intermittent 503 errors. The ALB target group health checks are failing. Which step is MOST likely to resolve the issue?

A.Change the health check protocol from HTTP to HTTPS.
B.Use a Network Load Balancer instead of ALB.
C.Increase the number of instances in the target group.
D.Increase the health check timeout and decrease the unhealthy threshold.
AnswerD

Gives instances more time to respond and reduces sensitivity to transient failures.

Why this answer

Increasing the health check timeout gives instances more time to respond before being marked unhealthy, and decreasing the unhealthy threshold allows more consecutive failed health checks before considering an instance unhealthy, reducing false positives. Option A is incorrect because changing the protocol does not address the underlying cause of health check failures; it might even fail if the application does not support HTTPS. Option B is incorrect because using a Network Load Balancer does not resolve health check failures; NLB health checks are different but still need proper configuration.

Option C is incorrect because simply increasing the number of instances does not fix the health check issue; instances may still fail health checks if they are not healthy.

405
MCQmedium

A Solutions Architect runs the above AWS CLI command and gets the output shown. The instance is 'running' but the application is not accessible. What should the Solutions Architect check next?

A.Check if the instance is terminated.
B.Check if the instance ID is correct.
C.Check the instance status checks.
D.Check the security group rules for the instance.
AnswerD

Security groups act as a virtual firewall.

Why this answer

The instance is running but the application is inaccessible, which often indicates that security group rules are not allowing the required inbound traffic. Option A is wrong because the instance is reported as 'running', so it is not terminated. Option B is wrong because the command output successfully returns instance details, meaning the instance ID is correct.

Option C is wrong because status checks relate to the health of the instance OS and system, not network access.

406
MCQeasy

A company stores sensitive data in Amazon S3. They need to ensure that data is encrypted at rest using a key managed by the company's on-premises hardware security module (HSM). Which S3 encryption option should they use?

A.Server-Side Encryption with Customer-Provided Keys (SSE-C).
B.Client-Side Encryption using the company's own encryption library.
C.Server-Side Encryption with AWS KMS (SSE-KMS).
D.Server-Side Encryption with S3-Managed Keys (SSE-S3).
AnswerB

Client-side encryption allows the company to encrypt data with their own key before uploading to S3.

Why this answer

Client-Side Encryption (B) allows the company to encrypt the data locally using their own encryption keys from the on-premises HSM before uploading to S3. This ensures the HSM manages the key and the company retains full control. Option A (SSE-C) requires the customer to provide a key with each request, but the key is not managed by the on-premises HSM; it is provided per-request and S3 uses it for encryption/decryption.

Option C (SSE-KMS) uses AWS KMS, not the company's HSM. Option D (SSE-S3) uses S3-managed keys, which also do not involve the on-premises HSM.

407
MCQeasy

A company uses AWS CloudFormation to deploy infrastructure. A recent change to a stack failed because an IAM role name already exists. The company wants to avoid this issue in the future. What should a solutions architect do?

A.Enable termination protection on the stack.
B.Use a DeletionPolicy of Retain on the IAM role resource.
C.Create a custom resource with an AWS Lambda function to generate a random role name.
D.Use the Fn::Sub function with a reference to the AWS::StackName in the IAM role name.
AnswerD

This ensures unique role names across stacks.

Why this answer

Using `Fn::Sub` with `!Ref AWS::StackName` makes the IAM role name unique per stack, preventing naming conflicts when stacks are deployed in the same account. Option A is incorrect because enabling termination protection only prevents accidental deletion, not naming conflicts. Option B is incorrect because a `DeletionPolicy` of `Retain` preserves the resource after stack deletion, but does not influence naming uniqueness; a future stack deployment could still encounter the same name conflict.

Option C is incorrect because a custom resource with a Lambda function unnecessarily adds complexity when a simpler built-in function (`Fn::Sub`) serves the purpose.

408
MCQeasy

A company uses AWS CloudFormation to manage infrastructure as code. They have a production stack that includes an EC2 instance, an RDS database, and an S3 bucket. Recently, an engineer manually terminated the EC2 instance from the console. The CloudFormation stack status shows UPDATE_ROLLBACK_FAILED. The company wants to recover the stack to a consistent state. What should they do?

A.Manually recreate the EC2 instance with the same configuration, then tell CloudFormation to continue the update rollback.
B.Create a change set to update the stack to ignore the EC2 instance.
C.Update the stack with a new template that removes the EC2 instance.
D.Delete the stack and recreate it using a new template.
AnswerA

Fixing the drift allows CloudFormation to continue the rollback and reach a consistent state.

Why this answer

When a stack update fails and rolls back, but the rollback itself fails due to a resource (like the EC2 instance) being manually terminated, the stack enters UPDATE_ROLLBACK_FAILED. The recommended recovery is to manually resolve the issue (recreate the EC2 instance with the same configuration) and then use the 'ContinueUpdateRollback' operation to finish the rollback to a consistent state. Option A correctly describes this process.

Option B is incorrect because creating a change set does not address the failed rollback. Option C is incorrect because updating the stack without fixing the underlying drift may fail. Option D is incorrect because deleting and recreating the stack is more drastic and may not be necessary.

409
Multi-Selecthard

A company uses AWS Lambda to process messages from an Amazon SQS queue. The Lambda function is idempotent and processes each message in about 30 seconds. The SQS queue has a visibility timeout of 60 seconds. Recently, the team notices that the same messages are being processed multiple times. Which TWO actions should the team take to prevent duplicate processing?

Select 2 answers
A.Increase the SQS queue's visibility timeout to 6 minutes.
B.Set the Lambda function's reserved concurrency to 1.
C.Switch to a FIFO SQS queue and enable content-based deduplication.
D.Reduce the SQS batch size to 1.
E.Configure a dead-letter queue for the SQS queue.
AnswersA, C

Longer visibility timeout ensures messages are not reprocessed while being handled.

Why this answer

To prevent duplicate processing, the team should increase the SQS queue's visibility timeout to 6 minutes (option A). Since each message takes about 30 seconds to process, the default 60-second visibility timeout is too short; if processing exceeds 60 seconds, the message becomes visible again and is reprocessed. Increasing the timeout to 6 minutes (well above the 30-second processing time) ensures the message remains invisible until processing is complete.

Additionally, switching to a FIFO SQS queue with content-based deduplication (option C) provides exactly-once processing semantics, eliminating duplicates regardless of visibility timeout. Option B is incorrect because reserved concurrency limits the number of concurrent Lambda executions but does not prevent duplicates from visibility timeout issues. Option D is incorrect because reducing batch size limits how many messages are polled at once but does not address the root cause of duplicate processing.

Option E is incorrect because a dead-letter queue handles messages that fail repeatedly, not duplicates.

Exam trap

Candidates may mistakenly choose reducing batch size or setting reserved concurrency, thinking that limiting parallelism stops duplicates. However, duplicates here are caused by insufficient visibility timeout, not by concurrency.

410
MCQhard

A company has a multi-region architecture using DynamoDB global tables. They notice that write conflicts are occurring frequently between regions. What is the MOST likely cause and how should they resolve it?

A.The application is using strongly consistent reads.
B.The DynamoDB write capacity is insufficient.
C.The application is updating the same item in multiple regions concurrently, and the last-writer-wins conflict resolution is causing data loss.
D.The DynamoDB global tables are not properly configured with conflict resolution.
AnswerC

Concurrent updates cause conflicts; LWW may overwrite data.

Why this answer

DynamoDB global tables use last-writer-wins (LWW) conflict resolution, and if the same item is updated concurrently in multiple regions, conflicts occur. Using conditional writes and application-level conflict resolution can help. Option A is wrong because strongly consistent reads are not supported for global tables; they only support eventual consistency.

Option B is wrong because write capacity insufficient would cause throttling, not write conflicts. Option D is wrong because DynamoDB global tables do have automatic conflict resolution via LWW; the issue is not misconfiguration but the concurrent updates.

← PreviousPage 6 of 6 · 410 questions total

Ready to test yourself?

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