exam questions

Exam AWS Certified Solutions Architect - Professional SAP-C02 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional SAP-C02 exam

Exam AWS Certified Solutions Architect - Professional SAP-C02 topic 1 question 267 discussion

A company has an application that runs on Amazon EC2 instances in an Amazon EC2 Auto Scaling group. The company uses AWS CodePipeline to deploy the application. The instances that run in the Auto Scaling group are constantly changing because of scaling events.

When the company deploys new application code versions, the company installs the AWS CodeDeploy agent on any new target EC2 instances and associates the instances with the CodeDeploy deployment group. The application is set to go live within the next 24 hours.

What should a solutions architect recommend to automate the application deployment process with the LEAST amount of operational overhead?

  • A. Configure Amazon EventBridge to invoke an AWS Lambda function when a new EC2 instance is launched into the Auto Scaling group. Code the Lambda function to associate the EC2 instances with the CodeDeploy deployment group.
  • B. Write a script to suspend Amazon EC2 Auto Scaling operations before the deployment of new code. When the deployment is complete, create a new AMI and configure the Auto Scaling group's launch template to use the new AMI for new launches. Resume Amazon EC2 Auto Scaling operations.
  • C. Create a new AWS CodeBuild project that creates a new AMI that contains the new code. Configure CodeBuild to update the Auto Scaling group’s launch template to the new AMI. Run an Amazon EC2 Auto Scaling instance refresh operation.
  • D. Create a new AMI that has the CodeDeploy agent installed. Configure the Auto Scaling group’s launch template to use the new AMI. Associate the CodeDeploy deployment group with the Auto Scaling group instead of the EC2 instances.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Alabi
Highly Voted 1 year, 1 month ago
Selected Answer: D
This solution automates the deployment process by creating a new Amazon Machine Image (AMI) with the CodeDeploy agent installed. The Auto Scaling group's launch template is then updated to use this new AMI. By associating the CodeDeploy deployment group with the Auto Scaling group, CodeDeploy will automatically deploy the application to any new instances launched by the Auto Scaling group. This approach eliminates the need to manually install the CodeDeploy agent on new instances and associate them with the deployment group. It simplifies the deployment process and reduces operational overhead by leveraging the automation capabilities of CodeDeploy and the Auto Scaling group.
upvoted 7 times
...
d401c0d
Most Recent 1 day, 22 hours ago
Selected Answer: D
D – CodeDeploy agent is already installed, so use AMI instead.
upvoted 1 times
...
career360guru
4 months, 4 weeks ago
Selected Answer: D
Option D
upvoted 1 times
...
career360guru
8 months, 2 weeks ago
Selected Answer: D
Option D
upvoted 1 times
...
severlight
8 months, 3 weeks ago
Selected Answer: D
CodeDeploy deployment group should be associated with ASG
upvoted 1 times
...
Ganshank
11 months, 2 weeks ago
D as per this rather old blog post - https://aws.amazon.com/blogs/devops/under-the-hood-aws-codedeploy-and-auto-scaling-integration/
upvoted 3 times
...
aviathor
11 months, 2 weeks ago
It seems really unnecessary to have to install an app on the fly during scale-out of an ASG. Just launching the EC2 instances from a pre-installed AMI is so much faster, and removes sources of error. I am a little frustrated never to have encountered AWS Image Builder in a question, or in course material...
upvoted 2 times
aviathor
11 months, 2 weeks ago
https://dev.to/aws-builders/how-to-create-a-custom-ami-with-image-pipeline-and-automate-its-creation-using-ec2-image-builder-108m
upvoted 3 times
...
...
Simon523
11 months, 2 weeks ago
Selected Answer: D
AWS CodeDeploy is a deployment service that enables developers to automate the deployment of applications to instances and to update the applications as required.
upvoted 2 times
...
rxhan
1 year ago
Selected Answer: D
Bake AMI with agent already installed
upvoted 1 times
...
achillessatan
1 year ago
Selected Answer: C
D is not correct since it is considering about the code change.
upvoted 1 times
rxhan
1 year ago
CodeBuild cant create a new AMI?
upvoted 1 times
...
...
NikkyDicky
1 year, 1 month ago
Selected Answer: D
It's a D
upvoted 1 times
...
SmileyCloud
1 year, 1 month ago
D - correct. You want the agent baked in the AMI.
upvoted 3 times
...
gd1
1 year, 1 month ago
Selected Answer: D
GPT: This option provides the least amount of operational overhead by associating the CodeDeploy deployment group with the Auto Scaling group rather than individual EC2 instances. This enables any new instances launched by the Auto Scaling group to be automatically included in deployments, eliminating the need for manual intervention or additional automation to add new instances to the deployment group. The creation of an AMI with the CodeDeploy agent pre-installed ensures that all new instances launched by the Auto Scaling group will have the necessary components to participate in CodeDeploy deployments.
upvoted 3 times
...
psyx21
1 year, 1 month ago
Selected Answer: D
Correct Answer is D
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago