I'm still very new to AWS so this may be wrong but it seems to my Cloudfront distribution is pointing to an old broken versions of my Lambda@Edge function.
I followed this tutorial to get my initial setup: https://aws.amazon.com/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/
It worked fine for weeks as I updated the Lambda functions to do exactly what I needed, all the way up to version 16 of the Origin Response function. However, when I created version 17 (to format .gif as .png) something broke. I rolled back to 16 and I was still getting a 503 error. I've since created quite a few new versions from rolling all the way back to creating new functions and my Origin Response is still throwing a 503 Error. https://d361pysytz4143.cloudfront.net/images/blackhat.png?d=200x200
I noticed my Cloudwatch for the Origin Response is constantly referencing version 17, no matter how many times I delete the log stack and/or publish a new Lambda function.
00:50:51
START RequestId: 6118af00-3d22-11e8-a163-5577c9775707 Version: 17
START RequestId: 6118af00-3d22-11e8-a163-5577c9775707 Version: 17
00:50:51
2018-04-11T00:50:51.179Z 6118af00-3d22-11e8-a163-5577c9775707 TypeError: Cannot read property 'status' of undefined at exports.handler.err (/var/task/index.js:19:51)
2018-04-11T00:50:51.179Z 6118af00-3d22-11e8-a163-5577c9775707 TypeError: Cannot read property 'status' of undefined at exports.handler.err (/var/task/index.js:19:51)
I made sure to a attach the Cloudfront to my newest Lambda function so it should be pointing the correct one but it isn't updating. The Viewer Request function is updating correctly if I switch versions.
What is going on, is there any cache or something I need to clear?