Update Environment Compose Definition
PUT /api/v3/organizations/{organisation}/applications/{application}/environments/{environment}
Replaces the entire task definition for the environment based on the provided multi-container compose definition. This will create a new task definition revision and update the ECS service, triggering a redeployment. Optionally accepts minCapacity and maxCapacity at the root level for convenience.
Authorizations
Parameters
Path Parameters
The organisation ID
The application ID
The environment ID
Request Body required
object
object
object
Name of the container
object
Specifies whether the image is internal (ECR) or external (e.g., Docker Hub)
The image identifier. For ‘internal’ type, this is the image tag. For ‘external’ type, this is the full image name.
Container-level CPU units
Container-level memory hard limit (MiB)
Container-level memory soft limit (MiB)
List of container ports to expose
object
The name of the logical volume
The path inside the container where the volume is mounted
Environment variables specific to this container
object
Environment variable name
Environment variable value
Secrets mapped to environment variables
object
The environment variable name to be set in the container
The key of the secret in the environment’s ‘app-secrets’ store
Container health check configuration
object
The command to run to determine if the container is healthy
Time period (seconds) between health checks
Time period (seconds) to wait for a health check to return
Number of times to retry a failed health check
Grace period (seconds) to ignore unhealthy checks after container starts
Container startup dependencies
object
The name of the container this container depends on
The condition to wait for on the dependency
Enable origin protection for all exposed ports on this container
CPU architecture (X86_64 or ARM64)
Task-level CPU units (e.g., 256, 512, 1024)
Task-level memory in MB
Minimum number of instances
Maximum number of instances
Spot instance strategy configuration for controlling cost vs reliability. Spot instances provide significant cost savings (~70%) but may be interrupted by AWS. Available for non-production environments.
object
Spot instance strategy. ‘off’ = On-Demand only (highest reliability, no savings). ‘spot-only’ = 100% Spot instances (~70% savings, default for non-prod). ‘mixed-safe’ = 50% Spot instances (~35% savings, requires multiple instances). ‘mixed-aggressive’ = 80% Spot instances (~56% savings, requires multiple instances).
spot-onlyOptional. Enable cross-environment networking within the same application. When false (default): Uses shared security group for complete isolation (most secure). When true: Uses app-specific security group to enable communication between environments of the same application (e.g., staging can connect to production database). Note: If enableCrossAppNetworking is true, this setting is overridden.
Optional. Enable cross-application networking within the same organization. When false (default): Uses shared/app-specific security group based on enableCrossEnvNetworking. When true: Uses org-specific security group to enable container-to-container communication with ALL applications in the same organization via service discovery (microservices architecture). This setting takes priority over enableCrossEnvNetworking.
Optional. Minimum number of tasks for auto-scaling. If provided at root level, will be merged into composeDefinition.
Optional. Maximum number of tasks for auto-scaling. If provided at root level, will be merged into composeDefinition.
Responses
202
Request accepted, compose definition update is processing.
400
Invalid compose definition or validation failed.
object
object
404
Application or environment not found