## Creating AWS Marketplace Integration Credentials

This topic explains how to create AWS Marketplace Integration Credentials, which you can then use to connect integrations with your AWS Marketplace instance. See [Configuring AWS Marketplace Integrations](https://docs.m3ter.com/guides/integrations/setting-up-integrations/configuring-aws-integrations).

**To create AWS Marketplace integration Credentials:**

1. Select **Integrations**. The **Integrations** page opens.
2. Select **Marketplace Integrations**. The **Integrations** page adjusts.
3. Select **AWS**. The **Integrations>AWS** page opens.
4. On the **Credentials** panel, select **Configure new credentials**. The **Create** pages opens.
5. Under **Credential details** enter:

- **Name**. Descriptive name for the Credential.
   - **Destination**. This will be pre-selected for **AWS**.
   - **Account id**. The id of the AWS account that hosts the IAM role m3ter will assume when connecting with AWS Marketplace.
   - **Role name**. The name of the IAM role that m3ter will assume:

- In AWS, the role requires the following permissions.
       - **aws-marketplace:DescribeEntity**
       - **aws-marketplace:BatchMeterUsage**
       - **aws-marketplace:ListEntities**
     - Since the role will be impersonated by m3ter, its trust policy should include an **AssumeRole** action with a filtering condition. See [Creating AWS S3 Bucket Export Destinations](https://docs.m3ter.com/guides/data-exports/creating-data-export-destinations#creating-aws-s3-bucket-export-destinations) for details on how to set up the required type of IAM role in your AWS account. Valid examples below:

**Permission Policy**

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "aws-marketplace:BatchMeterUsage",
                "aws-marketplace:ListEntities",
                "aws-marketplace:DescribeEntity"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}
```

**Trust policy**

```json
{
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::816069165829:role/m3terExternalRole"
            },
            "Action": "sts:AssumeRole",
            "Condition": {
                "StringEquals": {
                    "sts:ExternalId": "<m3ter Org Id>"
                }
            }
        }
```

6. Select **Create credential**. You are returned to the **Integrations>AWS** page where the new Credential is listed on the **Credentials** panel:

- The Credential is now available for connecting your AWS Marketplace Integration to your AWS Marketplace instance. See [Configuring AWS Marketplace Integrations>Setting Up Authentication for the Integration](https://docs.m3ter.com/guides/integrations/setting-up-integrations/configuring-aws-integrations#setting-up-authentication-for-the-integration).
