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

profile picture
已提问 8 个月前483 查看次数
1 回答
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.

profile picture
专家
已回答 8 个月前
profile pictureAWS
专家
已审核 8 个月前
  • 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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则