[Troubleshooting] CORS setting was not working when I implemented AWS API Gateway+Lambda Server-less Application

This is record of troubleshooting about CORS setting when I implemented AWS server-less application

Simple & Non-simple Request

CORS enable setting is not working in non-simple request.

Enable CORS action in AWS API Gateway

How can I communicate under the cross origin environment?

  1. Add Access-Control-Allow-Origin Header to your response code.
  2. Serialize your response body.
e.g: How to write response of the Lambda

Conclusion

--

--

Korean, live in Japan. The programmer. I love to learn something new things. I’m publishing my toy projects using GitHub. Visit https://www.jangwook.net.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jangwook Kim

Korean, live in Japan. The programmer. I love to learn something new things. I’m publishing my toy projects using GitHub. Visit https://www.jangwook.net.