# IAM policy example: read one Secrets Manager secret, with a least privilege rewrite

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

Allows a role to read the value of one secret and see its details. The secret ARN ends with a random six-character suffix, so the policy uses a wildcard on the suffix. The AWS documentation shows this pattern. The original allows secretsmanager:* on all secrets.

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

## What it allows

- Allows every Secrets Manager action on every secret.

- Allows 27 actions (secretsmanager:*) on every resource.

Checks:
- high: Allows 17 write or permissions-management actions (3 permissions management) on every resource ("Resource": "*"). (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)

The action secretsmanager:* covers 27 actions, including reading, replacing and deleting all secrets.

## Least privilege rewrite

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadOneSecret",
      "Effect": "Allow",
      "Action": [
        "secretsmanager:GetSecretValue",
        "secretsmanager:DescribeSecret"
      ],
      "Resource": "arn:aws:secretsmanager:us-east-1:111122223333:secret:prod/orders/db-??????"
    }
  ]
}
```

The rewrite names one secret and two read actions. The six question marks match the random suffix. Writing and deleting secrets are removed.

- Allows 2 actions (secretsmanager:GetSecretValue, secretsmanager:DescribeSecret) on arn:aws:secretsmanager:us-east-1:111122223333:secret:prod/orders/db-??????.

Checks:
- No flags.

- [Paste it into the workbench](/)
- [Every Secrets Manager action and its access level](/actions/secretsmanager/)

## Related pages

- [IAM policy example: read Secrets Manager secrets by tag](/examples/secretsmanager-read-secrets-by-tag/)
- [IAM policy example: read a Parameter Store path](/examples/ssm-read-parameter-path/)
- [IAM policy example: write parameters under a team path](/examples/ssm-write-own-parameter-path/)
- [All of them](/examples/)

## Sources

- AWS Secrets Manager User Guide: permissions policy examples: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html (read 16 Nov 2026)
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026): https://docs.aws.amazon.com/service-authorization/latest/reference/service-reference.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://iampolicygenerator.com/examples/secretsmanager-read-one-secret/

This site is not affiliated with Amazon Web Services. AWS service and product names are used only to describe AWS services.
