Skip to content

Create a new environment

POST
/api/v3/organizations/{organisation}/applications/{application}/environments

Authorizations

Parameters

Path Parameters

organisation
required
string

The organisation ID

application
required
string

The application ID

Request Body required

object
envName
required

Environment name (e.g., ‘staging’, ‘development’)

string
minCapacity

Minimum number of instances

integer
maxCapacity

Maximum number of instances

integer
cloneConfigurationFrom

Clone configuration from an existing environment

string
composeDefinition
object
containers
Array<object>
object
name
required

Name of the container

string
/^[a-zA-Z0-9_-]+$/
imageReference
required
object
type
required

Specifies whether the image is internal (ECR) or external (e.g., Docker Hub)

string
Allowed values: internal external
identifier
required

The image identifier. For ‘internal’ type, this is the image tag. For ‘external’ type, this is the full image name.

string
cpu

Container-level CPU units

integer
nullable
memory

Container-level memory hard limit (MiB)

integer
nullable
memoryReservation

Container-level memory soft limit (MiB)

integer
nullable
exposedPorts

List of container ports to expose

Array<integer>
nullable
mountPoints
Array<object>
nullable
object
sourceVolume
required

The name of the logical volume

string
containerPath
required

The path inside the container where the volume is mounted

string
readOnly
boolean
environment

Environment variables specific to this container

Array<object>
nullable
object
name
required

Environment variable name

string
value
required

Environment variable value

string
secrets

Secrets mapped to environment variables

Array<object>
nullable
object
name
required

The environment variable name to be set in the container

string
valueFrom
required

The key of the secret in the environment’s ‘app-secrets’ store

string
healthCheck

Container health check configuration

object
command

The command to run to determine if the container is healthy

Array<string>
interval

Time period (seconds) between health checks

integer
default: 30 >= 5 <= 300
timeout

Time period (seconds) to wait for a health check to return

integer
default: 5 >= 2 <= 60
retries

Number of times to retry a failed health check

integer
default: 3 >= 1 <= 10
startPeriod

Grace period (seconds) to ignore unhealthy checks after container starts

integer
nullable <= 300
dependsOn

Container startup dependencies

Array<object>
nullable
object
containerName
required

The name of the container this container depends on

string
condition

The condition to wait for on the dependency

string
Allowed values: START HEALTHY COMPLETE SUCCESS
command
Array<string>
nullable
entryPoint
Array<string>
nullable
workingDirectory
string
nullable
essential
boolean
default: true nullable
readonlyRootFilesystem
boolean
nullable
user
string
nullable
originProtection

Enable origin protection for all exposed ports on this container

boolean
nullable
architecture

CPU architecture (X86_64 or ARM64)

string
taskCpu

Task-level CPU units (e.g., 256, 512, 1024)

integer
taskMemory

Task-level memory in MB

integer
minCapacity

Minimum number of instances

integer
maxCapacity

Maximum number of instances

integer
spotConfiguration

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
strategy
required

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).

string
default: spot-only
Allowed values: off spot-only mixed-safe mixed-aggressive
spot-only
enableCrossEnvNetworking

Optional. 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.

boolean
nullable
enableCrossAppNetworking

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.

boolean
nullable
imageSuffix

Optional image tag suffix for cloning

string
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/
spotConfiguration

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
strategy
required

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).

string
default: spot-only
Allowed values: off spot-only mixed-safe mixed-aggressive
spot-only
environment

Environment variables to inject

Array<object>
object
name

Variable name

string
value

Variable value

string
mergeEnvironment

Whether to merge environment variables with cloned ones (true) or replace them (false). Default: false

boolean

Responses

201

The environment created

Environment response schema with runtime details

object
envName
required

Environment name

string
production
status

Environment status

string
ACTIVE
runningCount

Number of running tasks

integer
2
desiredCount

Desired number of tasks

integer
2
minCapacity

Minimum capacity for autoscaling

integer
1
maxCapacity

Maximum capacity for autoscaling

integer
5
publicIpAddress

Public IP address for SSH access

string
nullable
54.123.45.67
deploymentStatus

Deployment status

string
COMPLETED
taskDefinition

ECS task definition details

object
service

ECS service details

object
loadBalancer

Load balancer configuration

object
securityGroup

Security group configuration

object
subnet

Subnet configuration

object
vpc

VPC configuration

object
containers

Container configurations

Array<object>
object
volumes

Persistent storage volumes

Array<object>
object
volumeId
string
volumeName
string
description
string
environmentEfsId
string
createdAt
string
rootDirectory
string
accessPointId
string
accessPointArn
string
cron

Scheduled cron jobs

Array<object>
object
name
string
schedule
string
command
string
albRouting

ALB routing configuration

object
createdAt

Creation timestamp

string format: date-time
updatedAt

Last update timestamp

string format: date-time

400

The environment data is invalid

403

Environment limit reached - application has reached the maximum number of allowed environments

object
message
string
Environment limit reached
error
string
Application my-app has reached the maximum number of allowed environments (5/5). Please contact support to increase your limit.