From f0e72cdf8e514a1d0ec0565464d16b635b40f77a Mon Sep 17 00:00:00 2001 From: Constantin Date: Fri, 5 Jul 2024 17:14:34 +0200 Subject: [PATCH] docs(ecs): add ephemeral storage encryption entry to readme --- packages/aws-cdk-lib/aws-ecs/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-ecs/README.md b/packages/aws-cdk-lib/aws-ecs/README.md index f0669e3adcc66..5cfd3e5c36ecb 100644 --- a/packages/aws-cdk-lib/aws-ecs/README.md +++ b/packages/aws-cdk-lib/aws-ecs/README.md @@ -85,6 +85,17 @@ const cluster = new ecs.Cluster(this, 'Cluster', { }); ``` +To encrypt the fargate ephemeral storage configure a KMS key. +```ts +declare const key: kms.Key; + +const cluster = new ecs.Cluster(this, 'Cluster', { + managedStorageConfiguration: { + fargateEphemeralStorageKmsKey: key, + }, +}); +``` + The following code imports an existing cluster using the ARN which can be used to import an Amazon ECS service either EC2 or Fargate. @@ -1865,4 +1876,4 @@ taskDefinition.addContainer('TheContainer', { softLimit: 128, }], }); -``` \ No newline at end of file +```