Man oh man, this is something that tripped me up when moving a bunch of lambda functions over to a different region. After lots and lots of tweaks, googles, and let's-try-its I've landed upon a nice AWS CodePipeline template that I like to use for new lambda functions. Here it is below in all of its glory!
Notice how in the second-to-last line here it says, "httpMethod: "POST"" even though that is describing the OPTIONS http event. Now you DO NOT want to put "OPTIONS" as the value in here or things will go badly! Now, go forth and leverage these awesome AWS services to do incredible things!
The posts on this site are written and maintained by Jim Lynch. About Jim...