Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
ecs_service_no_assign_public_ipProvider: AWS
Service:
ecsSeverity: HIGH
Categories:
internet-exposedResource type:
AwsEcsServiceWhat this check verifies
ECS services are assessed for automatic public IP assignment via theassignPublicIp setting in their network configuration.
The finding indicates whether tasks launched by the service receive a public IP or are limited to private addressing.
Risk
Automatic public IPs make tasks directly reachable from the Internet, enabling:- Port scanning and remote exploitation
- Brute-force against admin endpoints
- Data exfiltration via exposed APIs This jeopardizes confidentiality, integrity, and availability, and can facilitate lateral movement within the VPC.
Recommendation
DisableassignPublicIp to keep tasks private. Expose services through load balancers or private endpoints, restrict ingress with least-privilege security groups, and route egress via NAT. Apply defense in depth (WAF, TLS, monitoring) and segment networks to minimize blast radius.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/securityhub/latest/userguide/ecs-controls.html#ecs-2
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/ecs-controls.html
- https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = ecs_service_no_assign_public_ip. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks