---
title: "AWS Secret Manager"
description: "How to automatically sync secrets from Infisical to your AWS Secret Manager."
---

Prerequisites:

- Set up and add envars to [Infisical Cloud](https://app.infisical.com)
- Set up AWS and have/create an IAM user

## Grant the IAM user permissions to access AWS Secret Manager

Navigate to your IAM user permissions and add a permission policy to grant access to AWS Secret Manager.

![integration IAM 1](../../images/integrations-aws-iam-1.png)
![integration IAM 2](../../images/integrations-aws-secret-manager-iam-2.png)
![integrations IAM 3](../../images/integrations-aws-secret-manager-iam-3.png)

For better security, here's a custom policy containing the minimum permissions required by Infisical to sync secrets to AWS Secret Manager for the IAM user that you can use:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowSecretsManagerAccess",
      "Effect": "Allow",
      "Action": [
        "secretsmanager:GetSecretValue",
        "secretsmanager:CreateSecret",
        "secretsmanager:UpdateSecret"
      ],
      "Resource": "*"
    }
  ]
}
```

## Navigate to your project's integrations tab

![integrations](../../images/integrations.png)

## Authorize Infisical for AWS Secret Manager

Obtain a AWS access key ID and secret access key for your IAM user in IAM > Users > User > Security credentials > Access keys

![access key 1](../../images/integrations-aws-access-key-1.png)
![access key 2](../../images/integrations-aws-access-key-2.png)
![access key 3](../../images/integrations-aws-access-key-3.png)

Press on the AWS Secret Manager tile and input your AWS access key ID and secret access key from the previous step.

![integration auth](../../images/integrations-aws-secret-manager-auth.png)

<Info>
  If this is your project's first cloud integration, then you'll have to grant
  Infisical access to your project's environment variables. Although this step
  breaks E2EE, it's necessary for Infisical to sync the environment variables to
  the cloud platform.
</Info>

## Start integration

Select which Infisical environment secrets you want to sync to which AWS Secret Manager region and under which secret name. Then, press create integration to start syncing secrets to AWS Secret Manager.

![integration create](../../images/integrations-aws-secret-manager-create.png)

<Info>
  Infisical currently syncs environment variables to AWS Secret Manager as
  key-value pairs under one secret. We're actively exploring ways to help users
  group environment variable key-pairs under multiple secrets for greater
  control.
</Info>
