@rheactorjs/aws-lambda
v1.1.4
Published
Core components for RESTful AWS lambda endpoints
Downloads
10
Readme
aws-lambda
Core components for RESTful AWS lambda endpoints.
See image-service
for a concrete usage example.
API Gateway
APIs built with aws-lambda
require additional setup on API Gateway.
After creating an API Gateway API for the lambda by configure it as proxy resource the CORS configuration needs to be customized:
Select the /{proxy+}
resource and from the Actions drop-down select Enable CORS.
Add Content-Length
to the Access-Control-Allow-Headers
list.
Put 'Content-Type'
in the Access-Control-Expose-Headers
list under Advanced.
Click Enable CORS and replace existing CORS headers.
Don't forget to deploy the API afterwards.