AWS CloudFront Key Group

This page shows how to write Terraform and CloudFormation for CloudFront Key Group and write them securely.

aws_cloudfront_key_group (Terraform)

The Key Group in CloudFront can be configured in Terraform with the resource name aws_cloudfront_key_group. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

resource "aws_cloudfront_key_group" "public-keys-group" {
  items = []
  name  = "public-keys-group"

resource "aws_cloudfront_origin_access_identity" "movies" {


Explanation in Terraform Registry

AWS::CloudFront::KeyGroup (CloudFormation)

The KeyGroup in CloudFront can be configured in CloudFormation with the resource name AWS::CloudFront::KeyGroup. The following sections describe how to use the resource and its parameters.


Explanation in CloudFormation Registry

A key group.

A key group contains a list of public keys that you can use with CloudFront signed URLs and signed cookies.

Frequently asked questions

What is AWS CloudFront Key Group?

AWS CloudFront Key Group is a resource for CloudFront of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS CloudFront Key Group?

For Terraform, the nikitaKunevich/yandex_prakt_graduate_work source code example is useful. See the Terraform Example section for further details.