This rule ensures that EFS access points enforce a root directory for foundational security.
Rule | EFS access points should enforce a root directory |
Framework | AWS Foundational Security Best Practices |
Severity | ✔ Medium |
EFS Access Points Root Directory Enforcement
Rule Description
In order to adhere to AWS Foundational Security Best Practices, it is recommended to enforce a root directory for Amazon Elastic File System (EFS) access points. This rule ensures that client applications accessing the EFS file system can only operate within a specific root directory, preventing unauthorized access to sensitive data.
Rule Implementation
To enforce a root directory for EFS access points, you can follow these steps:
Troubleshooting Steps
If you encounter any issues or errors while trying to enforce the root directory for EFS access points, you can try the following troubleshooting steps:
Sample Code
The required change can be made using the AWS Command Line Interface (AWS CLI) as well. Use the following command to configure the root directory for an EFS access point: aws efs put-access-point-configuration --access-point-id <access-point-id> --root-directory "Path=<root-directory>" Replace <access-point-id> with the ID of the access point you want to configure and <root-directory> with the desired root directory path. Note: Ensure that you have the AWS CLI properly set up and configured with the necessary credentials to execute this command.
Remediation Steps
To enforce a root directory for an EFS access point using the AWS CLI, follow these steps:
<access-point-id>
with the ID of the access point and <root-directory>
with the desired root directory path:aws efs put-access-point-configuration --access-point-id <access-point-id> --root-directory "Path=<root-directory>"
For example:
aws efs put-access-point-configuration --access-point-id fsap-0123456789abcdef0 --root-directory "Path=/root"
By following these steps, you can successfully enforce a root directory for EFS access points, improving security and compliance with AWS Foundational Security Best Practices.