The VPC market has public subnets public-a and public-b and private subnets private-a and private-b, in us-east-1a and us-east-1b. The app's servers will run in the security group app-sg. The database password is in ~/db-password.
- Two jobs need a home. Answer the two questions about which service fits each.
- Keep the ids of
private-aandprivate-binPRIVATE_AandPRIVATE_B, the VPC's id inVPC,app-sg's id inAPP_SG, and the password inDB_PASSWORD. - Create a security group
db-sgin the VPC that lets the app's group in on PostgreSQL's port, and nothing else. Keep its id inDB_SG. - Create a DB subnet group
market-db-subnetson the two private subnets. - Create the PostgreSQL instance
market-db: classdb.t3.micro, 20 GiB, master usermarket, a first databasemarket, in your subnet group anddb-sg, with no public address. - Wait until it is
available, and read its endpoint and port.