A company recently migrated its application to an Amazon Elastic Kubernetes Service
(Amazon EKS) cluster that uses Amazon EC2 instances. The company configured the
application to automatically scale based on CPU utilization.
The application produces memory errors when it experiences heavy loads. The application
also does not scale out enough to handle the increased load. The company needs to collect and analyze memory metrics for the application over time.
Which combination of steps will meet these requirements? (Select THREE.)
Show answerHide answer
Correct answer: A, C, EAttach the Cloud WatchAgentServer Pol icy managed 1AM policy to the 1AM instance
profile that the cluster uses.Collect performance metrics by deploying the unified Amazon CloudWatch agent to the
existing EC2 instances in the cluster. Add the agent to the AMI for any new EC2 instances
that are added to the cluster.Analyze the pod_memory_utilization Amazon CloudWatch metric in the
Containerlnsights namespace by using the Service dimension.
Question 22Choose 3
A company is developing a new application. The application uses AWS Lambda functions
for its compute tier. The company must use a canary deployment for any changes to the
Lambda functions. Automated rollback must occur if any failures are reported.
The company’s DevOps team needs to create the infrastructure as code (IaC) and the
CI/CD pipeline for this solution.
Which combination of steps will meet these requirements? (Choose three.)
Show answerHide answer
Correct answer: B, C, FCreate an AWS Serverless Application Model (AWS SAM) template for the application.
Define each Lambda function in the template by using the AWS::Serverless::Function
resource type. For each function, include configurations for the AutoPublishAlias property and the DeploymentPreference property. Configure the deployment configuration type to
LambdaCanary10Percent10Minutes.Create an AWS CodeCommit repository. Create an AWS CodePipeline pipeline. Use
the CodeCommit repository in a new source stage that starts the pipeline. Create an AWS
CodeBuild project to deploy the AWS Serverless ApplicationModel (AWS SAM) template.
Upload the template and source code to the CodeCommit repository. In the CodeCommit
repository, create a buildspec.yml file that includes the commands to build and deploy the
SAM application.Create an Amazon CloudWatch alarm for each Lambda function. Configure the alarms
to enter the ALARM state if any errors are detected. Configure an evaluation period,
dimensions for each Lambda function and version, and the namespace as AWS/Lambda
on the Errors metric.
Explanation
Explanation: The requirement is to create the infrastructure as code (IaC) and the CI/CD
pipeline for the Lambda application that uses canary deployment and automated rollback.
To do this, the DevOps team needs to use the following steps:
Create an AWS Serverless Application Model (AWS SAM) template for the
application. AWS SAM is a framework that simplifies the development and
deployment of serverless applications on AWS. AWS SAM allows customers to
define Lambda functions and other resources in a template by using a simplified
syntax. For each Lambda function, the DevOps team can include configurations
for the AutoPublishAlias property and the DeploymentPreference property. The
AutoPublishAlias property specifies the name of the alias that points to the latest
version of the function. The DeploymentPreference property specifies how
CodeDeploy deploys new versions of the function. By configuring the deployment
configuration type to LambdaCanary10Percent10Minutes, the DevOps team can
enable canary deployment with 10% of traffic shifted to the new version every 10
minutes.
Create an AWS CodeCommit repository. Create an AWS CodePipeline pipeline.
Use the CodeCommit repository in a new source stage that starts the pipeline.
Create an AWS CodeBuild project to deploy the AWS SAM template. CodeCommit
is a fully managed source control service that hosts Git repositories. CodePipeline
is a fully managed continuous delivery service that automates the release process
of software applications. CodeBuild is a fully managed continuous integration
service that compiles source code and runs tests. By using these services, the
DevOps team can create a CI/CD pipeline for the Lambda application. The pipeline should use the CodeCommit repository as the source stage, where the
DevOps team can upload the SAM template and source code. The pipeline should
also use a CodeBuild project as the build stage, where the SAM template can be
built and deployed.
Create an Amazon CloudWatch alarm for each Lambda function. Configure the
alarms to enter the ALARM state if any errors are detected. Configure an
evaluation period, dimensions for each Lambda function and version, and the
namespace as AWS/Lambda on the Errors metric. CloudWatch is a service that
monitors and collects metrics from AWS resources and applications. CloudWatch
alarms are actions that are triggered when a metric crosses a specified threshold.
By creating CloudWatch alarms for each Lambda function, the DevOps team can
monitor the health and performance of each function version during deployment.
By configuring the alarms to enter the ALARM state if any errors are detected, the
DevOps team can enable automated rollback if any failures are reported.
Question 23Choose 1
A DevOps engineer manages a large commercial website that runs on Amazon EC2. The
website uses Amazon Kinesis Data Streams to collect and process web togs. The DevOps
engineer manages the Kinesis consumer application, which also runs on Amazon EC2.
Sudden increases of data cause the Kinesis consumer application to (all behind and the
Kinesis data streams drop records before the records can be processed. The DevOps
engineer must implement a solution to improve stream handling.
Which solution meets these requirements with the MOST operational efficiency?
Show answerHide answer
Correct answer: BHorizontally scale the Kinesis consumer application by adding more EC2 instances
based on the Amazon CloudWatch GetRecords IteratorAgeMilliseconds metric Increase
the retention period of the Kinesis data streams.
Question 24Choose 1
A company sells products through an ecommerce web application The company wants a
dashboard that shows a pie chart of product transaction details. The company wants to
integrate the dashboard With the company’s existing Amazon CloudWatch dashboards
Which solution Will meet these requirements With the MOST operational efficiency?
Show answerHide answer
Correct answer: AUpdate the ecommerce application to emit a JSON object to a CloudWatch log group for
each processed transaction. Use CloudWatch Logs Insights to query the log group and to
visualize the results in a pie chart format Attach the results to the desired CloudWatch
dashboard.
Question 25Choose 2
A DevOps team manages an API running on-premises that serves as a backend for an
Amazon API Gateway endpoint. Customers have been complaining about high response
latencies, which the development team has verified using the API Gateway latency metrics
in Amazon CloudWatch. To identify the cause, the team needs to collect relevant data
without introducing additional latency.
Which actions should be taken to accomplish this? (Choose two.)
Show answerHide answer
Correct answer: A, CInstall the CloudWatch agent server side and configure the agent to upload relevant logs
to CloudWatch.Enable AWS X-Ray tracing in API Gateway, modify the application to capture request
segments, and use the X-Ray daemon to upload segments to X-Ray.
Question 26Choose 1
A company is divided into teams Each team has an AWS account and all the accounts are
in an organization in AWS Organizations. Each team must retain full administrative rights to
its AWS account. Each team also must be allowed to access only AWS services that the
company approves for use AWS services must gam approval through a request and
approval process.
How should a DevOps engineer configure the accounts to meet these requirements?
Show answerHide answer
Correct answer: CPlace all the accounts under a new top-level OU within the organization Create an SCP
that denies access to restricted AWS services Attach the SCP to the OU.
Question 27Choose 1
A company wants to use AWS development tools to replace its current bash deployment
scripts. The company currently deploys a LAMP application to a group of Amazon EC2
instances behind an Application Load Balancer (ALB). During the deployments, the
company unit tests the committed application, stops and starts services, unregisters and
re-registers instances with the load balancer, and updates file permissions. The company
wants to maintain the same deployment functionality through the shift to using AWS
services.
Which solution will meet these requirements?
Show answerHide answer
Correct answer: DUse AWS CodePipeline to trigger AWS CodeBuild to test the application. Use bash
scripts invoked by AWS CodeDeploy's appspec.yml file to restart services. Unregister and
re-register the instances in the AWS CodeDeploy deployment group with the ALB. Update
the appspec.yml file to update file permissions without a custom script.
Question 28Choose 1
A company is hosting a web application in an AWS Region. For disaster recovery
purposes, a second region is being used as a standby. Disaster recovery requirements
state that session data must be replicated between regions in near-real time and 1% of
requests should route to the secondary region to continuously verify system functionality.
Additionally, if there is a disruption in service in the main region, traffic should be
automatically routed to the secondary region, and the secondary region must be able to
scale up to handle all traffic.
How should a DevOps engineer meet these requirements?
Show answerHide answer
Correct answer: DIn both regions, launch the application in Auto Scaling groups and use DynamoDB
global tables for session data. Enable an Amazon CloudFront weighted distribution across
regions. Point the Amazon Route 53 DNS record at the CloudFront distribution.
Question 29Choose 1
A company has an application that is using a MySQL-compatible Amazon Aurora Multi-AZ
DB cluster as the database. A cross-Region read replica has been created for disaster
recovery purposes. A DevOps engineer wants to automate the promotion of the replica so
it becomes the primary database instance in the event of a failure.
Which solution will accomplish this?
Show answerHide answer
Correct answer: DStore the Aurora endpoint in AWS Systems Manager Parameter Store. Create an
Amazon EventBridge event that detects the database failure and runs an AWS Lambda
function to promote the replica instance and update the endpoint URL stored in AWS
Systems Manager Parameter Store. Code the application to reload the endpoint from
Parameter Store if a database connection fails.
Explanation
Explanation: EventBridge is needed to detect the database failure. Lambda is needed to
promote the replica as it's in another Region (manual promotion, otherwise). Storing and
updating the endpoint in Parameter store is important in updating the application.
Question 30Choose 1
A company uses Amazon RDS for all databases in Its AWS accounts The company uses
AWS Control Tower to build a landing zone that has an audit and logging account All
databases must be encrypted at rest for compliance reasons. The company's security
engineer needs to receive notification about any noncompliant databases that are in the
company's accounts
Which solution will meet these requirements with the MOST operational efficiency?
Show answerHide answer
Correct answer: AUse AWS Control Tower to activate the optional detective control (guardrail) to
determine whether the RDS storage is encrypted Create an Amazon Simple Notification
Service (Amazon SNS) topic in the company's audit account. Create an Amazon EventBridge rule to filter noncompliant events from the AWS Control Tower control
(guardrail) to notify the SNS topic. Subscribe the security engineer's email address to the
SNS topic
Explanation
Explanation:
Activate AWS Control Tower Guardrail:
Create SNS Topic for Notifications:
Create EventBridge Rule to Filter Non-compliant Events:
Subscribe Security Engineer's Email to SNS Topic:
By using AWS Control Tower to activate a detective guardrail and setting up SNS
notifications for non-compliant events, the company can efficiently monitor and ensure that
all RDS databases are encrypted at rest.
Full mock exam
Sit the DOP-C02 exam before exam day
Full-length mocks with the same number of questions and the same time limit as the real DOP-C02 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.