EC2 Image Builder and CloudWatch agent configuration

0

Hi,

I am testing EC2 Image Builder and I successfully installed CloudWatch agent via AWS managed build components. But there is no component for configuring CloudWatch agent. Can I configure it inside my own build component just by using bash commands? CloudWatch agent configuration is stored in Parameter Store.

Thanks

1 Antwort
0
Akzeptierte Antwort

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.

profile picture
EXPERTE
beantwortet vor 8 Monaten
profile pictureAWS
EXPERTE
überprüft vor 8 Monaten
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen