How Environment Variables Work
When you deploy a web server or worker, Springwinter writes your environment variables directly into the ECS task definition for that service. Each time a new task starts — whether due to a redeploy, a scaling event, or a task replacement — ECS passes the variables to your container process as part of the startup sequence. No sidecar, secrets agent, or custom SDK is required; your application reads them withprocess.env, os.environ, System.getenv, or whichever standard mechanism your language provides.
Environment variables are scoped to a single resource. A web server and a worker inside the same project do not automatically share variables — you set them independently for each resource.
Reading Environment Variables
To retrieve the current environment variable set for a resource, send aGET request to the environment endpoint for that resource type:
{ "name": "...", "value": "..." } objects representing every variable currently set on the resource.
Setting Environment Variables
To update the environment variables for a resource, send aPUT request with the complete list of variables you want active:
Applying Changes
Setting new environment variables does not automatically restart your service. You must trigger a redeploy for the updated task definition — and therefore the new variables — to take effect. You can do this from the dashboard by clicking Redeploy, or via the API:Preview Environments
Preview environments inherit the environment variables of the production resource they are based on at the time the preview is created. You can override individual variables for a specific preview by calling the samePUT endpoint on the preview resource:
Handling Sensitive Values
To use an ECS secret reference, set the variable value to the ARN of the Secrets Manager secret or the name of a Systems Manager Parameter Store parameter. Ensure the IAM role Springwinter assumes hassecretsmanager:GetSecretValue or ssm:GetParameters permission for the resource in question.