1 Answer
- Newest
- Most votes
- Most comments
0
Yes you can, however it’s a good idea to inject the install via userdata of the ec2 so that when you first deploy CWagent it will download the most up to date configuration from parameter store and latest binaries for the install so that your not having to keep the config and binaries up to date on any image.
Relevant content
- Accepted Answerasked 4 months ago
- asked 8 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Should it work this way: Under Image builder user date I put: sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c ssm:MySSMConfig? Later after I create the EC2 from AMI, agent should already be configured? Because I do this way and EC2 agent is in stopped state on EC2 instance based on AMI.