How do I refresh a lambda after changing a config option

45 Views Asked by At

I have deployed a cloudformation stack using the https://github.com/aws-samples/cloudfront-authorization-at-edge template and now I have a Lambda@Edge application called 'serverlessrepo-cloudfront-authorization-at-edge'. This template serves up a static site from S3 and injects the code to divert to Cognito for user/password protection. Everything is working pretty well so far.

Since I am a bit of a newbie I have been doing everything through the AWS web-based console, not the cli.

There is a problem that I need to change a few of the httpHeader parameters that are used by the httpHeadersHandler function. I found these parameters in the configuration.json file within the httpHeadersHandler code source of my lambda@edge function. I made the changes that I need to do (alter the Content-Security-Policy), saved the file, and clicked on the Deploy button.

Now what? How to I get these changes to propagate out to the edge? I tried reloading my page but the response headers still show the original version of the headers. What do I need to do using the console do get the live handler to use my new configuration data?

0

There are 0 best solutions below