Skip to content
v2.278.0

ManagedStorageConfiguration Struct ​

Kms Keys for encryption ECS managed storage.

Example ​

ts
declare const key: kms.Key;

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


cluster = ecs.Cluster(self, "Cluster",
    managed_storage_configuration=ecs.ManagedStorageConfiguration(
        fargate_ephemeral_storage_kms_key=key,
        kms_key=key
    )
)
java
Key key;


Cluster cluster = Cluster.Builder.create(this, "Cluster")
        .managedStorageConfiguration(ManagedStorageConfiguration.builder()
                .fargateEphemeralStorageKmsKey(key)
                .kmsKey(key)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Key key;


var cluster = new Cluster(this, "Cluster", new ClusterProps {
    ManagedStorageConfiguration = new ManagedStorageConfiguration {
        FargateEphemeralStorageKmsKey = key,
        KmsKey = key
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var key Key


cluster := ecs.NewCluster(this, jsii.String("Cluster"), &ClusterProps{
	ManagedStorageConfiguration: &ManagedStorageConfiguration{
		FargateEphemeralStorageKmsKey: key,
		KmsKey: key,
	},
})

Properties ​

fargateEphemeralStorageKmsKeyoptionalIKeyfargate_ephemeral_storage_kms_keyoptionalIKeyfargateEphemeralStorageKmsKeyoptionalIKeyFargateEphemeralStorageKmsKeyoptionalIKeyFargateEphemeralStorageKmsKeyoptionalIKey #
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.

kmsKeyoptionalIKeyRefkms_keyoptionalIKeyRefkmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRefKmsKeyoptionalIKeyRef #
Customer KMS Key used to encrypt ECS managed Storage.

Default: Encrypted using AWS-managed key