How to invalidate CloudFront distribution when a Lambda is updated (not S3) #30731
Unanswered
adam-nielsen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently if you deploy to S3 with a BucketDeployment you can specify a CloudFront distribution to invalidate, so that the newly deployed files in the S3 bucket are visible ASAP via CloudFront.
In my case I have a NodejsFunction Lambda providing dynamic content to CloudFront, but when I deploy an update to the Lambda, I can't work out how to tell CloudFront to invalidate its cache. So I keep seeing the old cached responses from the previous Lambda version, even after changing the Lambda's code.
Is there a way to create a CloudFront invalidation any time a stack is updated, or at least to specify resources (like Lambdas) that should trigger an invalidation if they are modified?
Beta Was this translation helpful? Give feedback.
All reactions