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, putbuild_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
- Open the resource’s Environment page.
- Choose Build for a GitHub web server or worker. Static websites show build variables only.
- Edit values and select Save build variables.
- Select Redeploy, or rebuild the selected preview, to apply them.
Dockerfile example
Declare a matchingARG in the Dockerfile stage that uses the value:
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.
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
variables array:
Replace variables through the API
Use the resource’s environment endpoint with this JSON body: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.
GITHUB_TOKEN, REPOSITORY_URI, and PATH, and names beginning with AWS_, CODEBUILD_, or SW_, are reserved for build variables.