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 réponse
0
Réponse acceptée

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
EXPERT
répondu il y a 8 mois
profile pictureAWS
EXPERT
vérifié il y a 8 mois
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions