Skip to main content
A pointer with from: aws-sm reads a secret from AWS Secrets Manager when the workspace starts. The value stays in the memory of the process running the workspace; see how credentials work.

Install

Install the extra where Mirage runs:

Give Mirage access

Mirage uses the AWS SDK’s standard credentials: environment variables, a profile, SSO or an instance role. The region comes from the profile, AWS_DEFAULT_REGION in Python or AWS_REGION in TypeScript. That identity needs secretsmanager:GetSecretValue on the secrets the workspace reads, and kms:Decrypt if a secret uses a customer managed key:

Store a secret

A secret holding a JSON object of strings gives each field name as a key. A secret holding any other text is read with key: value. Mirage reads SecretString only, not binary secrets.

Point at it

workspace.yaml
ref is the secret’s name or ARN.

Use other credentials

To read with credentials other than the process’s own, such as a second account, declare a source with its own settings and use its name in from:
workspace.yaml
Keys in a source’s config can read only from env or a dotenv file.

Cloudflare Workers

A Worker has no AWS credential files or default chain, so the source’s config must give region, aws_access_key_id and aws_secret_access_key. aws_profile isn’t available. See Read secrets from AWS and 1Password.