aws-samples / amazon-cloudfront-secure-static-site

Create a secure static website with CloudFront for your registered domain.
Apache License 2.0
385 stars 140 forks source link

Function Updates are not Deployed? #37

Closed MarkHerhold closed 2 years ago

MarkHerhold commented 3 years ago

It seems that I have to re-associate a function with CloudFormation manually after every code update for it to actually take effect. Is there a way to automate this?

ConnorKirk commented 2 years ago

Hi @MarkHerhold Thanks for opening an issue.

This page on Editing a Lambda@Edge function associated with a CloudFront Distribution explains the process better than I will.

In summary, a new version of the Lambda @ Edge function needs to be published. The trigger for the Lambda@Edge function then needs to be created.

The new version of this sample no longer includes a Lambda@Edge function for adding security headers. These are now configured using CloudFront Response Header Policies