# Metricbeat getResources failed AccessDeniedException

**URL:** <https://discuss.elastic.co/t/metricbeat-getresources-failed-accessdeniedexception/264556>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [February 17, 2021, 11:10am UTC](https://discuss.elastic.co/t/metricbeat-getresources-failed-accessdeniedexception/264556 "2021-02-17T11:10:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atharvak](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@atharvak](https://discuss.elastic.co/u/atharvak)\
**Post date:** [February 17, 2021, 11:10am UTC](https://discuss.elastic.co/t/metricbeat-getresources-failed-accessdeniedexception/264556/1 "2021-02-17T11:10:47Z")

</div>

Hello guys,  
I am trying to setup Metricbeat for my AWS account. I have already created an IAM user with full access to EC2, S3, Cloudwatch, etc. Following is my configuration

```auto
#- module: aws
# period: 1m
# metricsets:
# - elb
# - usage
- module: aws
  period: 5m
  access_key_id: '<ACCESS_KEY_ID>'
  secret_access_key: '<AWS_SECRET_ACCESS_KEY>'
  metricsets:
    - cloudwatch
  metrics:
    - namespace: AWS/EC2
      #name: ["CPUUtilization", "DiskWriteOps"]
      #tags.resource_type_filter: ec2:instance
      #dimensions:
      # - name: InstanceId
      # value: i-0686946e22cf9494a
      #statistic: ["Average", "Maximum"]
- module: aws
  period: 5m
  access_key_id: '----'
  secret_access_key: '---'
  metricsets:
    - ebs
    - ec2
# - sns
# - sqs
# - rds
- module: aws
  period: 12h
  access_key_id: '<<ACCESS_KEY_ID>'
  secret_access_key: '<SECRET_ACCESS_KEY>'
  metricsets:
    - billing
  regions:
    - us-east-1
- module: aws
  period: 24h
  access_key_id: '<awsaccesskeyid>'
  secret_access_key: '<secretaccesskey>'
  metricsets:
    - s3_daily_storage
    - s3_request

```

Despite this configuration, I am getting following errors in the logs.

```auto
Feb 17 16:36:01 logviu metricbeat: 2021-02-17T16:36:01.807+0530#011INFO#011[aws.ebs]#011cloudwatch/cloudwatch.go:475#011getResourcesTags failed, skipping region ap-south-1: error GetResources: AccessDeniedException: User: arn:aws:iam::0000000:user/Test_user is not authorized to perform: tag:GetResources
Feb 17 16:36:01 logviu metricbeat: status code: 400, request id: 1f60b771-0e3b-454e-87b6-7078f4fe55ce
Feb 17 16:36:03 logviu metricbeat: 2021-02-17T16:36:03.480+0530#011INFO#011[aws.cloudwatch]#011cloudwatch/cloudwatch.go:475#011getResourcesTags failed, skipping region ap-south-1: error GetResources: AccessDeniedException: User: arn:aws:iam::0000000:user/Test_user is not authorized to perform: tag:GetResources
Feb 17 16:36:03 logviu metricbeat: status code: 400, request id: 1d305e8d-8b5d-419e-83fd-b21189e402e7
Feb 17 16:36:11 logviu metricbeat: 2021-02-17T16:36:11.763+0530#011INFO#011[aws.ebs]#011cloudwatch/cloudwatch.go:475#011getResourcesTags failed, skipping region us-east-2: error GetResources: AccessDeniedException: User: arn:aws:iam::0000000:user/Test_user is not authorized to perform: tag:GetResources
Feb 17 16:36:11 logviu metricbeat: status code: 400, request id: 0447b4d8-6b45-4c85-93c2-094ff301d18b

```

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [February 17, 2021, 7:21pm UTC](https://discuss.elastic.co/t/metricbeat-getresources-failed-accessdeniedexception/264556/2 "2021-02-17T19:21:14Z")

</div>

Hi @atharvak,

Could you check if yout IAM user has permissions for `tag:GetResources`?

This is needed for [`ebs`](https://www.elastic.co/guide/en/beats/metricbeat/7.11/metricbeat-metricset-aws-ebs.html#_aws_permissions_3) and other metricsets.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 17, 2021, 9:21pm UTC](https://discuss.elastic.co/t/metricbeat-getresources-failed-accessdeniedexception/264556/3 "2021-03-17T21:21:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
