Description
EFS sets encryption at rest when it creates a file system. The EFS console and API have different defaults, so specify encrypt: true in the Ansible task.
Potential impact
Without encryption, stored files lack this protection and may fall short of your organization’s requirements. File permissions control access, and TLS protects mount connections.
Remediation
For a new file system, verify the KMS key and permissions. For an existing unencrypted system, replicate or copy its data to an encrypted file system. Plan the mount change and any downtime, then check data consistency and application access. Verify backup and restore encryption, TLS mounts, security groups and file access policies.
Examples
Use the actual subnet and security group IDs for the mount target and allow connections from the intended clients.
New file system without an encryption request
---
- name: foo
community.aws.efs:
state: present
name: myTestEFS
encrypt: false
tags:
Name: myTestNameTag
purpose: file-storage
targets:
- subnet_id: subnet-748c5d03
security_groups: ["sg-1a2b3c4d"]
encrypt: false applies when the task creates myTestEFS. Check the actual encryption state if it already exists.
New file system with an encryption request
- name: foo
community.aws.efs:
state: present
name: myTestEFS
encrypt: true
tags:
Name: myTestNameTag
purpose: file-storage
targets:
- subnet_id: subnet-748c5d03
security_groups: ["sg-1a2b3c4d"]
encrypt: true applies at creation. An existing unencrypted myTestEFS still needs a separate migration.