Guided Walkthroughs
Step-by-step configuration wizards for your environment
Dedicated Security Account
AWS Backup Strategy
VPC Connectivity Setup
Automated Patching
All Guides
CodeX Security ControlsConfiguration template to launch an RDS instance running PostgreSQL. The template also includes a new DB subnet group to specify the subnets for the cluster instances to be created as well as a new AWS Secrets Manager secret to store the password
Settings for customizing the template include:
AWSTemplateFormatVersion: "2010-09-09"
Description: ""
Resources:
  DbSecret:
    Type: "AWS::SecretsManager::Secret"
    Properties:
      KmsKeyId: "alias/aws/secretsmanager"
      GenerateSecretString:
        ExcludeLowercase: false
        ExcludeNumbers: false
        ExcludePunctuation: false
        ExcludeUppercase: false
        PasswordLength: 32
        ExcludeCharacters: "/\"@\\"
  RdsInstance:
    Type: "AWS::RDS::DBInstance"
    Properties:
      DBInstanceClass: "db.t3.medium"
      MultiAZ: false
      Engine: "postgres"
      EngineVersion: "13.4"
      DBSubnetGroupName: "custom-subnet-group"
      MasterUsername: "dbadmin"
      MasterUserPassword:
        Fn::Sub: "{{resolve:secretsmanager:${DbSecret}}}"
      Port: "5432"
      DBInstanceIdentifier: "rds-postgres"
      AllocatedStorage: "50"
      StorageEncrypted: false
      StorageType: "standard"
      BackupRetentionPeriod: 1
      DeleteAutomatedBackups: true
      DeletionProtection: false
Parameters: {}
Metadata: {}
Conditions: {}