Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(rds): construct for Aurora Serverless Clusters #10516

Merged
merged 24 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c1635c3
adding a serverless database construct
shivlaks Sep 24, 2020
7e9ec52
adding unit tests
shivlaks Sep 24, 2020
0706029
add integ tests
shivlaks Sep 24, 2020
fb6eec9
storageEncrypted must always be set to true
shivlaks Sep 24, 2020
072a78b
update tests for storage encryption always being set to true
shivlaks Sep 24, 2020
0cc33f7
port is not configurable in Aurora serverless
shivlaks Sep 24, 2020
1989357
add basic README content
shivlaks Sep 24, 2020
1c53044
add enum to specify aurora capacity units. simplify autopause feature
shivlaks Sep 24, 2020
b2354c1
handled some PR feedback - interim commit
shivlaks Sep 26, 2020
6137682
Merge branch 'master' into shivlaks/aurora-serverless
shivlaks Sep 28, 2020
f82c75f
handle some more PR feedback
shivlaks Sep 28, 2020
7338e94
reuse applyRemovalPolicy
shivlaks Sep 28, 2020
8279e0d
update README, clean up usage of credentials (username and password) …
shivlaks Sep 28, 2020
7a7adfb
simplify securityGroups property
shivlaks Sep 28, 2020
3728ecb
adding default description for scaling options
shivlaks Sep 28, 2020
9ba7955
Merge branch 'master' into shivlaks/aurora-serverless
shivlaks Sep 30, 2020
ad63206
update to aligning with cluster for rotationSingleUser and updated ex…
shivlaks Sep 30, 2020
58eaa34
marking all exported classes, interfaces, enums as part of Serverless…
shivlaks Sep 30, 2020
e1d1a92
addressed some PR feedback
shivlaks Sep 30, 2020
2a7bddd
Merge branch 'master' into shivlaks/aurora-serverless
shivlaks Sep 30, 2020
5599ed4
update credentials from merged changes to use engine's default user name
shivlaks Sep 30, 2020
128cf09
update to using standardized removal policies introduced in #10412
shivlaks Sep 30, 2020
fa25e0d
final touches and some more tests
shivlaks Sep 30, 2020
b040334
Merge branch 'master' into shivlaks/aurora-serverless
mergify[bot] Sep 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions packages/@aws-cdk/aws-rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,51 @@ new rds.OptionGroup(stack, 'Options', {
],
});
```

### Serverless

[Amazon Aurora Serverless]((https://aws.amazon.com/rds/aurora/serverless/)) is an on-demand, auto-scaling configuration for Amazon
Aurora. The databse will automatically start up, shut down, and scale capacity
up or down based on your application's needs. It enables you to run your database
in the cloud without managing any database instances.

The following example initializes an Aurora Serverless PostgreSql cluster.
Aurora Serverless clusters can specify scaling properties which will be used to
automatically scale the database cluster seamlessly based on the workload.

```ts
import * as ec2 from '@aws-cdk/aws-ec2';
import * as rds from '@aws-cdk/aws-rds';

const vpc = new ec2.Vpc(this, 'myrdsvpc');

const cluster = new rds.ServerlessDatabaseCluster(this, 'AnotherCluster', {
shivlaks marked this conversation as resolved.
Show resolved Hide resolved
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
njlynch marked this conversation as resolved.
Show resolved Hide resolved
masterUser: { username: 'shiv'},
shivlaks marked this conversation as resolved.
Show resolved Hide resolved
parameterGroup: rds.ParameterGroup.fromParameterGroupName(this, 'ParameterGroup', 'default.aurora-postgresql10'),
skinny85 marked this conversation as resolved.
Show resolved Hide resolved
vpc,
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE },
shivlaks marked this conversation as resolved.
Show resolved Hide resolved
scaling: {
autoPause: true,
minCapacity: 2,
maxCapacity: 32,
shivlaks marked this conversation as resolved.
Show resolved Hide resolved
}
});
```
Aurora Serverless Clusters do not support the following features:
* Loading data from an Amazon S3 bucket
* Saving data to an Amazon S3 bucket
* Invoking an AWS Lambda function with an Aurora MySQL native function
* Aurora replicas
* Backtracking
* Multi-master clusters
* Database cloning
* IAM database cloning
* IAM database authentication
* Restoring a snapshot from MySQL DB instance
* Performance Insights
shivlaks marked this conversation as resolved.
Show resolved Hide resolved
* RDS Proxy

Read more about the [limitations of Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations)

Learn more about using Amazon Aurora Serverless by reading the [documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html)
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-rds/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export * from './endpoint';
export * from './option-group';
export * from './instance';
export * from './proxy';
export * from './serverless-cluster';

// AWS::RDS CloudFormation Resources:
export * from './rds.generated';
Expand Down
Loading