Also available: Markdown version · llms.txt · full site content
Functions
Environment variables and secrets
Per-function configuration in two classes: plain environment variables for non-sensitive values, and encrypted secrets for credentials. Both reach your code as ctx.env at invocation time.
Variables vs secrets
| Environment variables | Secrets | |
|---|---|---|
| Visible in the Console | Yes, to project members | Names and timestamps only — never values |
| Storage | Function metadata | Encrypted at rest in the platform secrets store |
| Use for | Model names, sender addresses, feature flags | API keys, webhook signing secrets, tokens |
| In code | ctx.env.NAME | ctx.env.NAME (identical) |
- Names use uppercase letters, digits and underscores; a name cannot be both a variable and a secret.
- Platform-reserved prefixes (CUBIBASE_, AWS_) are rejected for your own values.
- Saving a secret again under the same name rotates it. Deleting one destroys the encrypted value.
- Values are snapshotted into each deployment. After changing configuration, redeploy so the active version picks it up — the Console tells you when this is needed.
What never happens
- Secret values are never returned by read APIs, never included in deployment logs, and never sent to the browser after the initial save.
- Execution logs are redacted: authorization headers, bearer tokens, API keys and common credential patterns are masked before storage.
- One function cannot read another function’s secrets, and no function can read another project’s anything.
- The HMAC signing secret is separate from your named secrets, shown once at creation/rotation, with the previous secret kept valid during rollover.