AWS Fundamentals Logo
AWS Fundamentals
AWS::CloudFront::CachePolicy

CloudFront CachePolicy

A cache policy. When it's attached to a cache behavior, the cache policy determines the following: + The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer. + The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache. The headers, cookies, and query strings that are...

Properties

1 configurable property. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
CachePolicyConfig
CachePolicyConfig
Required

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Idstring-
LastModifiedTimestring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::CloudFront::CachePolicy

Resources:
  MyResource:
    Type: AWS::CloudFront::CachePolicy
    Properties:
      CachePolicyConfig: "value"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

cloudfront:CreateCachePolicy

delete

cloudfront:DeleteCachePolicycloudfront:GetCachePolicy

list

cloudfront:ListCachePolicies

read

cloudfront:GetCachePolicy

update

cloudfront:UpdateCachePolicycloudfront:GetCachePolicy

Get the CloudFront Cheat Sheet

Everything you need to know about CloudFront on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceCloudFront
Properties3
Required1
TaggingNot supported
Primary IDId

Supported Operations

CreateDeleteListReadUpdate

External Links