AWS Security Group

1. Introduction

Allow network connectivity by protocols, ports and IPs:


3. Security group rules

Source or destination: The source (inbound rules) or destination (outbound rules) for the traffic to allow. Specify one of the following:

11. How-to

11.1. Access Security Groups

VPC > Security Groups


21. Use Case: Load Balancer > Target Group > ECS Service

Eg: sixqueue

A Load Blancer (type Network) can have up to 5 Security Groups, at least 1 is recommended.

If the LB has any SG then at least one of them needs to allow outbound connections to the ECS Service container, otherwire the Target Group Health Check will fail.

The Target Group associated to the LB must have a Health Check with enough time for the ECS Service container to start-up.

Otherwise the container will be killed and restarted indefinitively.

The ECS Service should have a Security Group with an ingress rule allowing connections from the Load Balancer (and Target Group health check)

The best way to achieved is to reference in the ingress rule the SG of the LB (referenced_security_group_id)