Closed txynidakis closed 4 years ago
Hi @txynidakis ,
Thank you for your very good explanation and details.
As soon as I can, I'll check your case in order to see how can I handle your case.
Hi @txynidakis ,
Following your recommendation, I created a patch to support leave the cwa_aws_region empty by default, I tested it, and it is working. Right now I'm releasing the new version
resolved in PR#28
Hi This is my Scenario
We have a golden AMI pipeline in Region A where the CW-A role is used and then copy the AMI to Region B. We bake in the CW-A install to save on launch time.
If we set cwa_aws_region in the playbook in in Region A. Then when we launch the copied AMI in Region B, amazon-cloudwatch-agent.json configs still show the region from Region A.
From the documents https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html, IF, the region is left out, then by DEFAULT the agent will send data to log region in which the EC2 was launch from.
For the moment I've got around the problem by creating a custom file and referenced
I've tried to have a play
but couldn't get it working, (haven't spent that much time on it though) and it's probably not an ideal solution.
Can you recommend a way forward to remove the region value from the json file
Kind regards Tony