Skip to main content
Springwinter supports separate build-time and runtime variables. Set them independently for each resource and preview.

Configure the first build

Expand Build variables in the creation form for a GitHub web server, worker, or static website. Web servers and workers have a separate Runtime variables section. Build variables apply to the first build. Creation-time build values are held temporarily in Secrets Manager in your AWS account. Springwinter copies them into CodeBuild when provisioning is ready, then deletes the temporary copy. For API creation, put build_variables inside the web_server, worker, or static_website request object. Runtime values for web servers and workers use the separate variables field.

Change build variables

  1. Open the resource’s Environment page.
  2. Choose Build for a GitHub web server or worker. Static websites show build variables only.
  3. Edit values and select Save build variables.
  4. Select Redeploy, or rebuild the selected preview, to apply them.
Build Save updates the CodeBuild project. It does not deploy or restart the running service. The editor becomes available after build infrastructure is prepared. Build variables do not automatically become runtime variables.

Dockerfile example

Declare a matching ARG in the Dockerfile stage that uses the value:
Set VITE_API_URL=https://api.example.com under Build variables. Springwinter passes customer variable names as Docker build arguments. For static websites, the build command receives these values directly in its environment. Your framework determines which values become part of the generated website.
Use build variables for configuration, not secrets. Values can become part of images, public JavaScript bundles, or logs produced by your build commands. Entering a secret ARN as a value does not automatically resolve that secret.

Runtime variables

For web servers and workers, use Environment → Runtime for values the running process needs. Values live in the ECS task definition. Runtime Save can roll the running service. Static websites have no running application process into which Springwinter can inject runtime values.

Read variables through the API

Successful responses contain a variables array:

Replace variables through the API

Use the resource’s environment endpoint with this JSON body:
Workers and static websites use their corresponding resource collections. Use scope=runtime for runtime reads and "scope": "runtime" for runtime saves. Omitted scope defaults to runtime for compute and build for static websites. Static websites reject runtime scope; public-image servers reject build scope.
PUT replaces the complete editable variable set in the selected scope. Include all values you want to keep. Build Save does not replace Runtime. Platform variables and externally managed typed CodeBuild entries are preserved and are not editable through this plain-value form.
Names must start with a letter or underscore and contain only letters, digits, and underscores. Names must be unique. Platform names such as GITHUB_TOKEN, REPOSITORY_URI, and PATH, and names beginning with AWS_, CODEBUILD_, or SW_, are reserved for build variables.

Preview variables

New GitHub web-server and worker previews copy parent build values when their CodeBuild project is created. Subsequent preview edits stay separate from production. Select the preview on the Environment page before saving. The same scope and request body apply to preview endpoints:
Workers and static websites use their corresponding collections. GET returns the current saved configuration; it may differ from the last deployed build until you rebuild. See Preview environments.