A company has a fleet of Amazon EC2 instances that run Linux in a single AWS account.
The company is using an AWS Systems Manager Automation task across the EC2
instances.
During the most recent patch cycle, several EC2 instances went into an error state
because of insufficient available disk space. A DevOps engineer needs to ensure that the
EC2 instances have sufficient available disk space during the patching process in the
future.
Which combination of steps will meet these requirements? {Select TWO.)
Show answerHide answer
Correct answer: A, DEnsure that the Amazon CloudWatch agent is installed on all EC2 instancesCreate an Amazon CloudWatch alarm to monitor available disk space on all EC2
instances Add the alarm as a safety control to the Systems Manager Automation task.
Explanation
Explanation:
Ensure that the Amazon CloudWatch agent is installed on all EC2 instances:
The Amazon CloudWatch agent collects and logs metrics and sends them to
Amazon CloudWatch.
To install the CloudWatch agent:
Create an Amazon CloudWatch alarm to monitor available disk space on all EC2
instances Add the alarm as a safety control to the Systems Manager Automation task:
Create CloudWatch alarms to monitor the available disk space and trigger
notifications or actions when the disk space falls below a defined threshold.
Add the CloudWatch alarm to the Systems Manager Automation task to halt or fail
the task if disk space is insufficient.
Question 82Choose 1
A DevOps engineer is creating an AWS CloudFormation template to deploy a web service.
The web service will run on Amazon EC2 instances in a private subnet behindan
Application Load Balancer (ALB). The DevOps engineer must ensure that the service can
accept requests from clients that have IPv6 addresses.
What should the DevOps engineer do with the CloudFormation template so that IPv6
clients can access the web service?
Show answerHide answer
Correct answer: DAdd an IPv6 CIDR block to the VPC and subnets for the ALB. Create a listener on port
443. and specify the dualstack IP address type on the ALB. Create a target group, and add
the EC2 instances as targets. Associate the target group with the ALB.
Explanation
Explanation: it involves adding an IPv6 CIDR block to the VPC and subnets for the ALB
and specifying the dualstack IP address type on the ALB listener. This allows the ALB to
listen on both IPv4 and IPv6 addresses, and forward requests to the EC2 instances that
are added as targets to the target group associated with the ALB.
Question 83Choose 1
A company uses AWS Key Management Service (AWS KMS) keys and manual key
rotation to meet regulatory compliance requirements. The security team wants to be
notified when any keys have not been rotated after 90 days.
Which solution will accomplish this?
Show answerHide answer
Correct answer: CDevelop an AWS Config custom rule that publishes to an Amazon Simple Notification
Service (Amazon SNS) topic when keys are more than 90 days old.
Question 84Choose 1
A company has developed a serverless web application that is hosted on AWS. The
application consists of Amazon S3. Amazon API Gateway, several AWS Lambda functions,
and an Amazon RDS for MySQL database. The company is using AWS CodeCommit to
store the source code. The source code is a combination of AWS Serverless Application
Model (AWS SAM) templates and Python code.
A security audit and penetration test reveal that user names and passwords for
authentication to the database are hardcoded within CodeCommit repositories. A DevOps
engineer must implement a solution to automatically detect and prevent hardcoded secrets.
What is the MOST secure solution that meets these requirements?
Show answerHide answer
Correct answer: BAssociate the CodeCommit repository with Amazon CodeGuru Reviewer. Manually
check the code review for any recommendations. Choose the option to protect the secret.
Update the SAM templates and the Python code to pull the secret from AWS Secrets
Manager.
Question 85Choose 3
A DevOps engineer is planning to deploy a Ruby-based application to production. The
application needs to interact with an Amazon RDS for MySQL database and should have
automatic scaling and high availability. The stored data in the database is critical and
should persist regardless of the state of the application stack.
The DevOps engineer needs to set up an automated deployment strategy for the
application with automatic rollbacks. The solution also must alert the application team when
a deployment fails.
Which combination of steps will meet these requirements? (Select THREE.)
Show answerHide answer
Correct answer: B, D, EDeploy the application on AWS Elastic Beanstalk. Deploy a separate Amazon RDS for
MySQL DB instance outside of Elastic Beanstalk.Configure an Amazon EventBridge rule to monitor AWS Health events. Use an Amazon
Simple Notification Service (Amazon SNS) topic as a target to alert the application team.Use the immutable deployment method to deploy new application versions.
Question 86Choose 1
A DevOps engineer has implemented a Cl/CO pipeline to deploy an AWS Cloud Format ion
template that provisions a web application. The web application consists of an Application
Load Balancer (ALB) a target group, a launch template that uses anAmazon Linux 2 AMI an Auto Scaling group of Amazon EC2 instances, a security group and an Amazon RDS for
MySQL database The launch template includes user data that specifies a script to install
and start the application.
The initial deployment of the application was successful. The DevOps engineer made
changes to update the version of the application with the user data. The CI/CD pipeline has
deployed a new version of the template However, the health checks on the ALB are now
failing The health checks have marked all targets as unhealthy.
During investigation the DevOps engineer notices that the Cloud Formation stack has a
status of UPDATE_COMPLETE. However, when the DevOps engineer connects to one of
the EC2 instances and checks /varar/log messages, the DevOps engineer notices that the
Apache web server failed to start successfully because of a configuration error
How can the DevOps engineer ensure that the CloudFormation deployment will fail if the
user data fails to successfully finish running?
Show answerHide answer
Correct answer: AUse the cfn-signal helper script to signal success or failure to CloudFormation Use the
WaitOnResourceSignals update policy within the CloudFormation template Set an
appropriate timeout for the update policy.
Question 87Choose 1
A company's DevOps team manages a set of AWS accounts that are in an organization in
AWS Organizations
The company needs a solution that ensures that all Amazon EC2 instances use approved
AMIs that the DevOps team manages. The solution also must remediate the usage of AMIs that are not approved The individual account administrators must not be able to remove the
restriction to use approved AMIs.
Which solution will meet these requirements?
Show answerHide answer
Correct answer: DEnable AWS Config across the organization Create a conformance pack that uses the
approved -amis-by-id AWS Config managed rule with the list of approved AMIs. Deploy the
conformance pack across the organization. Configure the rule to run the AWSStopEC2lnstance
AWS Systems Manager Automation runbook for the noncompliant EC2
instances.
Question 88Choose 1
A DevOps engineer is building a continuous deployment pipeline for a serverless
application that uses AWS Lambda functions. The company wants to reduce the customer
impact of an unsuccessful deployment. The company also wants to monitor for issues.
Which deploy stage configuration will meet these requirements?
Show answerHide answer
Correct answer: DUse AWS CodeBuild to add sample event payloads for testing to the Lambda functions.
Publish a new version of the functions, and include Amazon CloudWatch alarms. Update
the production alias to point to the new version. Configure rollbacks to occur when an alarm
is in the ALARM state.
Question 89Choose 2
A company uses AWS CodeArtifact to centrally store Python packages. The CodeArtifact
repository is configured with the following repository policy.
A development team is building a new project in an account that is in an organization in
AWS Organizations. The development team wants to use a Python library that has already
been stored in the CodeArtifact repository in the organization. The development team uses
AWS CodePipeline and AWS CodeBuild to build the new application. The CodeBuild job
that the development team uses to build the application is configured to run in a VPC
Because of compliance requirements the VPC has no internet connectivity.
The development team creates the VPC endpoints for CodeArtifact and updates the
CodeBuild buildspec yaml file. However, the development team cannot download the
Python library from the repository.
Which combination of steps should a DevOps engineer take so that the development team
can use Code Artifact? (Select TWO.)
Show answerHide answer
Correct answer: A, DCreate an Amazon S3 gateway endpoint Update the route tables for the subnets that
are running the CodeBuild job.Update the role that the CodeBuild project uses so that the role has sufficient
permissions to use the CodeArtifact repository.
Explanation
Explanation: "AWS CodeArtifact operates in multiple Availability Zones and stores artifact
data and metadata in Amazon S3 and Amazon DynamoDB. Your encrypted data is
redundantly stored across multiple facilities and multiple devices in each facility, making it
highly available and highly durable.
Question 90Choose 1
A company runs an application on one Amazon EC2 instance. Application metadata is
stored in Amazon S3 and must be retrieved if the instance is restarted. The instance must
restart or relaunch automatically if the instance becomes unresponsive.
Which solution will meet these requirements?
Show answerHide answer
Correct answer: BConfigure AWS OpsWorks, and use the auto healing feature to stop and start the
instance. Use a lifecycle event in OpsWorks to pull the metadata from Amazon S3 and
update it on the instance.
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.