Skip to content

Aurora

Source: src/AWS/RDS/Aurora.ts

Opinionated Aurora bring-up helper.

Aurora is the fast-start L2 for getting a working database online with one call. It creates a generated admin secret, DB subnet group, Aurora cluster, and a single writer instance by default. Optional readers, parameter groups, and an auto-wired RDS Proxy can be enabled as needs grow.

The return value intentionally exposes the underlying DB* resources so users can expand into the lower-level surface without rewriting the stack.

Start a Small Aurora Cluster

const db = yield* AWS.RDS.Aurora("AppDb", {
subnetIds: [privateSubnetA.subnetId, privateSubnetB.subnetId],
securityGroupIds: [databaseSecurityGroup.groupId],
});

Add Readers and a Proxy

const db = yield* AWS.RDS.Aurora("AppDb", {
subnetIds: [privateSubnetA.subnetId, privateSubnetB.subnetId],
securityGroupIds: [databaseSecurityGroup.groupId],
readers: 2,
proxy: true,
});