aws-cdk-lib.aws_cloudfront.KeyGroupProps

interface KeyGroupProps

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.KeyGroupProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#KeyGroupProps
Javasoftware.amazon.awscdk.services.cloudfront.KeyGroupProps
Pythonaws_cdk.aws_cloudfront.KeyGroupProps
TypeScript (source)aws-cdk-lib » aws_cloudfront » KeyGroupProps

Properties for creating a Public Key.

Example

// Validating signed URLs or signed cookies with Trusted Key Groups

// public key in PEM format
declare const publicKey: string;
const pubKey = new cloudfront.PublicKey(this, 'MyPubKey', {
  encodedKey: publicKey,
});

const keyGroup = new cloudfront.KeyGroup(this, 'MyKeyGroup', {
  items: [
    pubKey,
  ],
});

new cloudfront.Distribution(this, 'Dist', {
  defaultBehavior: {
    origin: new origins.HttpOrigin('www.example.com'),
    trustedKeyGroups: [
      keyGroup,
    ],
  },
});

Properties

NameTypeDescription
itemsIPublicKey[]A list of public keys to add to the key group.
comment?stringA comment to describe the key group.
keyGroupName?stringA name to identify the key group.

items

Type: IPublicKey[]

A list of public keys to add to the key group.


comment?

Type: string (optional, default: no comment)

A comment to describe the key group.


keyGroupName?

Type: string (optional, default: generated from the id)

A name to identify the key group.