Configuring Database Services with flightcontrol.json
In addition to the Service Configuration attributes that are common to all services, the following attributes are specific to database/RDS services.
Database Service Attributes
The type for all database services is rds
, and should be specified like the following:
type: 'rds'
In addition, there are several other attributes that are specific to database services:
Engine
engine: string
- Example:
"engine": "postgres"
- Supported values:
"postgres", "mysql", "mariadb"
Apply Changes Immediately
applyChangesImmediately: boolean
- 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:
Engine Version and Auto Upgrades
engineVersion: string
- Example:
"engineVersion": "14"
- Supported values:
- Postgres:
9, 10, 11, 12, 13, 14, 15, 16
- Mysql:
5.6, 5.7, 8
- Mariadb:
10.2, 10.3, 10.4, 10.5, 10.6
- Postgres:
- 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
RDS Instance Size
instanceSize: string
- Example:
"instanceSize": "db.t4g.micro"
- 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
StorageTypes
storageType: string
- Example:
"storageType": "gp3"
- Support values:
gp2
,gp3
,io1
andio2
- 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
- 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: string
- Example:
"maxStorage": 40
- Optional
- Support values:
20 - 65,536
- For detailed autoscaling info, see the AWS autoscaling docs
storageProvisionedIops: number
- Example:
"storageProvisionedIops": 4000
- Support values:
1,000 - 256,000
- Optional with default value
3,000
, and can be only supplied for storage capacity higher than 400GB - For detailed info about IOPS, see the AWS Provisioned IOPS docs
encryptionAtRest: boolean
- Example:
"encryptionAtRest": "true"
- Supported values:
true
,false
- Encryption at rest, ensures your data is stored on disk encrypted using your default KMS key
- Optional with default value
false
, can only be configured during initial provisioning - This parameter cannot be changed once the RDS is provisioned
Backup
backupRetentionPeriodInDays: number
- Example:
"backupRetentionPeriodInDays": 35
- The number of backup days to store for retrieval.
- Supported values:
1 - 35
- Based on the storage size and the number of backup days, cost will increase as the backup size increases.
deleteBackupsWithRdsDeletion: boolean
- Example:
"deleteBackupsWithRdsDeletion": true
- Supported values:
true | false
- 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.
Networking
private: boolean
- Example:
"private": true
- Supported values:
true | false
- Incurs an extra ~$32/month AWS cost for the NAT Gateway
- 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.
multiAvailabilityZones: boolean
- Example:
"multiAvailabilityZones": true
- 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
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.