A company uses CodePipeline with build, test, and deploy stages. They want to use AWS CodeDeploy for the deployment stage to install an RPM package to a fleet of EC2 instances launched from a common AMI and managed by an Auto Scaling group. Which steps should the DevOps engineer take? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Create a new version of the common AMI that has the CodeDeploy agent installed. Update the EC2 instances’ IAM role to allow access to CodeDeploy., Create a CodeDeploy application, configure an in-place deployment type, specify the Auto Scaling group as the deployment target, and update the CodePipeline pipeline to include the CodeDeploy action to perform deployments..
Why this is the answer
For CodeDeploy to manage deployments to EC2 instances, the CodeDeploy agent must be installed on those instances. Creating a new AMI with the agent pre-installed ensures all new instances from the Auto Scaling group have it. The EC2 instances' IAM role needs permissions to interact with CodeDeploy (e.g., s3:GetObject for artifacts, codedeploy:PutHostCommandComplete). Next, a CodeDeploy application is required to define the deployment. An "in-place" deployment is suitable for installing an RPM package directly onto existing instances. Specifying the Auto Scaling group as the target ensures deployments apply to all instances within that group. Finally, integrating this CodeDeploy application into CodePipeline via a CodeDeploy action automates the deployment process as part of the CI/CD workflow. The incorrect options either miss critical steps like agent installation, suggest an unsuitable deployment type, or target individual instances instead of the Auto Scaling group, which is less scalable and manageable.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed