Skip to content

Environments

An environment is a deployment target within a project — typically production, staging, or development. Each environment has its own infrastructure, secrets, domain, and deployment history.

Terminal window
ske environment:create \
--project my-app \
--name production \
--provider aws \
--region us-east-1
✓ Environment "production" created

Each environment is tied to a specific cloud provider and region. You can have environments on different providers — for example, staging on GCP and production on AWS.

Setting Description
name / slug Identifier for the environment
cloud_provider_id Which connected provider to use
region Cloud region for deployment
network_id Optional VPC/network for private resources
database_id Optional database instance
cache_id Optional cache instance
vanity_url Auto-generated URL for accessing the environment
maintenance_mode Whether the environment is in maintenance mode
protected Whether the environment requires elevated permissions to deploy

Mark an environment as protected to require additional permissions for deployment. This prevents accidental deploys to production by team members who only have staging access.

Each environment is fully isolated:

  • Separate container image version
  • Separate secrets and environment variables
  • Separate cloud resources (database, cache connections)
  • Separate deployment history
  • Separate custom domains

A deployment to staging never affects production. Rolling back one environment has no effect on others.

Environments are configured in ske.yml:

name: my-app
environments:
production:
region: us-east-1
memory: 1024
timeout: 30
concurrency: 100
staging:
region: us-east-1
memory: 512
timeout: 60

When your project has multiple environments, specify which one to target with --env:

Terminal window
ske deploy --env staging

If ske.yml defines exactly one environment, the CLI uses it automatically without requiring --env.

The --env flag works on any environment-scoped command:

Terminal window
ske secret list --env production
ske deploy --env staging
ske status --env production

You can also set --project to target a different project entirely:

Terminal window
ske deploy --project api --env production