Provisioning RDS

Now that we have provisioned the VPC and the security groups, let's proceed to provision the RDS Cluster. The following code block goes in a new file, named rds.yml, which is in resources/ of the root directory:

Resources: letsPollDBSubnetGroup: Type: AWS::RDS::DBSubnetGroup Properties: DBSubnetGroupDescription: "RDS Subnet Group" SubnetIds: - Ref: letsPollPrivateSubnet1 - Ref: letsPollPrivateSubnet2 letsPollDatabase: Type: "AWS::RDS::DBInstance" Properties: DBName: ${env:LP_DATABASE_NAME}" AllocatedStorage: 5 DBInstanceClass: "db.t2.micro" Engine: "postgres" EngineVersion: "9.5.4" MasterUsername: ${env:LP_DATABASE_USERNAME} MasterUserPassword: ${env:LP_DATABASE_PASSWORD} VPCSecurityGroups: - "Fn::GetAtt": databaseSecurityGroup.GroupId ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.