Adrián Mouly
06/15/2022, 4:26 AMStaticSite
, due I have to deploy multiple React apps into the same bucket… (for the micro-frontend discussion)…
And I need to copy the logic for invalidate CFront… but… why is the invalidation done in a lambda, and not done from the stack? is that even possible?Adrián Mouly
06/15/2022, 4:44 AMdeploymentBucket
has this:
/**
* The CloudFront distribution using the destination bucket as an origin.
* Files in the distribution's edge caches will be invalidated after
* files are uploaded to the destination bucket.
*
* @default No invalidation occurs
*/
readonly distribution?: cloudfront.IDistribution;
/**
* The file paths to invalidate in the CloudFront distribution.
*
* @default All files under the destination bucket key prefix will be invalidated.
*/
readonly distributionPaths?: string[];
Adrián Mouly
06/15/2022, 4:45 AMIvo Evans-Storrie
06/15/2022, 2:10 PMAdrián Mouly
06/15/2022, 2:11 PMdeploymentBucket
which can do the invalidation.Adrián Mouly
06/15/2022, 2:11 PMAdrián Mouly
06/16/2022, 12:41 AMFrank
deploymentBucket
also does the invalidation inside a Lambda function.Adrián Mouly
06/16/2022, 4:43 AMAdrián Mouly
06/16/2022, 4:44 AMdeploymentBucket
by yourself.Adrián Mouly
06/16/2022, 4:44 AMAdrián Mouly
06/16/2022, 4:44 AMdeploymentBucket
I should see a new lambda created for invalidations?