1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
My guess is cloudinit is installing old version of Cloudwatch Agent
packages:
yum:
awslogs: []
According to the documentation, the older CloudWatch Logs agent doesn't support Instance Metadata Service Version 2 (IMDSv2). https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html
The name of the new package should be amazon-cloudwatch-agent
.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance.html
I'm not using EB, so I don't know how it's work but to install the new CW Agent on EC2 instance, I usually follow these steps https://repost.aws/knowledge-center/cloudwatch-push-metrics-unified-agent
answered a year ago
Relevant content
- asked 2 years ago
- Accepted Answerasked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
Thanks very much for your response!
I think you are right that for some reason it is trying to use the old CW Logs Agent, I tried updating the configuration of the yum install to match the newer package name.
This didn't work however but it did match the latest release on the Github release for the package https://github.com/aws/amazon-cloudwatch-agent/releases/
I then followed this example from the AWSDocs Github
which used a container command to start the Cloudwatch agent in a different way
I think the next steps are to try following these instructions from the link you provided https://repost.aws/knowledge-center/cloudwatch-push-metrics-unified-agent on a single EC2 instance running inside Elastic Beanstalk, if it works then try and automate it into the
.ebextensions