# ResourceNotFoundException: Secrets Manager can't find the specified secret

AWS error fixes · Updated 17 November 2026

**Short answer:** Secrets Manager has no secret matching that name or ARN in the Region and account you called. Usually the client is in a different Region from the secret (they are Regional), the name is slightly different, or the secret was deleted. A variant mentioning a staging label means the secret exists but has no version with that label.

## What it looks like

```
An error occurred (ResourceNotFoundException) when calling the GetSecretValue
operation: Secrets Manager can't find the specified secret.
```

The variant `Secrets Manager can't find the specified secret value for staging label: AWSPENDING` means the secret exists but no version carries that label, usually during or after an interrupted rotation. A missing permission produces `AccessDeniedException` instead, so this error tells you the request was allowed but the lookup failed.

## Causes, most common first

1. **Wrong Region.** Secrets exist in one Region unless replicated. A secret in `eu-west-2` is invisible to a client configured for `eu-west-1`.
2. **Name differs.** Names are case-sensitive, and path-like names (`prod/orders/db`) are easy to get slightly wrong between environments.
3. **Partial or mistyped ARN.** Secret ARNs end in a hyphen and six random characters. A full ARN with the wrong suffix fails; for other accounts' secrets you must use the full ARN.
4. **Deleted secret.** A secret scheduled for deletion fails differently (it is "marked for deletion") until the recovery window ends; after that it is gone.
5. **Wrong account** or credentials resolving to a different profile.

## Diagnose

List secrets by name prefix in the Region you expect, including ones pending deletion:

```
aws secretsmanager list-secrets --region eu-west-2 \
  --filters Key=name,Values=prod/orders \
  --include-planned-deletion \
  --query 'SecretList[].[Name,ARN,DeletedDate]' --output table
```

Describe the secret to see its versions and staging labels:

```
aws secretsmanager describe-secret --secret-id prod/orders/db --region eu-west-2 \
  --query '{arn:ARN,versions:VersionIdsToStages,rotation:RotationEnabled,replicas:ReplicationStatus[].Region}'
```

If the secret appears in neither Region you checked, look across Regions or in CloudTrail for `DeleteSecret`.

## Fix it

- **Set the Region explicitly** on the client, or replicate the secret to the Regions that read it.

- **Use the secret's full ARN** in IAM policies, ECS task definitions and cross-account access; use the name in same-account application code if you prefer.

- **Restore a secret scheduled for deletion** within its recovery window:

  ```
  aws secretsmanager restore-secret --secret-id prod/orders/db --region eu-west-2
  ```

- **Fix staging labels** after a failed rotation: confirm a version holds `AWSCURRENT`, then let rotation retry or move the label with `update-secret-version-stage`.

- **ECS**: a wrong secret ARN in a task definition stops the task at start-up; see [ResourceInitializationError](https://cloudconsole.dev/errors/ecs-resourceinitializationerror).

## Mistakes to avoid

- Recreating a secret with the same name and assuming its ARN is unchanged. The random suffix is new, so policies and task definitions using the old full ARN break.
- Fetching secrets on every request with no caching; use a caching client or the Lambda extension, which also reduces API calls when a secret is missing.
- Logging the secret value while debugging this error. Log the name, Region and ARN only.

## Questions

### Is AWS Secrets Manager Regional?

Yes. Each secret lives in one Region unless you configure replication. Clients must call the Region where the secret, or a replica, exists.

### How do I get a secret from Secrets Manager in eu-west-2 with the CLI?

Run aws secretsmanager get-secret-value --secret-id with the name or ARN and --region eu-west-2, adding --query SecretString --output text for just the value.

### Can I recover a deleted secret?

Only during its recovery window (7 to 30 days, set when deleting), using restore-secret. After the window ends the secret is permanently deleted.

## When this happens away from your desk

When an application cannot read its database secret, every request fails at once. CloudConsole, a phone app for AWS, is built to show those error alarms and the log lines behind them on your phone so the cause is clear quickly.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [AWS Secrets Manager User Guide](https://docs.aws.amazon.com/secretsmanager/latest/userguide/)
- [GetSecretValue API reference](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html)

## Related

- [aws secretsmanager get-secret-value](https://cloudconsole.dev/cli/secretsmanager-get-secret-value)
- [aws secretsmanager create-secret](https://cloudconsole.dev/cli/secretsmanager-create-secret)
- [aws secretsmanager put-secret-value](https://cloudconsole.dev/cli/secretsmanager-put-secret-value)
- [ResourceInitializationError: unable to pull secrets or registry auth](https://cloudconsole.dev/errors/ecs-resourceinitializationerror)
- [eu-west-2: Europe (London)](https://cloudconsole.dev/regions/eu-west-2)
- [KMS AccessDeniedException when reading an encrypted S3 object or secret](https://cloudconsole.dev/errors/kms-access-denied)
- [You can't create this secret because a secret with this name is already scheduled for deletion](https://cloudconsole.dev/errors/secretsmanager-secret-scheduled-for-deletion)

---

Source: https://cloudconsole.dev/errors/secretsmanager-cant-find-secret

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
