sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m onPremise -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json
/opt/aws/amazon-cloudwatch-agent/bin/config-downloader --output-dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d --download-source file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json --mode onPrem --config /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml --multi-config default
Got Home directory: /root
I! Set home dir Linux: /root
I! SDKRegionWithCredsMap region:
Unable to determine aws-region.
Please make sure the credentials and region set correctly on your hosts.
Refer to http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
Fail to fetch the config!
/root/.aws/credentials
[default]
aws_access_key_id = *****************
aws_secret_access_key = ************************
/root/.aws/config
[default]
region = us-gov-west-1
sudo aws configure list
Name Value Type Location
---- ----- ---- --------
profile <not set> None None
access_key **************** shared-credentials-file
secret_key **************** shared-credentials-file
region us-gov-west-1 config-file ~/.aws/config
export AWS_REGION=us-gov-west-1
How can I solve this problem?