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?

DD-Boom
asked 5 months ago175 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

profile picture
EXPERT
answered 5 months ago
profile pictureAWS
EXPERT
reviewed 5 months 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.

Guidelines for Answering Questions