Cloudfront – Invalidate cache on git commit

To be able to directly see the new blog posts, the CloudFront Cache needs to be invalidated.

To avoid having to do it manually, I setup a Lambda function that gets triggered via the CodePipeline after the deploy stage.

Invalidate CloudFront Cache using lambda

Checkout the article here to grab your Lambda function to invalidate CF Cache and the IAM policy.

Regina Hackenberg

Regina Hackenberg

I love tech, cats, lifting weights, running, video games and living in Ireland! When I’m not spending time working as Solution Architect, I’m learning about tech and share what I’ve been learning!
Ireland