Skip to content
v2.274.0

ArtifactsEncryptionMode Enum ​

Encryption mode for canary artifacts.

Example ​

ts
import * as kms from 'aws-cdk-lib/aws-kms';

const key = new kms.Key(this, 'myKey');

const canary = new synthetics.Canary(this, 'MyCanary', {
  schedule: synthetics.Schedule.rate(Duration.minutes(5)),
  test: synthetics.Test.custom({
    code: synthetics.Code.fromAsset(path.join(__dirname, 'canary')),
    handler: 'index.handler',
  }),
  runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_7_0,
  artifactsBucketLifecycleRules: [
    {
      expiration: Duration.days(30),
    },
  ],
  artifactS3EncryptionMode: synthetics.ArtifactsEncryptionMode.KMS,
  artifactS3KmsKey: key,
});

Members ​

MemberDescription
S3_MANAGEDServer-side encryption (SSE) with an Amazon S3-managed key.
KMSServer-side encryption (SSE) with an AWS KMS customer managed key.

Referenced by ​

  • CanaryProps.artifactS3EncryptionModeartifact_s3_encryption_modeartifactS3EncryptionModeArtifactS3EncryptionModeArtifactS3EncryptionMode