I am using lambda@edge to redirect my sites with cloudfront.
I have attached my versioned lambda arn to my cloud front cache behavior to all 4 events it has.
when i hit my cloudfront endpoint it says
502 ERROR
The request could not be satisfied.
The Lambda function returned invalid json: The json output must be an object type.
when i check my lambda logs / invocation metrics i dont see any hits at all .
what may be the reason behind this ?
i tried my best to find the fix why my lambda is not getting triggered ??
There are some common "gotchas" to Lambda@Edge and CloudFront. You need to:
arn:aws:lambda:us-east-1:572007530218:function:gofaas-WebAuthFunction:45
This is different from "normal" Lambda web console flow of saving a code change and jumping to logs from the monitoring tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With