Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
35 changes: 35 additions & 0 deletions python/rds/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3

from aws_cdk import (
aws_ec2 as ec2,
aws_rds as rds,
core
)


class RDSStack(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs) -> None:
super().__init__(app, id, **kwargs)

vpc = ec2.Vpc(self, "VPC")

rds.DatabaseInstance(
self, "RDS",
master_username="master",
master_user_password=core.SecretValue("password"),
database_name="db1",
engine_version="8.0.16",
engine=rds.DatabaseInstanceEngine.MYSQL,
vpc=vpc,
port=3306,
instance_class=ec2.InstanceType.of(
ec2.InstanceClass.MEMORY4,
ec2.InstanceSize.LARGE
),
removal_policy=core.RemovalPolicy.DESTROY,
),


app = core.App()
RDSStack(app, "RDSStack")
app.synth()
3 changes: 3 additions & 0 deletions python/rds/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"app": "python3 app.py"
}
3 changes: 3 additions & 0 deletions python/rds/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
aws-cdk.core
aws-cdk.aws-ec2
aws-cdk.aws-rds