DOP-C02 Practice Question 81: CodeDeploy on Premises Registration

AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 9 · question 1 of 10

SDLC Automationmedium

A company runs a fleet of on-premises servers in a data center that has no plans to migrate to EC2 in the near term. The DevOps team wants to use AWS CodeDeploy to deploy application revisions to these servers alongside its existing EC2 deployments, using the same deployment groups and CodeDeploy agent workflow. What must the team do to make an on-premises server a valid deployment target for CodeDeploy?

Select one answer
Show answer and explanation

Answer:

  • A. Register the on-premises server with CodeDeploy using an IAM user or an IAM role with temporary credentials, install and configure the CodeDeploy agent with those credentials, and tag the instance so it can be added to a deployment group.

CodeDeploy identifies on-premises instances through explicit registration: you create a configuration that associates the server with either an IAM user's static credentials or, for higher security, an IAM role assumed through AWS STS for periodically refreshed temporary credentials, then install the CodeDeploy agent using that configuration and tag the instance so deployment groups can target it the same way they target tagged EC2 instances.

B is wrong because Systems Manager hybrid activations register a server with Systems Manager for patching and Run Command, not with CodeDeploy; the two registration mechanisms are separate. C is wrong because Auto Scaling groups and launch templates only provision and manage EC2 instances, they cannot adopt a physical on-premises server. D is wrong because IAM instance profiles are an EC2-only construct delivered through the instance metadata service; an on-premises server has no metadata service to attach one to, which is exactly why CodeDeploy needs its own on-premises registration and credential model.

Reference: Register an on-premises instance with CodeDeploy

Practice Test 9 ›

Study guides for DOP-C02

AWS Service Control Policies Explained: SCPs and DenialsAWS service control policies explained: how SCPs cap permissions, why admins still get access denied, inheritance, deny vs allow lists and the exam traps.
How AI Is Changing Software Jobs: Where to PrepareHow AI is changing software jobs: what history shows, the evidence on junior developers, what Klarna learned, new AI roles and five domains to prepare for.
How AWS Certification Exams Work: Scoring and RenewalHow AWS certification exams work: levels, booking, question types, unscored questions, scaled scores, pass marks, validity and how recertification works.
What Is Amazon RDS? Multi-AZ, Read Replicas and BackupsWhat is Amazon RDS? Engines, Multi-AZ, read replicas, backups, RDS Proxy, Aurora and pricing explained, with the traps that AWS exams set around each one.
Best DevOps certification: AWS, Azure, Google or CKAThe best DevOps certification for your stack: AWS DOP-C02, Azure AZ-400, Google Cloud DevOps Engineer and CKA compared on cost, level and prerequisites.
What Is AWS Lambda? Triggers, Concurrency and Cold StartsWhat is AWS Lambda? How functions run, cold starts, triggers vs event source mappings, concurrency, layers, aliases, pricing and the exam traps.
AWS CloudOps Engineer Associate (SOA-C03) exam guideAWS Certified CloudOps Engineer – Associate (SOA-C03) replaced SysOps Administrator. Format, cost, the five domains, what changed and how to prepare.
Which AWS certification should you get? 2026 roadmapWhich AWS certification to get first, by role and experience, with each exam's status in October 2026, what is changing, and prices in USD and INR.
What Is Amazon EC2? Instances, AMIs, EBS and Auto ScalingAmazon EC2 explained: instances, AMIs, instance types, security groups, EBS, Auto Scaling groups and pricing options, with the traps AWS exams set.
SQS vs SNS vs EventBridge on AWSWhen to use an SQS queue, an SNS topic or an EventBridge bus, plus fan-out, FIFO ordering, visibility timeouts and dead-letter queues for AWS exams.