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 Risposta
0
Risposta accettata

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
ESPERTO
con risposta 8 mesi fa
profile pictureAWS
ESPERTO
verificato 8 mesi fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande