exam questions

Exam AWS Certified Solutions Architect - Professional All Questions

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

Exam AWS Certified Solutions Architect - Professional topic 1 question 797 discussion

A company runs applications on Amazon EC2 instances. The company plans to begin using an Auto Scaling group for the instances. As part of this transition, a solutions architect must ensure that Amazon CloudWatch Logs automatically collects logs from all new instances. The new Auto Scaling group will use a launch template that includes the Amazon Linux 2 AMI and no key pair.
Which solution meets these requirements?

  • A. Create an Amazon CloudWatch agent configuration for the workload. Store the CloudWatch agent configuration in an Amazon S3 bucket. Write an EC2 user data script to fetch the configuration file from Amazon S3. Configure the CloudWatch agent on the instance during initial boot.
  • B. Create an Amazon CloudWatch agent configuration for the workload in AWS Systems Manager Parameter Store. Create a Systems Manager document that installs and configures the CloudWatch agent by using the configuration. Create an Amazon EventBridge (Amazon CloudWatch Events) rule on the default event bus with a Systems Manager Run Command target that runs the document whenever an instance enters the running state.
  • C. Create an Amazon CloudWatch agent configuration for the workload. Create an AWS Lambda function to install and configure the CloudWatch agent by using AWS Systems Manager Session Manager. Include the agent configuration inside the Lambda package. Create an AWS Config custom rule to identify changes to the EC2 instances and invoke Lambda function.
  • D. Create an Amazon CloudWatch agent configuration for the workload. Save the CloudWatch agent configuration as part of an AWS Lambda deployment package. Use AWS CloudTrail to capture EC2 tagging events and initiate agent installation. Use AWS CodeBuild to configure the CloudWatch agent on the instances that run the workload.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
vinodkp
Highly Voted 2 years, 11 months ago
Answer is B
upvoted 12 times
...
SureNot
Most Recent 2 years ago
Selected Answer: A
I think the agent is preinstalled on Amazon Linux 2. Am I wrong?
upvoted 2 times
mrgreatness
2 years ago
no the package is there but not installed, please see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html#download-CloudWatch-Agent-on-EC2-Instance-fleet
upvoted 1 times
...
...
joancarles
2 years, 2 months ago
Selected Answer: B
B seems to be more complet, and it's feasible the CW agent installation through SSM: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/download-CloudWatch-Agent-on-EC2-Instance-SSM-first.html
upvoted 4 times
...
kadev
2 years, 3 months ago
B Because this AWS exam, you must choose the solution in AWS guide https://docs.aws.amazon.com/prescriptive-guidance/latest/implementing-logging-monitoring-cloudwatch/install-cloudwatch-systems-manager.html https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/installing-cloudwatch-agent-ssm.html
upvoted 4 times
...
Sumit_Kumar
2 years, 3 months ago
A needs IAM role
upvoted 1 times
kadev
2 years, 3 months ago
B need a IAM Role also
upvoted 2 times
...
...
JonnyB1001
2 years, 4 months ago
Selected Answer: B
If A said "Install & configure the CW agent during initial boot" then it would be A, but without that its B C & D are talking rubbish.
upvoted 1 times
...
asfsdfsdf
2 years, 4 months ago
Selected Answer: B
A and B will work however in A there is no CW agent installation (its not installed by default) just configuration. B is complete and can be managed correctly: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html https://wellarchitectedlabs.com/security/200_labs/200_remote_configuration_installation_and_viewing_cloudwatch_logs/
upvoted 1 times
...
aandc
2 years, 5 months ago
Selected Answer: A
Vote for A, B seems overkill
upvoted 1 times
...
bobsmith2000
2 years, 6 months ago
Selected Answer: A
The real world scenario.
upvoted 2 times
Chuky64
2 years, 6 months ago
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html
upvoted 1 times
...
...
KengL
2 years, 8 months ago
Answer is C
upvoted 2 times
...
Bigbearcn
2 years, 8 months ago
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html
upvoted 2 times
...
AwsSuperTrooper
2 years, 11 months ago
Answer A
upvoted 1 times
...
kubala
2 years, 11 months ago
https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-cwe-target.html https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/download-CloudWatch-Agent-on-EC2-Instance-SSM-first.html
upvoted 1 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 ...