Premium feature: AWS Secrets Manager integration requires a Bruno Pro or Ultimate license. View Bruno pricing.
This collection demonstrates how to retrieve AWS Secrets Manager values in Bruno v4 without hardcoding credentials or secrets in requests.
- Secret mappings moved from Collection → Secrets to Environment → External Secrets.
- Configuration is stored in each environment file under
externalSecrets; Bruno no longer reads the collection-levelsecrets.json. - The recommended request-field syntax is
{{secret-name.key-name}}. - The legacy
{{$secrets.secret-name.key-name}}syntax still works in v4, but is deprecated and will be removed in the next major release.
- Bruno v4 with a Pro or Ultimate license
- An AWS account with a secret stored in AWS Secrets Manager
- An environment selected in Bruno, such as
local - AWS credentials or an AWS CLI profile with permission to read the secret
At minimum, grant secretsmanager:GetSecretValue. Listing or browsing secrets
may require additional permissions such as secretsmanager:ListSecrets.
-
Open AWS Secrets Manager in the AWS Console.
-
Create or open a secret containing key/value data, for example:
{ "username": "bruno", "password": "replace-with-a-secret", "access_key": "topsecret", "version": "v4" } -
Copy either its exact Secret name or full ARN.
-
Note the AWS Region that contains the secret, such as
us-east-1.
- Open Preferences → Secrets Manager.
- Click + Add Secret Manager.
- Select AWS Secrets Manager.
- Enter an account name, such as
Product Server. - Choose an authentication mode:
- Manual: enter the Access Key ID, Secret Access Key, optional Session Token, and Region.
- AWS CLI: use credentials from your configured AWS CLI profile.
- Click Test Connection.
- Click Save.
The Session Token is required only for temporary credentials or an assumed role. Prefer short-lived credentials or an AWS CLI profile over long-lived access keys.
Starting in v4, this configuration belongs to an environment rather than the collection.
- Select the environment from the environment selector.
- Open the environment editor.
- Go to External Secrets.
- Select AWS Secrets Manager.
- Select the AWS account created in Step 2.
- Add a mapping:
- Name:
secret - AWS Secret Name / ARN: the exact secret name or ARN
- Enabled: on
- Name:
- Save the environment.
The equivalent environment YAML is:
name: local
variables:
- name: baseURL
value: https://echo.usebruno.com
externalSecrets:
type: aws-secrets-manager
variables:
- name: secret
secretName: arn:aws:secretsmanager:us-east-1:123456789012:secret:prod/usebruno
enabled: trueYou can replace the ARN with a short secret name. Each Bruno environment has
its own externalSecrets block, allowing development, staging, and production
to use different AWS accounts, Regions, or secrets.
- Open Environment → External Secrets.
- Click Fetch Secrets in the top-right corner.
- Verify that keys such as
access_key,username,password, andversionappear in the Secret Keys column.
Fetching again replaces the currently fetched values.
External secrets can be referenced in request URLs, headers, query parameters, bodies, and authentication fields.
{
"name": "usebruno",
"msg": "The most loving API client for developers",
"apiKey": "{{secret.access_key}}"
}The pattern is:
{{<secret-name>.<key-name>}}
This still resolves in Bruno v4, but is deprecated:
{{$secrets.secret.access_key}}
Bruno underlines legacy references in the editor. Update them before the next major release.
The script API remains unchanged:
const apiKey = bru.getSecretVar('secret.access_key');
req.setHeader('Authorization', 'Bearer ' + apiKey);- Ensure
secrets.jsonis writable. - Open the collection in the Bruno v4 app.
- Bruno automatically migrates the mappings into the relevant environment file.
- Verify them under Environment → External Secrets.
- Replace
{{$secrets.name.key}}references with{{name.key}}. - Commit the updated environment file.
- After verification, delete the obsolete
secrets.json.
The Bruno CLI does not auto-migrate. Open the collection in the app before running it through the CLI or CI.
Export the account from Preferences → Secrets Manager as a .env file, or
create one containing:
BRUNO_AWS_ACCESS_KEY_ID=your-access-key-id
BRUNO_AWS_SECRET_ACCESS_KEY=your-secret-access-key
BRUNO_AWS_SESSION_TOKEN=your-session-token
BRUNO_AWS_REGION=us-east-1BRUNO_AWS_SESSION_TOKEN is optional unless temporary credentials are used.
When BRUNO_AWS_* variables are absent, Bruno falls back to the standard
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and
AWS_REGION variables.
Run the collection with:
bru run collection/ --env local --secrets-env-file ./secrets.envCredential files contain plain-text credentials. Add them to .gitignore and
never commit them.


