Our Frontend containers run in Private Subnets. To allow them to receive traffic, we must configure a Security Group that acts as a firewall.
For security best practices, we will only allow traffic from the Application Load Balancer (ALB) on port 3000. Direct access from the internet or other sources will be blocked.
ecs-private-sg.security group for ecs.band-up-vpc.
This is the most critical step. We need to allow the ALB to talk to our Next.js application.
Custom TCP.3000 (The port our Next.js app listens on).alb-sg).
The Security Group is now ready to be attached to our ECS Tasks in the next step.