# IAM Permissions

Source: https://wraps.dev/docs/guides/aws-setup/permissions

View and configure the exact AWS IAM permissions required for Wraps to deploy infrastructure to your account.

5 min

View Required Permissions

Use the CLI to see exactly what permissions are needed for your configuration:

terminal.sh

```
npx @wraps.dev/cli permissions
```

## Command Options

The `permissions` command supports several options to customize the output:

\--policy-dir <dir>

Write the policy to a folder as `wraps-deployer-1.json`, `wraps-deployer-2.json`, and so on. Each file is a bare IAM policy small enough for one managed policy: IAM caps a managed policy at 6,144 characters, whitespace not counted, and the full Wraps policy is larger. The folder is created if it's missing. Older `wraps-deployer-<n>.json` files numbered above the new count are removed; nothing else in the folder is touched.

terminal.sh

```
npx @wraps.dev/cli permissions --policy-dir ./wraps-policy
```

\--json

For scripts and agents. Prints a JSON envelope (`{ success, command, data }`), not a policy you can paste into IAM. `data.policies` holds the split, one `{ name, policy }` per `wraps-deployer-<n>`. `data.policy` is the merged document: it can exceed 6,144 characters, so it only fits as a role's inline policy (10,240 characters across all of that role's inline policies).

terminal.sh

```
npx @wraps.dev/cli permissions --json
```

\--preset <name>

Write the policies for a specific preset (starter, production, or enterprise):

terminal.sh

```
npx @wraps.dev/cli permissions --preset production --policy-dir ./wraps-policy
```

\--service <name>

Write the policies for a specific service (email, sms, or cdn):

terminal.sh

```
npx @wraps.dev/cli permissions --service email --policy-dir ./wraps-policy
```

## Permissions by Preset

The AWS services required depend on which configuration preset you choose:

Starter

~$0.05/mo

Basic email sending with open/click tracking

IAMSTSSESCloudWatch

Production

~$2-5/mo

Full event tracking with email history storage

IAMSTSSESCloudWatchEventBridgeSQSLambdaDynamoDB

Enterprise

~$50-100/mo

All features including SMTP credentials

IAMSTSSESCloudWatchEventBridgeSQSLambdaDynamoDBIAM User Management

## Optional Permissions

These permissions enhance functionality but are not required:

Route53

Automatic DNS record management

**Alternative:** Add DNS records manually to your provider

IAM OIDC Provider

Vercel deployments (OIDC federation)

**Alternative:** Use AWS access keys instead

## 

1

Generate the Policies

Write the IAM policies to a folder. The full Wraps policy is larger than one managed policy allows, so it is split into `wraps-deployer-1.json`, `wraps-deployer-2.json`, and so on. A single service or preset may fit in one file.

terminal.sh

```
npx @wraps.dev/cli permissions --policy-dir ./wraps-policy
```

## 

2

Create One Policy per File

Repeat these steps for each file in the folder.

1.  1
    
    Go to [IAM → Policies](https://console.aws.amazon.com/iam/home#/policies) in the AWS Console
    
2.  2
    
    Click **Create Policy**
    
3.  3
    
    Select the **JSON** tab
    
4.  4
    
    Paste the contents of one file, such as `wraps-deployer-1.json`
    
5.  5
    
    Name it after the file: `wraps-deployer-1`
    
    IAM policy names are unique per account. If different users or roles in one account need different scopes, add the scope before the file number, such as `wraps-deployer-email-1` for that scope's `wraps-deployer-1.json`. Keep the number so each policy still matches its file, and read `wraps-deployer-<n>` in the steps below as `wraps-deployer-email-<n>`.
    

## 

3

Attach to Your IAM User/Role

1.  1
    
    Go to [IAM → Users](https://console.aws.amazon.com/iam/home#/users) (or Roles)
    
2.  2
    
    Select your user or role
    
3.  3
    
    Click **Add permissions → Attach policies**
    
4.  4
    
    Search for and select every `wraps-deployer-<n>` policy
    

Each user takes up to 10 managed policies by default (20 per role, 10 per group), and the policies already attached count toward that. Wraps splits its policy into 3 files or fewer.

## Updating the Policies

A new Wraps version can add permissions or move a statement to a different file. When it does:

-   **Regenerate the files**
    
    Run `wraps permissions --policy-dir ./wraps-policy` into the same folder as last time, with the same `--service` and `--preset` you used before.
    
-   **Update every policy**
    
    Open each `wraps-deployer-<n>` policy, choose Edit, and paste its file into the JSON tab. IAM keeps up to 5 versions of a managed policy; when you save a sixth, the console asks you to delete an old one.
    
-   **Match the number of files**
    
    Create and attach a policy for each new file. The CLI lists the files it removed from the folder: detach and delete the policies named after them. If you used a new folder, delete any `wraps-deployer-<n>` policy numbered above the new file count.
    
-   **Replace an old single policy**
    
    If you attached one `WrapsDeploymentPolicy` before, attach the `wraps-deployer-<n>` policies, then detach it.
    

## Permission Errors

If you encounter permission errors during deployment:

-   **Check the error message**
    
    Wraps provides specific guidance for each permission error
    
-   **Regenerate the policy**
    
    Run `wraps permissions --policy-dir ./wraps-policy` and update each `wraps-deployer-<n>` policy from its file
    
-   **Check for SCPs**
    
    AWS Organizations may have Service Control Policies restricting what you can do
    

## Next Steps

Deploy Infrastructure

Now that permissions are set up, deploy your first service.

[Deploy Email](https://wraps.dev/docs/quickstart/email)

Troubleshooting

Having issues? Check common problems and solutions.

[Troubleshooting](https://wraps.dev/docs/guides/aws-setup/troubleshooting)
