Failed to start CloudWatch agent on ubuntu server

1
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?

DD-Boom
질문됨 7달 전410회 조회
1개 답변
0

I solved the problem by running "sudo aws configure --profile AmazonCloudWatchAgent", but a new problem appeared, the "amazon-cloudwatch-agent.json" parameter was wrong

DD-Boom
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠