From d2674c18e8bc43f79ff9d33c126072090b4cea60 Mon Sep 17 00:00:00 2001 From: Tietew Date: Thu, 20 Oct 2022 15:13:46 +0900 Subject: [PATCH] add to README --- packages/@aws-cdk/aws-cloudfront/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/@aws-cdk/aws-cloudfront/README.md b/packages/@aws-cdk/aws-cloudfront/README.md index 223e0bf5f6a7d..01d273db36967 100644 --- a/packages/@aws-cdk/aws-cloudfront/README.md +++ b/packages/@aws-cdk/aws-cloudfront/README.md @@ -554,6 +554,16 @@ const distribution = cloudfront.Distribution.fromDistributionAttributes(this, 'I }); ``` +### Permissions + +Use the `grantCreateInvalidation()` method to allow to create invalidations on the distribution. + +```ts +declare const distribution: cloudfront.Distribution; +declare const lambdaFn: lambda.Function; +distribution.grantCreateInvalidation(lambdaFn); +``` + ## Migrating from the original CloudFrontWebDistribution to the newer Distribution construct It's possible to migrate a distribution from the original to the modern API.