AWS EFS file system without encryption

Protect EFS file data and metadata with encryption at rest.

Description

EFS encryption at rest covers file contents and metadata. Restrict who can read shared files through file permissions and network access controls. Use TLS for mount connections.

Potential impact

Exposure of unencrypted storage can disclose shared files or application configuration and leave organizational encryption requirements unmet.

Remediation

Use encrypted = true for new file systems and verify the KMS key and permissions. EFS cannot encrypt an existing file system in place. Review the Terraform plan for replacement, preserve the source and its backups, and copy the data to a new encrypted file system. Check data consistency, backups and file access before switching mounts and applications.

Examples

The excerpts use the same resource address and creation token. For migration, define a separate destination resource with a different creation token so both file systems exist during the copy. Configure its mount targets and access permissions.

Before

hcl
resource "aws_efs_file_system" "shared_fs" {
  creation_token = "my-product"
  encrypted      = false
}

With encrypted = false, Terraform requests a new file system without encryption at rest.

After

hcl
resource "aws_efs_file_system" "shared_fs" {
  creation_token = "my-product"
  encrypted      = true
}

Changing the value to true on a managed file system can trigger replacement. The change does not copy its files.

References