Aws Sm
Read, write, and delete secrets stored in AWS Secrets Manager, with support
for vault annotations (swamp vault annotate / swamp vault inspect).
Emits OpenTelemetry spans for vault operations so failures and latency are
attributable in traces when a TracerProvider is configured.
Deletion uses the default 30-day recovery window — the secret is scheduled for deletion and can be restored within that period. The secret name cannot be reused until the recovery window expires.
Authentication
Uses the default AWS credential chain — no credentials in config. Provide credentials via one of:
- Environment variables:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - AWS profile:
~/.aws/credentials - IAM role attached to the instance or task
Set the optional profile config key to pin the vault to a named AWS
profile from ~/.aws/config instead. A configured profile takes precedence
over environment-variable credentials, so the vault keeps its identity
regardless of what the surrounding shell exports. Profiles that assume a
role and SSO profiles are supported; credential_process profiles may not
be.
Required IAM Permissions
secretsmanager:GetSecretValuesecretsmanager:PutSecretValuesecretsmanager:CreateSecretsecretsmanager:ListSecretssecretsmanager:DescribeSecretsecretsmanager:UpdateSecretsecretsmanager:TagResourcesecretsmanager:DeleteSecretsecretsmanager:UntagResource
Annotations
Annotations map to native AWS Secrets Manager primitives:
- notes → secret Description field
- labels → resource tags (key-value pairs)
- url → secret Description field (trailing
swamp:url=line; stored there rather than a tag because AWS tag values reject URL characters like?and&. A legacyswamp:urltag is still read for back-compat.)
swamp vault annotate my-aws-sm API_KEY \
--url https://console.aws.amazon.com/iam \
--note "Production API key" \
--label env=prod --label team=infra
swamp vault inspect my-aws-sm API_KEY --jsonUsage
swamp vault create @swamp/aws-sm my-aws-sm \
--config '{"region": "us-east-1"}' --json
# Or pinned to a named AWS profile:
swamp vault create @swamp/aws-sm my-aws-sm \
--config '{"region": "us-east-1", "profile": "my-profile"}' --json
swamp vault get my-aws-sm my/secret/name --json
swamp vault put my-aws-sm my/secret/name "s3cr3t" --json
swamp vault delete my-aws-sm my/secret/name --json
swamp vault list-keys my-aws-sm --jsonSecret Key Format
Secret keys map directly to AWS Secrets Manager secret names, including
path-style names such as myapp/production/db-password.
AWS Secrets Manager vault provider. Authenticates via the default AWS credential chain, or a named profile when one is configured.
Config Fields
| Field | Type | Description |
|---|---|---|
| region | string | AWS region where the Secrets Manager secrets are stored e.g. us-east-1 |
| profile? | string | Named AWS profile from ~/.aws/config or ~/.aws/credentials. When omitted, the default AWS credential chain is used. A configured profile takes precedence over environment-variable credentials. |
Modified 1 vaults
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented0/1missing
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Docs keep secrets in a vault0/1missing
- files/README.md--Line 85 passes the secret's value to `swamp vault put` on the command line, where shell history keeps it. Keep secrets in a vault: store them with `swamp vault put <vault> <key>`, which prompts for the value, and reference them as `${{ vault.get(<vault>, <key>) }}`.
- manifest.yaml--The description passes the secret's value to `swamp vault put` on the command line, where shell history keeps it. Keep secrets in a vault: store them with `swamp vault put <vault> <key>`, which prompts for the value, and reference them as `${{ vault.get(<vault>, <key>) }}`.
Fix or accept each secret-unsafe-docs warning: the README, the manifest description and describe strings should store secrets with `swamp vault put <vault> <key>` (it prompts for the value) and pass them as `${{ vault.get(<vault>, <key>) }}`.
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License2/2earned
- Verified public repository2/2earned