A company is using the AWS Cloud Development Kit (AWS CDK) to develop a microservices-based application. The company needs to create reusable infrastructure components for three environments: development, staging, and production. The components must include networking resources, database resources, and serverless compute resources.
The company must implement a solution that provides consistent infrastructure across environments while offering the option for environment-specific customizations. The solution also must minimize code duplication.
Which solution will meet these requirements with the LEAST development overhead?
A. Create custom Level 1 (L1) constructs out of Level 2 (L2) constructs where repeatable patterns exist. Create a single set of deployment stacks that takes the environment name as an argument upon instantiation. Deploy CDK applications for each environment.
B. Create custom Level 1 (L1) constructs out of Level 2 (L2) constructs where repeatable patterns exist. Create separate deployment stacks for each environment. Use the CDK context command to determine which stacks to run when deploying to each environment.
C. Create custom Level 3 (L3) constructs out of Level 2 (L2) constructs where repeatable patterns exist. Create a single set of deployment stacks that takes the environment name as an argument upon instantiation. Deploy CDK applications for each environment.
D. Create custom Level 3 (L3) constructs out of Level 2 (L2) constructs where repeatable patterns exist. Create separate deployment stacks for each environment. Use the CDK context command to determine which stacks to run when deploying to each environment.
Show Answer
Correct Answer: C
Explanation: Level 3 (L3) constructs are custom, reusable patterns built from lower-level constructs such as L2 constructs, making them appropriate for encapsulating networking, database, and serverless infrastructure. Using a single set of deployment stacks parameterized by environment enables consistent infrastructure with environment-specific customization while minimizing code duplication. Separate stacks for each environment increase maintenance overhead, and L1 constructs are low-level CloudFormation resources rather than reusable patterns.
Question 13
A company runs an application on an Amazon Elastic Container Service (Amazon ECS) service by using the AWS Fargate launch type. The application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application can take several minutes to process each message from the queue. When the application processes a message, the application reads a file from an Amazon S3 bucket and processes the data in the file. The application writes the processed output to a second S3 bucket. The company uses Amazon CloudWatch Logs to monitor processing errors and to ensure that the application processes messages successfully.
The SQS queue typically receives a low volume of messages. However, occasionally the queue receives higher volumes of messages. A DevOps engineer needs to implement a solution to reduce the processing time of message bursts.
Which solution will meet this requirement in the MOST cost-effective way?
A. Register the ECS service as a scalable target in AWS Application Auto Scaling. Configure a target tracking scaling policy to scale the service in response to the queue size.
B. Increase the maximum number of messages that Amazon SQS requests to batch messages together. Use long polling to minimize the number of API calls to Amazon SQS during periods of low traffic.
C. Send messages to an Amazon EventBridge event bus instead of the SQS queue. Replace the ECS service with an EventBridge rule that launches ECS tasks in response to matching events.
D. Create an Auto Scaling group of EC2 instances. Create a capacity provider in the ECS cluster by using the Auto Scaling group. Change the ECS service to use the EC2 launch type.
Show Answer
Correct Answer: A
Explanation: Scaling the ECS Fargate service based on Amazon SQS queue depth allows additional tasks to process message bursts in parallel while keeping costs low during normal traffic. Target tracking with Application Auto Scaling is the standard pattern for queue-processing ECS services. Increasing SQS batch size or long polling reduces API overhead but does not improve throughput. EventBridge is not a replacement for durable queue-based workload buffering in this scenario, and moving to EC2 adds operational overhead and is less cost-effective than Fargate for intermittent bursts.
Question 14
A global company uses Amazon S3 to host its product catalog website in the us-east-1 Region. The company must improve website performance for users across different geographical regions and must reduce the load on the origin server. The company must implement a highly available cross-Region solution that uses Amazon CloudFront.
Which solution will meet these requirements with the LEAST operational effort?
A. Set up multiple CloudFront distributions. Point each distribution to another S3 bucket in a different Region. Use Amazon Route 53 latency-based routing to direct users to the nearest distribution. Enable S3 replication between the S3 bucket in us-east-1 and the S3 bucket in the different Region.
B. Enable CloudFront with Origin Shield in us-east-1. Configure global edge locations. Set up cache behaviors with optimal TTLs for static content and dynamic content. Configure origin failover to an S3 bucket in a different Region. Enable S3 replication between the S3 bucket in us-east-1 and the S3 bucket in the different Region.
C. Enable CloudFront with Origin Shield in us-east-1. Configure Amazon ElastiCache clusters in multiple Regions to serve as a distributed caching layer between CloudFront and the S3 origin. Set up a replication script to synchronize the S3 bucket in us-east-1 to an S3 bucket in a different Region. Use Amazon EventBridge to schedule the script to run once a day.
D. Enable CloudFront with Origin Shield in the eu-west-1 Region. Configure Regional edge caches. Implement AWS Global Accelerator to route requests to the nearest Regional edge location. Enable S3 replication between the S3 bucket in us-east-1 and an S3 bucket in a different Region.
Show Answer
Correct Answer: B
Explanation: A single global CloudFront distribution already uses worldwide edge locations. Origin Shield adds an extra centralized caching layer to reduce origin load, while S3 cross-Region replication plus CloudFront origin failover provides high availability if the primary S3 origin is unavailable. This meets the performance, origin offload, and cross-Region availability requirements with the least operational effort. The other options add unnecessary components or misuse services (multiple distributions with Route 53, ElastiCache for S3 content, or Global Accelerator with CloudFront).
Question 15
A company has a stateless web application that is deployed on Amazon EC2 instances. The EC2 instances are in a target group behind an Application Load Balancer (ALB). Amazon Route 53 manages the application domain.
The company updates the application UI and develops a beta version of the application. The company wants to test the beta version on 10% of its traffic.
Which solution will meet these requirements with the LEAST number of configuration changes?
A. Deploy the beta version to new EC2 instances in a new target group. Associate the new target group with a new ALB. Update the existing Route 53 record to use a weighted routing policy. Add a new Route 53 record that points to the new ALB with the same routing policy. Assign a weight of 90 to the existing record. Assign a weight of 10 to the new record.
B. Deploy the beta version to new EC2 instances in a new target group. Associate the new target group with the same ALB listener rule. Assign a weight of 90 to the existing target group. Assign a weight of 10 to the new target group.
C. Refactor the application to implement a feature flag for the beta version by using AWS AppConfig. Use the feature flag to enable the beta version for 10% of the EC2 instances.
D. Containerize and deploy the application on Amazon Elastic Container Service (Amazon ECS). Use AWS CodeDeploy to deploy the beta version by using the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration.
Show Answer
Correct Answer: B
Explanation: Application Load Balancer supports weighted target groups in listener rules, allowing traffic to be split (for example, 90/10) between two target groups behind the same ALB. Deploying the beta version to a new target group and configuring weights requires fewer changes than introducing a new ALB and Route 53 weighted records, refactoring the application for feature flags, or migrating to ECS/CodeDeploy.
Question 16
A company frequently creates Docker images of an application. The company stores the images in Amazon Elastic Container Registry (Amazon ECR). The company creates both tagged images and untagged images.
The company wants to implement a solution to automatically delete images that have not been updated for a long time and are not frequently used. The solution must retain at least a specified number of images.
Which solution will meet these requirements with the LEAST operational overhead?
A. Use Amazon S3 Lifecycle policies on the ECR repository to automatically delete images based on image age or the absence of tags on the image.
B. Use Amazon ECR lifecycle policies to delete images based on age or the number of images that need to be to retained in the repository.
C. Configure an AWS Lambda function to run a schedule to delete images based on age or the number of images that need to be retained in the repository.
D. Use AWS Systems Manager to run a script by using the aws:executeScript action to automatically delete images based on image age or the absence of tags on the image.
Show Answer
Correct Answer: B
Explanation: Amazon ECR lifecycle policies natively support expiring images based on rules such as image age (since pushed) and retaining only a specified number of images, with separate handling for tagged and untagged images. This is the lowest operational overhead because it is a managed feature and does not require custom code or scheduled automation.
Question 17
A company is developing a web application that runs on Amazon EC2 Linux instances. The application requires monitoring of custom performance metrics. The company must collect metrics for API response times and database query latency across multiple instances.
Which solution will generate the custom metrics with the LEAST operational overhead?
A. Install the Amazon CloudWatch agent on the instances. Configure the agent to collect the custom metrics. Instrument the application to send the metrics to the agent.
B. Use Amazon Managed Service for Prometheus to scrape the custom metrics from the application. Use the Amazon CloudWatch agent to forward the metrics to CloudWatch.
C. Create a custom AWS Lambda function that polls the application endpoints and database at regular intervals. Program the Lambda function to calculate the custom metrics and to send the metrics to Amazon CloudWatch by using PutMetricData API calls.
D. Implement custom logging in the application code to record the custom metrics. Use Amazon CloudWatch Logs Insights to extract and analyze the metrics.
Show Answer
Correct Answer: A
Explanation: The Amazon CloudWatch agent can collect custom application metrics (for example via StatsD or collectd) and publish them to CloudWatch with minimal operational overhead. Instrumenting the application to emit metrics to the agent is simpler than building and maintaining Lambda polling, using log extraction, or introducing a Prometheus stack solely for CloudWatch custom metrics.
Question 18
A company is developing a mobile app that requires extensive automated testing across multiple device types. The company is using AWS CodePipeline for its CI/CD pipeline.
The company must implement a scalable testing solution that can handle increased test loads as the app grows.
Which solution will meet these requirements with the LEAST management overhead?
A. Integrate AWS Device Farm with the pipeline to run the tests and scale as needed.
B. Deploy a fleet of Amazon EC2 instances with various mobile device emulators and auto scaling to run the tests. Create a custom AWS Lambda function to invoke EC2 test runs.
C. Implement a containerized testing solution that uses Amazon Elastic Container Service (Amazon ECS) with auto scaling. Configure the pipeline to invoke an AWS Lambda function to start the test runs on the ECS cluster.
D. Use AWS Lambda functions with custom runtime emulators to run the tests. Integrate the Lambda functions with the pipeline.
Show Answer
Correct Answer: A
Explanation: AWS Device Farm is a fully managed mobile app testing service that integrates with AWS CodePipeline and provides access to a large fleet of real devices. It automatically scales to handle increased testing demand without requiring management of EC2 instances, containers, or custom emulators, resulting in the least operational overhead.
Question 19
A company uses a pipeline in AWS CodePipeline to upload AWS CloudFormation templates to an Amazon S3 bucket. The pipeline uses the templates to deploy CloudFormation stacks that match the names of the templates.
The company has experienced issues when it tries to revert templates to a previous version. To prevent these issues, the company must have the ability to review template modifications before the modifications are deployed to production.
Which solution will meet these requirements with the LEAST operational overhead?
A. Configure a connection in AWS CodeConnections to a Git repository. Store the templates in the Git repository. Configure a pull request workflow to review template modifications. Configure AWS CloudFormation Git sync for the stacks.
B. Add a manual review action in the pipeline to review modifications to the template code before the stack deployments.
C. Update the pipeline to invoke an AWS Lambda function to check the template modifications before the stack deployments.
D. Configure a connection in AWS CodeConnections to a Git repository. Store the templates in the Git repository. Configure the pipeline to include a source action that uses the connection. Add a manual review action to the pipeline to review template modifications before the stack deployments.
Show Answer
Correct Answer: A
Explanation: Using a Git repository with pull request reviews provides version control, easy rollback to previous template versions, and mandatory review before changes are merged. AWS CloudFormation Git sync automatically keeps stacks synchronized with the reviewed repository, eliminating the need to maintain custom pipeline approval or Lambda logic and minimizing operational overhead. A manual approval in CodePipeline alone does not address the underlying version-control and rollback workflow as effectively.
Question 20
A DevOps engineer needs to configure an AWS CodePipeline pipeline that publishes container images to an Amazon Elastic Container Registry (Amazon ECR) repository. The pipeline must wait for the previous run to finish and must run when new Git tags are pushed to a Git repository that is connected to AWS CodeConnections. An existing deployment pipeline needs to run in response to the publication of new container images.
Which solution will meet these requirements?
A. Configure a CodePipeline V2 type pipeline that uses QUEUED mode. Add a trigger filter to the pipeline definition that includes all tags. Configure an Amazon EventBridge rule that matches container image pushes to start the existing deployment pipeline.
B. Configure a CodePipeline V2 type pipeline that uses SUPERSEDED mode. Add a trigger filter to the pipeline definition that includes all branches. Configure an Amazon EventBridge rule that matches container image pushes to start the existing deployment pipeline.
C. Configure a CodePipeline V1 type pipeline that uses SUPERSEDED mode. Add a trigger filter to the pipeline definition that includes all tags. Add a stage at the end of the pipeline to invoke the existing deployment pipeline.
D. Configure a CodePipeline V1 type pipeline that uses QUEUED mode. Add a trigger filter to the pipeline definition that includes all branches. Add a stage at the end of the pipeline to invoke the existing deployment pipeline.
Show Answer
Correct Answer: A
Explanation: The pipeline must wait for previous executions to finish, which requires the CodePipeline V2 QUEUED execution mode. The trigger must respond to Git tag pushes from a CodeConnections source, so the trigger filter should include tags rather than branches. To start an existing deployment pipeline when a new image is published to Amazon ECR, use an Amazon EventBridge rule that matches ECR image push events and triggers the deployment pipeline. V1 pipelines do not support the required queued execution mode and trigger filtering capabilities.
Question 21
A company is running an application on Amazon Elastic Kubernetes Service (Amazon EKS). The company needs to implement comprehensive logging for the control plane and the nodes. The company must analyze API requests to the Kubernetes control plane and must monitor container performance on the nodes.
Which solution will meet these requirements with the LEAST operational overhead?
A. Enable AWS CloudTrail for control plane logging. Deploy Logstash as a ReplicaSet on the nodes to collect logs from the nodes. Use Amazon OpenSearch Service to store and analyze the logs for the control plane and the nodes.
B. Enable control plane logging for the EKS cluster. Send the logs to Amazon CloudWatch. Use CloudWatch Container Insights to collect logs for the nodes and the containers. Use CloudWatch Logs Insights to query and analyze the logs for the control plane and the nodes.
C. Enable API server control plane logging for the EKS cluster. Send the logs to Amazon S3 Deploy Kubernetes Event Exporter to the nodes to collect logs from the nodes. Send the logs to Amazon S3. Use Amazon Athena to query logs for the control plane and the nodes. Use Amazon QuickSight for visualization.
D. Use AWS Distro for OpenTelemetry to collect logs for the control plane and the nodes. Stream all the logs to Amazon Data Firehose. Use Amazon Redshift to analyze the aggregated log data for the control plane and the nodes.
Show Answer
Correct Answer: B
Explanation: Enabling native Amazon EKS control plane logging sends Kubernetes control plane logs (including API server logs for analyzing API requests) to Amazon CloudWatch Logs with minimal setup. CloudWatch Container Insights provides managed collection of node and container performance metrics and logs. CloudWatch Logs Insights can query and analyze both control plane and node/container logs without managing additional infrastructure, resulting in the least operational overhead.
$19
Get all 424 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.