Skip to content

Commit

Permalink
add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Tietew committed Oct 20, 2022
1 parent 5e17168 commit d2674c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/@aws-cdk/aws-cloudfront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d2674c1

Please sign in to comment.