Subchapter 44.6
references/ecs-gateway.mdMarkdown3 KBView on GitHub
Amazon ECS Gateway provides managed HTTP/HTTPS ingress that many ECS services share. A platform team creates a gateway, sets its ingress configuration (scheme, subnets, security group, AWS WAF web ACL, access logs), and associates it with one or more clusters. An application team connects a service by adding a gateway connector that names a container port. ECS then creates and manages the Application Load Balancers, listeners, security groups, certificates, target groups, and a generated HTTPS hostname for each service. The service must use the network mode.
awsvpcUse ECS Gateway when several services need HTTP/HTTPS ingress with shared settings. Do not build a separate load balancer, target group, and security group for each service when a gateway fits. Use ECS Express Mode when a team wants to deploy a web app or API on Fargate from a container image and let ECS choose the ingress, scaling, and networking defaults. Express Mode uses its own gateways, and an Express Mode service cannot use a gateway that you create. Attach your own Network Load Balancer for TCP or UDP traffic. Attach your own Application Load Balancer when you need to manage its listeners and rules yourself, because ECS does not repair changes made outside it to gateway-managed resources.
Shared ingress means one gateway setting affects every connected service. Recommend these defaults and confirm the details in the documentation:
PRIVATE. Without the filter, an internet-facing gateway associated with the cluster later exposes the service on its next deployment.0.0.0.0/0 unless the service is meant to be public.Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options) in the application. The gateway has no header settings, and ECS does not repair changes made outside it to the load balancers it manages.iam:PassRole to the gateway infrastructure role only.Before advising or acting, the agent MUST read and cite the Amazon ECS Gateway documentation (opens in a new tab) at response time and answer from its published content. For setup, read Create and manage a gateway (opens in a new tab). To connect a service, read Connect services to a gateway (opens in a new tab). For failures, read Troubleshoot Amazon ECS Gateway (opens in a new tab). Do not copy prerequisites, API parameters, or procedures into this reference.