Skip to content

Commit

Permalink
feat(cloudfront): add amplify managed cache policy (#16880)
Browse files Browse the repository at this point in the history
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
naseemkullah committed Oct 25, 2021
1 parent f1e244b commit 8d0c555
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@aws-cdk/aws-cloudfront/lib/cache-policy.ts
Expand Up @@ -85,9 +85,13 @@ export interface CachePolicyProps {
* A Cache Policy configuration.
*
* @resource AWS::CloudFront::CachePolicy
* @link https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html
*/
export class CachePolicy extends Resource implements ICachePolicy {

/**
* This policy is designed for use with an origin that is an AWS Amplify web app.
*/
public static readonly AMPLIFY = CachePolicy.fromManagedCachePolicy('2e54312d-136d-493c-8eb9-b001f22f67d2');
/**
* Optimize cache efficiency by minimizing the values that CloudFront includes in the cache key.
* Query strings and cookies are not included in the cache key, and only the normalized 'Accept-Encoding' header is included.
Expand Down

0 comments on commit 8d0c555

Please sign in to comment.