1. Home
  2. Amazon
  3. Amazon Professional
  4. DOP-C02 Exam Info

Amazon DOP-C02 Exam Questions - Navigate Your Path to Success

The Amazon AWS Certified DevOps Engineer - Professional Exam (DOP-C02) exam is a good choice for AWS DevOps engineer and if the candidate manages to pass Amazon AWS Certified DevOps Engineer - Professional Exam, he/she will earn Amazon Professional Certification. Below are some essential facts for Amazon DOP-C02 exam candidates:

  • In actual Amazon AWS Certified DevOps Engineer - Professional Exam (DOP-C02) exam, a candidate can expect 75 Questions and the officially allowed time is expected to be around 180 Minutes.
  • TrendyCerts offers 250 Questions that are based on actual Amazon DOP-C02 syllabus.
  • Our Amazon DOP-C02 Exam Practice Questions were last updated on: Feb 27, 2025

Sample Questions for Amazon DOP-C02 Exam Preparation

Question 1

A company deploys an application to Amazon EC2 instances. The application runs Amazon Linux 2 and uses AWS CodeDeploy. The application has the following file structure for its code repository:

DOP-C02 Exam Question 1 Exhibit 1

The appspec.yml file has the following contents in the files section:

DOP-C02 Exam Question 1 Exhibit 2

What will the result be for the deployment of the config.txt file?

Correct : C

Deployment of config.txt file based on the appspec.yml:

The appspec.yml file specifies that config/config.txt should be copied to /usr/local/src/config.txt.

The source: / directive in the appspec.yml indicates that the entire directory structure starting from the root of the application source should be copied to the specified destination, which is /var/www/html.

Result of the Deployment:

The config.txt file will be specifically deployed to /usr/local/src/config.txt as per the explicit file mapping.

The entire directory structure including application/web will be copied to /var/www/html, but this does not include config/config.txt since it has a specific destination defined.

Thus, the config.txt file will be deployed only to /usr/local/src/config.txt.

Therefore, the correct answer is:

C . The config.txt file will be deployed to only /usr/local/src/config.txt.


AWS CodeDeploy AppSpec File Reference

AWS CodeDeploy Deployment Process

Options Selected by Other Users:
Question 2

A company gives its employees limited rights to AWS DevOps engineers have the ability to assume an administrator role. For tracking purposes, the security team wants to receive a near-real-time notification when the administrator role is assumed.

How should this be accomplished?

Correct : D

* Create an Amazon EventBridge Rule Using an AWS CloudTrail Event Pattern:

AWS CloudTrail logs API calls made in your account, including actions performed by roles.

Create an EventBridge rule that matches CloudTrail events where the AssumeRole API call is made to assume the administrator role.

* Invoke an AWS Lambda Function:

Configure the EventBridge rule to trigger a Lambda function whenever the rule's conditions are met.

The Lambda function will handle the logic to send a notification.

* Publish a Message to an Amazon SNS Topic:

The Lambda function will publish a message to an SNS topic to notify the security team.

Subscribe the security team's email address to this SNS topic to receive real-time notifications.

Example EventBridge rule pattern:

{

'source': ['aws.cloudtrail'],

'detail-type': ['AWS API Call via CloudTrail'],

'detail': {

'eventSource': ['sts.amazonaws.com'],

'eventName': ['AssumeRole'],

'requestParameters': {

'roleArn': ['arn:aws:iam:::role/AdministratorRole']

}

}

}

Example Lambda function (Node.js) to publish to SNS:

const AWS = require('aws-sdk');

const sns = new AWS.SNS();

exports.handler = async (event) => {

const params = {

Message: `Administrator role assumed: ${JSON.stringify(event.detail)}`,

TopicArn: 'arn:aws:sns:<region>::<sns-topic>'

};

await sns.publish(params).promise();

};


Creating EventBridge Rules

Using AWS Lambda with Amazon SNS

Options Selected by Other Users:
Amazon DOP-C02