In this step, we provision an Amazon RDS for PostgreSQL instance. This will serve as the primary persistent data store for the IELTS BandUp platform. We will configure it for high availability and security within our VPC.
Before creating the database, we need to define the firewall rules.
Step 1.1: Create Backend Security Group This group is for the ECS Fargate tasks (the application layer) to control outbound traffic.
ecs-backend-sg.8080 (Spring Boot default) from the ALB.
Step 1.2: Create RDS Security Group This group is attached to the database itself.
rds-sg.5432) only from the ecs-backend-sg created above (or the VPC CIDR for testing). This ensures only our application can talk to the database.
RDS needs to know which subnets it is allowed to use. We will group our private database subnets together.
bandup-db-subnet-group.band-up-vpc.private-database-subnet-1 and private-database-subnet-2.
Now, we provision the PostgreSQL instance.
Standard create.PostgreSQL (Version 17.6 or latest).
bandup-db.postgres.Self managed.
Burstable classes -> db.t4g.micro (Cost-effective for workshops/dev).gp3 (General Purpose SSD) with 20 GiB.
band-up-vpc.bandup-db-subnet-group (Created in step 2).rds-sg.
Password authentication.Performance Insights (retention 7 days).
band_up (Important: Hibernate will look for this DB name).