Configuring RDS Services with flightcontrol.json

RDS Service Attributes

The type for all RDS services is rds, and should be specified like the following:

type: 'rds'

Identifiers

id: string

  • Example: "id": "database"
  • This is a string id that you create. We use it on each git push to match your config to your existing service in AWS
  • This cannot be changed. If you change it, it will create a new service.

name: string

  • Example: "name": "Database"
  • This is the name we use to display your service in the Flightcontrol web dashboard

RDS-Specific Options

The following attributes are specific to RDS services:

Engine

engine: string

  • Example: "engine": "postgres"
  • Required
  • Supported values: "postgres", "mysql", "mariadb"

Engine Version

engineVersion: string

  • Example: "engineVersion": "14"
  • Required
  • Supported values:
    • Postgres: "9", "10", "11", "12", "13", "14", "15", "16", "17"
    • Mysql: "5.6", "5.7", "8.0" (note: "8" is automatically transformed to "8.0")
    • Mariadb: "10.2", "10.3", "10.4", "10.5", "10.6"
  • Changing this will initiate a database upgrade. The database will be updated in the next scheduled maintenance window unless you set applyChangesImmediately: true

autoUpgradeMinorVersions: boolean

  • Example: "autoUpgradeMinorVersions": true
  • Optional with default: true

Apply Changes Immediately

applyChangesImmediately: boolean

  • Example: "applyChangesImmediately": false
  • Optional with default: false
  • When set to true, changes to the RDS config will trigger a new deployment with the changes. When set to false, these changes will be applied at the next scheduled maintenance window. Refer to AWS documentation on maintenance windows if needed.
  • The next window for changes to be applied can be seen in the dashboard: Dashboard with maintenance window highlighted

RDS Instance Size

instanceSize: string

  • Example: "instanceSize": "db.t4g.micro"
  • Required
  • Support values: See the AWS documentation
  • Changing this will initiate a database upgrade. The database will be updated in the next scheduled maintenance window unless you set applyChangesImmediately: true

Networking

private: boolean

  • Example: "private": true
  • Optional with default: false
  • Supported values: true, false
  • Recommended to be true for highest security
  • Private means the database is not accessible from the internet. Public means it is. However, the database is fully secured when public, but it just allows attackers to try and brute force the secure credentials. Or try to find some vulnerability.
  • Incurs an extra ~$32/month AWS cost for the NAT Gateway if you don’t already have one

multiAvailabilityZones: boolean

  • Example: "multiAvailabilityZones": true
  • Optional with default: false
  • Supported values: true, false
  • Doubles the cost of your RDS, as two instances will be running at the same time
  • This option enhances your database availability and durability with automatic failover in less than a minute

Backup

backupRetentionPeriodInDays: number

  • Example: "backupRetentionPeriodInDays": 35
  • Optional with default: 35
  • Supported values: 0-35
  • The number of backup days to store for retrieval
  • Based on the storage size and the number of backup days, cost will increase as the backup size increases

deleteBackupsWithRdsDeletion: boolean

  • Example: "deleteBackupsWithRdsDeletion": true
  • Optional with default: true
  • Automatically deletes all backup when initiating the RDS deletion, to avoid incurring any storage charges in the future. If this value is false, you will need to manually delete all backups after deleting the service from Flightcontrol.

Storage Configuration

storageType: string

  • Example: "storageType": "gp3"
  • Optional with default: "gp2"
  • Supported values: "gp2", "gp3", "io1", "io2"
  • For the majority of workloads gp3 is the recommended storage type
  • This value cannot be changed once the RDS is provisioned

storage: int

  • Example: "storage": 20
  • Required
  • Support values: 20-65,536
  • When increasing storage, AWS will automaticaly upgrade it by 20% if you increase the value less than 20
  • Changing this will initiate a database upgrade. The database will be updated in the next scheduled maintenance window unless you set applyChangesImmediately: true

maxStorage: number

  • Example: "maxStorage": 100
  • Optional with default: 100
  • Supported values: 20-65,536 (integer)
  • Must be greater than or equal to storage
  • For detailed autoscaling info, see the AWS autoscaling docs

storageProvisionedIops: number

  • Example: "storageProvisionedIops": 4000
  • Optional with default value 3,000, and can be only supplied for storage capacity higher than 400GB
  • Support values: 1,000 - 256,000
  • For detailed info about IOPS, see the AWS Provisioned IOPS docs

encryptionAtRest: boolean

  • Example: "encryptionAtRest": true
  • Optional with default: false
  • Recommended to enable for all production databases
  • Encryption at rest ensures your data is stored on disk encrypted using your default KMS key
  • Can only be configured during initial provisioning

Observability

performanceInsights: boolean

  • Example: "performanceInsights": true
  • Optional with default: false
  • Supported values: true, false
  • Whether RDS Performance Insights is turned on or off

Deletion Protection

deletionProtection: boolean

  • Example: "deletionProtection": true
  • Optional with default: false
  • Enabling this will prevent any user from deleting the database until it is changed
  • It’s recommended to enable this for production databases

Connection String Environment Variable

connectionStringEnvVarName: string

  • Example: "connectionStringEnvVarName": "DATABASE_URL"
  • Optional
  • Must only contain word characters (letters, numbers, or underscore)
  • Specifies the name of the environment variable to inject in sibling services with the database connection string
  • Recommended to not set this when using config as code, and instead use fromService in environmentVariables