Skip to main content

Aws Sm

@swamp/aws-smv2026.10.24.1· AGPL-3.0-or-later· 2d agoVAULTS
01README

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:GetSecretValue
  • secretsmanager:PutSecretValue
  • secretsmanager:CreateSecret
  • secretsmanager:ListSecrets
  • secretsmanager:DescribeSecret
  • secretsmanager:UpdateSecret
  • secretsmanager:TagResource
  • secretsmanager:DeleteSecret
  • secretsmanager: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 legacy swamp:url tag 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 --json

Usage

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 --json

Secret Key Format

Secret keys map directly to AWS Secrets Manager secret names, including path-style names such as myapp/production/db-password.

02Vaults1
AWS Secrets Managerconfigurable
@swamp/aws-smaws_sm.ts

AWS Secrets Manager vault provider. Authenticates via the default AWS credential chain, or a named profile when one is configured.

Config Fields

FieldTypeDescription
regionstringAWS region where the Secrets Manager secrets are stored e.g. us-east-1
profile?stringNamed 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.
03Previous Versions19
2026.10.23.1AGPL-3.0-or-later(was none)
2026.10.13.1
2026.10.08.1
2026.09.15.0

Modified 1 vaults

2026.09.10.0
2026.09.06.1
2026.08.25.1
2026.08.05.1
2026.07.27.1
2026.07.26.1
2026.07.18.1
2026.06.24.1
2026.06.04.1
2026.05.31.1
2026.05.23.1
2026.05.14.1
2026.05.06.1
2026.04.22.2
2026.04.03.1
04Stats
B
87 / 100
Downloads
4,175
Archive size
219.0 KB
Verified by Swamp
  • 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
05Platforms
06Labels