Skip to content

Databases

SKE provisions managed database instances in your cloud account. On AWS, databases run on RDS. On GCP, they run on Cloud SQL.

Terminal window
ske database:create \
--name my-db \
--engine mysql \
--tier small \
--network my-network
✓ Database creation started (job #15)
⠋ Provisioning...

A database must be attached to a network — create the network first (see Networks).

Engine AWS (RDS) GCP (Cloud SQL)
mysql MySQL 8.0 MySQL 8.0
postgres PostgreSQL 16 PostgreSQL 16
aurora-mysql Aurora MySQL
aurora-postgres Aurora PostgreSQL

Aurora engines are AWS-only and provide automatic scaling and multi-AZ replication.

Tier AWS Instance GCP Machine Memory Use case
micro db.t4g.micro db-f1-micro 1 GB Development
small db.t4g.small db-g1-small 2 GB Staging
medium db.m6g.large db-custom-2-8192 8 GB Small production
large db.m6g.xlarge db-custom-4-16384 16 GB Production
xlarge db.m6g.2xlarge db-custom-8-32768 32 GB Large production

For workloads with variable traffic, use serverless mode:

Terminal window
ske database:create \
--name my-db \
--engine aurora-mysql \
--serverless \
--min-capacity 0.5 \
--max-capacity 16 \
--network my-network

Serverless databases scale compute automatically based on demand. On AWS, this uses Aurora Serverless v2.

Option Description Default
--engine Database engine mysql
--tier Instance size small
--storage-gb Storage allocation in GB 20
--serverless Enable serverless scaling false
--min-capacity Minimum ACUs (serverless) 0.5
--max-capacity Maximum ACUs (serverless) 16
--backup-retention Backup retention in days 7
--multi-az Enable multi-AZ deployment false
--encrypted Enable storage encryption true
--public Allow public access false

When you attach a database to an environment, SKE automatically sets the following environment variables:

DB_HOST=my-db.abc123.us-east-1.rds.amazonaws.com
DB_PORT=3306
DB_DATABASE=my_app
DB_USERNAME=ske_admin
DB_PASSWORD=<auto-generated>

Your Laravel application picks these up through the standard database configuration. No manual configuration needed.

Databases are provisioned inside the VPC of the associated network. They are reachable from your application (running on Lambda or Cloud Run with VPC attach) but not from the public internet unless --public is set.

For development access, use a bastion host or VPN rather than making the database public.

Terminal window
# List databases
ske database:list
# Show database details
ske database:show my-db
# Delete a database
ske database:delete my-db

Deleting a database is irreversible and removes all data. SKE prompts for confirmation.