---
title: "Returns the policy document necessary for Gremlin to access AWS resources."
method: GET
path: "/aws/metadata/iam-role"
tags: ["aws.metadata"]
---

# Returns the policy document necessary for Gremlin to access AWS resources.

`GET /aws/metadata/iam-role`

This endpoint provides the policy document and associated trust policies so that Gremlin can access an arbitrary AWS account. This endpoint also provides a link to a CloudFormationTemplate for applying this to your AWS account. 
See: https://www.gremlin.com/docs/aws-quick-start-guide for more info

Requires the privilege [`MINIMUM_TEAM_PRIVILEGES`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Query parameters

- `teamId` string, required

## Response `default`

default response

- AwsMetadataIamRoleResponse
  - `cfnTemplateLink` string
  - `permissionPolicy` string
  - `managedPolicies` string[]
  - `trustPolicy` string

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege for target team: MINIMUM_TEAM_PRIVILEGES

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/revisions/36ee938323f0/schema)
