nerdexam
Amazon

DOP-C02 · Question #219

A company has an AWS CodeDeploy application. The application has a deployment group that uses a single tag group to identify instances for the deployment of Application. The single tag group…

The correct answer is A. Change the current single tag group to include only the Environment=Production tag. Add another. Explanation Option A is correct because AWS CodeDeploy's multiple tag groups work with AND logic - an instance must match all tag groups to be included in a deployment. By restructuring the configuration into two separate tag groups (e.g., one for Environment=Production AND…

Submitted by ricky.ec· Mar 6, 2026SDLC Automation

Question

A company has an AWS CodeDeploy application. The application has a deployment group that uses a single tag group to identify instances for the deployment of Application. The single tag group configuration identifies instances that have Environment=Production and Name=ApplicationA tags for the deployment of ApplicationA. The company launches an additional Amazon EC2 instance with Department=Marketing, Environment=Production, and Name=ApplicationB tags. On the next CodeDeploy deployment of Application, the additional instance has ApplicationA installed on it. A DevOps engineer needs to configure the existing deployment group to prevent ApplicationA from being installed on the additional instance. Which solution will meet these requirements?

Options

  • AChange the current single tag group to include only the Environment=Production tag. Add another
  • BChange the current single tag group to include the Department=Marketing,
  • CAdd another single tag group that includes only the Department=Marketing tag. Keep the
  • DChange the current single tag group to include only the Environment=Production tag. Add another

How the community answered

(23 responses)
  • A
    78% (18)
  • B
    4% (1)
  • C
    4% (1)
  • D
    13% (3)

Explanation

Explanation

Option A is correct because AWS CodeDeploy's multiple tag groups work with AND logic - an instance must match all tag groups to be included in a deployment. By restructuring the configuration into two separate tag groups (e.g., one for Environment=Production AND another for Name=ApplicationA), only instances possessing both tags qualify, which excludes the new instance tagged Name=ApplicationB.

Why the distractors are wrong:

  • Option B is incorrect because adding Department=Marketing to the same single tag group uses OR logic within that group, which would expand rather than restrict the target instances.
  • Option C is incorrect because adding a tag group for Department=Marketing would create an AND condition requiring instances to have the Marketing tag, but it doesn't cleanly isolate ApplicationA instances and could break existing deployments.
  • Option D appears similar to A but differs in implementation detail - the restructuring described doesn't correctly enforce the two-group AND logic needed to exclude the additional instance.

Memory Tip: Think of CodeDeploy tag groups like a bouncer with multiple checklists - an instance must pass every checklist (tag group) to get in. Within a single group, tags use OR logic, but between groups, it's always AND. When you need to narrow your targets, split your tags across multiple groups!

Topics

#AWS CodeDeploy#Deployment Groups#EC2 Tagging#Application Deployment

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice