DOP-C02 SDLC Automation Practice Question
Which THREE actions can be performed using the AWS CLI for CodeDeploy? (Choose three.)
⚠ Common exam trap
It's easy for candidates to confuse `push-revision` with the valid `aws deploy push` command, or assume `register-instance` is a valid command when the actual command uses the longer `register-on-premises-instance` syntax, leading to incorrect selections.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
create-deployment
The `create-deployment` command is correct because it is the primary AWS CLI operation used to start a new deployment in CodeDeploy. It triggers the deployment of a revision (application code and configuration) to a specified deployment group, making it a core action for automating SDLC pipelines.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
create-deployment
Why this is correct
The `aws deploy create-deployment` command is a valid, top-level CodeDeploy API operation that starts a new deployment for an application. You provide the application name, deployment group name, and a revision (for example, `--s3-location` or `--github-location`), and it returns a `deploymentId` that you can later query with `get-deployment`. This is the standard way to trigger a deployment from the CLI.
- ✓
get-deployment
Why this is correct
The `aws deploy get-deployment` command retrieves the status and configuration of a single deployment using its unique deployment ID, such as `d-AB12CD34EF`. The output includes state (`InProgress`, `Succeeded`, `Failed`), error codes, instance/target status summaries, and the original deployment spec. It is a read-only operation and complements `create-deployment` for monitoring and troubleshooting.
- ✗
push-revision
Why it's wrong here
There is no `aws deploy push-revision` command in the AWS CLI. The actual command is `aws deploy push`, which uploads your application revision to an S3 bucket and, optionally, registers it with CodeDeploy by writing metadata; the revision itself lives in S3, not in CodeDeploy. Using `push` is a convenience wrapper that combines an S3 upload with a `register-application-revision` call, but its name is simply `push`, making `push-revision` invalid.
- ✓
list-deployment-groups
Why this is correct
The `aws deploy list-deployment-groups` command returns the deployment group names associated with a given CodeDeploy application, filtered by the supplied `--application-name` and optional pagination controls. It is a list operation, not a mutating one, and helps you discover which groups exist before running `create-deployment`. This is one of the standard list commands in the CodeDeploy CLI.
- ✗
register-instance
Why it's wrong here
There is no `aws deploy register-instance` command. For EC2 instances, registration is unnecessary because instances are associated with a deployment group through tags or Auto Scaling groups; for on-premises servers, the correct command is `aws deploy register-on-premises-instance`, which is part of a larger hybrid workflow that also requires an IAM role and an on-premises configuration file. Thus, `register-instance` is not a valid CLI action.
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.