Ensure that the Block Public Access security feature is enabled for your Amazon EMR clusters in order to prevent EMR cluster launch if any of the cluster's security groups have a rule that allows inbound traffic from all public IPv4/IPv6 addresses (i.e. 0.0.0.0/0 or ::/0). The feature can be enabled and configured for each individual region within your AWS account, meaning that each region has a Block Public Access configuration that applies to all EMR clusters created within that region.
This rule can help you work with the AWS Well-Architected Framework.
When your Amazon EMR clusters are publicly accessible, any machine on the Internet can establish a connection to them, increasing the attack surface and the risk of malicious activity. The level of access to your EMR clusters depends on their use cases; however, for most use cases, the clusters should only be accessible from within your Virtual Private Cloud (VPC). With the Block Public Access feature, the Amazon EMR service can prevent a cluster from launching if any security group associated with it contains a rule that allows inbound (ingress) traffic from IPv4 0.0.0.0/0 or IPv6 ::/0 on a port, unless the port is specified as an exception. For fine-grained access, you can configure exceptions to allow temporary public access on specific ports or port ranges (port 22 is an exception by default).
For AWS accounts that created EMR clusters before November 25 2019, Block Public Access is disabled by default in that region.
Audit
To determine if Block Public Access is enabled for your Amazon EMR clusters, perform the following operations:
Remediation / Resolution
To restrict access to your Amazon Elastic MapReduce (EMR) clusters by enabling the Block Public Access feature, perform the following operations:
If Amazon EMR Block Public Access is enabled, the security groups associated with EMR clusters cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port (i.e., unrestricted access), unless the port is specified as an exception using "PermittedPublicSecurityGroupRuleRanges" within the "BlockPublicAccessConfiguration" object. By default, Port 22 (SSH) is an exception, however, based on your application and compliance requirements you may need to remove this exception and/or add more ports as exceptions. As an example, this conformity rules demonstrates how to enable Block Public Access feature, remove the default exception (port 22 – SSH) and add a new exception for port 8443 (Apache Tomcat – HTTPS).References
- AWS EMR Documentation
- Amazon EMR FAQs
- Configure block public access
- AWS Command Line Interface (CLI) Documentation
- get-block-public-access-configuration
- put-block-public-access-configuration