nerdexam
Amazon

DOP-C02 · Question #46

A company is adopting AWS CodeDeploy to automate its application deployments for a Java- Apache Tomcat application with an Apache Webserver. The development team started with a proof of concept…

The correct answer is B. Create a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ NAME. The Start, Install, TestTraffic, AllowTraffic, and End events in the deployment cannot be scripted, which is why they appear in gray in this diagram. https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-

Submitted by tunde_lagos· Mar 6, 2026Configuration Management & Infrastructure as Code

Question

A company is adopting AWS CodeDeploy to automate its application deployments for a Java- Apache Tomcat application with an Apache Webserver. The development team started with a proof of concept, created a deployment group for a developer environment, and performed functional tests within the application. After completion, the team will create additional deployment groups for staging and production. The current log level is configured within the Apache settings, but the team wants to change this configuration dynamically when the deployment occurs, so that they can set different log level configurations depending on the deployment group without having a different application revision for each group. How can these requirements be met with the LEAST management overhead and without requiring different script versions for each deployment group?

Options

  • ATag the Amazon EC2 instances depending on the deployment group. Then place a script into the
  • BCreate a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ NAME
  • CCreate a CodeDeploy custom environment variable for each environment. Then place a script into
  • DCreate a script that uses the CodeDeploy environment variable DEPLOYMENT_GROUP_ID to

How the community answered

(52 responses)
  • A
    6% (3)
  • B
    75% (39)
  • C
    4% (2)
  • D
    15% (8)

Explanation

The Start, Install, TestTraffic, AllowTraffic, and End events in the deployment cannot be scripted, which is why they appear in gray in this diagram. https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-

Topics

#CodeDeploy#Deployment lifecycle hooks#Environment variables#Dynamic configuration

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice