Configure Environment Variables

Add, import, scope, derive, and protect service environment variables.

Environment variables are stored per service and environment in an infrastructure configuration. Values can be entered directly or derived from another configured component.

Add Variables

  1. Open the service component in Architect.
  2. Open Environment variables and select the target environment.
  3. Select Add variable.
  4. Enter the variable name and value.
  5. Mark the value Sensitive when it contains a password, token, or other secret.
  6. Save the component.

Use uppercase names with underscores, for example DATABASE_HOST or QUEUE_URL. Variable names should remain consistent across environments even when values differ.

Import Existing Values

Use the bulk importer to paste standard KEY=value lines from an existing .env file. Review the parsed values and mark secrets as sensitive before saving.

APP_ENV=production
LOG_LEVEL=info
FEATURE_CHECKOUT=true

The JSON view is useful for larger edits. Each value must be a string or an array of scoped entries containing a string value, an array of scopes, and an optional sensitive flag.

Use Derived Values

The value picker exposes outputs from other components in the same infrastructure configuration. Available outputs depend on the component type and can include:

  • Service base URL or domain.
  • Database host, port, username, and password.
  • Queue URL and name.
  • Storage bucket name.
  • Kafka bootstrap servers.
  • Cache host and port.

Derived values follow the deployed component and avoid copying generated AWS names into configuration by hand.

Scope Values

A variable may use scoped values when different build or runtime contexts require different content. Keep scopes narrow and document why the override exists. If only the lifecycle environment differs, prefer the normal environment tabs.

Secret Handling

Verify a Change

Environment-variable changes take effect only through the relevant infrastructure or service deployment. Review the configuration diff, deploy it, and confirm the application reads the expected value without printing secrets to logs.