Skip to content

Commit

Permalink
add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Tietew committed Nov 2, 2022
1 parent f627046 commit ccf0ef7
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 @@ -590,6 +590,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 ccf0ef7

Please sign in to comment.