Review the EFS customer managed KMS key

Review EFS encryption separately from requirements for a customer managed KMS key.

Description

Set encrypted: true to encrypt a new EFS file system at rest. Omitting kmsKeyID uses the AWS managed key. Specify a customer managed key if you need control of its policy and lifecycle.

Potential impact

A file system created with encrypted: false stores files unencrypted. Disabling or deleting a customer managed key in use can interrupt file access.

Remediation

Check the key’s Region and the provider’s permission to use it. To change encryption or keys, keep the source, create a separate managed resource and copy the data. If applications still write to the source, pause writes and complete a final sync. Verify file permissions and reads and writes over a TLS mount before switching clients.

Examples

Before

yaml
apiVersion: efs.aws.crossplane.io/v1alpha1
kind: FileSystem
metadata:
  name: example
spec:
  forProvider:
    region: us-east-1
    encrypted: false
  providerConfigRef:
    name: example

After

yaml
apiVersion: efs.aws.crossplane.io/v1alpha1
kind: FileSystem
metadata:
  name: example
spec:
  forProvider:
    region: us-east-1
    kmsKeyID: 1234abcd-12ab-34cd-56ef-1234567890ab
    encrypted: true
  providerConfigRef:
    name: example

This v1alpha1 example specifies spec.forProvider.kmsKeyID for a new file system in us-east-1. Supply your key and providerConfigRef.

References