Hello guys,
I am trying to configure AWS metrics for multiple AWS accounts of mine. I have already configured the profiles using AWS CLI and they are working. But when the same profile name is put in the modules.d/aws.yml
it is showing errors.
My configuration and error is below.
Config
modules.d/aws.yml
- module: aws
period: 1m
credential_profile_name: elastic-profile
metricsets:
- elb
- usage
- module: aws
period: 24h
credential_profile_name: elastic-profile
metricsets:
- s3_daily_storage
- s3_request
- module: aws
period: 15m
credential_profile_name: elastic-profile
metricsets:
- ebs
- ec2
- sns
- sqs
- rds
Error
Feb 19 13:02:40 elkserver metricbeat: caused by: Get http://169.254.169.254/latest/meta-data/iam/security-credentials: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); error creating aws metricset: failed to retrieve aws credentials, please check AWS credential in config: EC2RoleRequestError: no EC2 instance role found
Feb 19 13:02:40 elkserver metricbeat: Exiting: 2 errors: error creating aws metricset: failed to retrieve aws credentials, please check AWS credential in config: EC2RoleRequestError: no EC2 instance role found
Feb 19 13:02:40 elkserver metricbeat: caused by: RequestError: send request failed
Feb 19 13:02:40 elkserver metricbeat: caused by: Get http://169.254.169.254/latest/meta-data/iam/security-credentials: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers); error creating aws metricset: failed to retrieve aws credentials, please check AWS credential in config: EC2RoleRequestError: no EC2 instance role found
Thank you in advance.