# ManagedStorageConfiguration

Kms Keys for encryption ECS managed storage.

- Source: [`aws-ecs/lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/cluster.ts#L1524)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

```ts
declare const key: kms.Key;

const cluster = new ecs.Cluster(this, 'Cluster', {
  managedStorageConfiguration: {
    fargateEphemeralStorageKmsKey: key,
    kmsKey: key,
  },
});
```

## Properties

- `fargateEphemeralStorageKmsKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — Customer KMS Key used to encrypt ECS Fargate ephemeral Storage.

  **Default:** Encrypted using AWS-managed key

  The configured KMS Key's policy will be modified to allow ECS to use the Key to encrypt the ephemeral Storage for this cluster.

- `kmsKey`: [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) — Customer KMS Key used to encrypt ECS managed Storage.

  **Default:** Encrypted using AWS-managed key
