π‘οΈ AWS EFS Mount Target is in a subnet that assigns public IP addresses on launchπ’
- Contextual name: π‘οΈ Mount Target is in a subnet that assigns public IP addresses on launchπ’
- ID:
/ce/ca/aws/efs/mount-target-public-ip - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- AWS Security Hub: [EFS.6] EFS mount targets should not be associated with subnets that assign public IP addresses on launch
Descriptionβ
Descriptionβ
This policy identifies AWS EFS Mount Targets that are deployed in subnets where the Map Public IP On Launch setting is enabled. EFS file systems are designed to be accessed from within a VPC or through private connectivity options such as VPN or AWS Direct Connect, and do not require exposure to the public internet.
Rationaleβ
Deploying EFS mount targets in subnets configured for public-facing resources can unnecessarily increase the attack surface of the storage environment. While EFS mount targets do not receive public IP addresses directly, they rely on ENI that inherit the network characteristics of the associated subnet. A subnet with automatic public IP assignment typically indicates intent for internet-facing workloads.
Maintaining strict network segmentation by placing storage resources in private subnets helps ensure proper isolation, reduces the risk of unintended exposure, and aligns with security best practices for protecting sensitive data.
Auditβ
This policy flags an AWS EFS Mount Target as
INCOMPLIANTif the associated Subnet hasMap Public IP On Launchset to true.
Remediationβ
Remediationβ
Recreate the EFS Mount Target in a Private Subnetβ
AWS EFS mount targets cannot be moved between subnets. Create a new mount target in a subnet where Map Public IP On Launch is disabled, and then delete the existing mount target.
1. Create a new mount target in a private subnetβ
From AWS CLIβ
aws efs create-mount-target \
--file-system-id {{file-system-id}} \
--subnet-id {{private-subnet-id}} \
--security-groups {{security-group-id}} \
--region {{aws-region}}Note: Ensure the selected subnet does not auto-assign public IP addresses.
2. Verify the new mount targetβ
Confirm that the new mount target is in the available state before proceeding:
aws efs describe-mount-targets \
--file-system-id {{file-system-id}} \
--region {{aws-region}}Verify application connectivity to the EFS file system
3. Delete the existing mount target in the public subnetβ
After verification, remove the old mount target:
aws efs delete-mount-target \
--mount-target-id {{old-mount-target-id}} \
... [see more](remediation.md)
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ AWS Foundational Security Best Practices v1.0.0 β πΌ [EFS.6] EFS mount targets should not be associated with a public subnet | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Public and Anonymous Access | 110 | no data |