Checks if ECS services are configured to prevent automatic public IP assignments, enhancing network security by limiting public internet exposure.
Rule | ECS services should not have public IP addresses assigned to them automatically |
Framework | AWS Foundational Security Best Practices |
Severity | ✔ High |
Rule Description:
By disabling the automatic assignment of public IP addresses to ECS services, organizations can enhance security by reducing potential exposure to external threats and unauthorized access. Public IP addresses are commonly targeted by attackers, and disabling their automatic assignment helps in mitigating security risks.
Troubleshooting Steps:
If ECS services are found to have public IP addresses assigned automatically, follow the steps below to disable this functionality:
Necessary Codes:
To disable the automatic assignment of public IP addresses to ECS services, you can utilize the following code when creating or updating the service:
{
"ipAddressType": "PRIVATE"
}
This code snippet will specify that the ECS service should only have a private IP address assigned to it, instead of a public one.
Remediation Steps:
To remediate this issue and ensure that ECS services do not have public IP addresses assigned automatically, follow the steps below:
By following these steps, you can enhance the security of your ECS services by preventing the automatic assignment of public IP addresses, in line with AWS foundational security best practices.