When testing on api gateway received a "module initialization error" but do not know what's the error.
- Check api-gateway error logs
- Test that the lambda works from console (This helped me to solve my problem)
CORS stands for Cross-origin resource sharing. It is a set of standard HTTP headers used to restrict the access of web resources from other domains. In the web app security model, this is called same-origin policy, and it's supposed to avoid cross-site scripting (XSS) attacks. Browsers will not fetch the requested resources unless the corresponding server attaches the required HTTP headers in the OPTIONS call (or GET method).