Skip to content

How can the cloudwatch agent associate an AWS key with multiple AWS keys configured in different regions?

1

My Ubuntu instance is in the us-east-1 region, but I want to upload the logs to cloudwatch logs in us-gov-west-1. The AMI of the default aws key is in the us-east-1 region. What should I do? Configure the AWS key to upload logs to the gov region. Currently, I have configured multiple AWS credentials. There are instances in the same region and gov region. Because I need to run cloud deploy-agent, the default AWS credentials must be configured to be related to us-east-1. Is there any way to deploy in this region? Are both agent and uploading logs to the gov area normal AWS credential configuration solutions?

asked 3 years ago491 views

1 Answer
0
Accepted Answer

Hello.

There is a setting value called "shared_credential_profile=" in the file "/opt/aws/amazon-cloudwatch-agent/etc/common-config.toml".
I thought that if I set up a credential profile with "us-gov-west-1" set with this setting value, I could output logs to another region.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html#CloudWatch-Agent-profile-instance-fleet

EXPERT

answered 3 years ago

EXPERT

reviewed 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.