skip to Main Content

AWS HTTP API Gateway + Lambda ( Node/express) 503 Service unavailable

I don't have much knowledge in AWS I have following setup, const express = require("express"); const serverless = require("serverless-http"); const app = express(); app.use(cors()); app.use((req, res, next) => { res.setHeader('Connection', 'keep-alive'); res.setHeader('Keep-Alive', 'timeout=30'); res.setHeader("Access-Control-Allow-Headers", "X-Requested-With,content-type"); res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Methods", "GET, POST,…

VIEW QUESTION

Existing solutions not working- (AWS Lambda Api) The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true'

my lambda function module.exports.handler = async(event, context, callback) => { return { statusCode: 200, headers: { "Access-Control-Allow-Credentials" : 'true', 'Access-Control-Allow-Origin': 'mydomain_name', 'Access-Control-Allow-Methods':'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT', 'Access-Control-Allow-Headers':'content-type,authorization', }, body: JSON.stringify({ message: `Charge processed succesfully!`, success:true, }), } } error -" The value of the…

VIEW QUESTION
Back To Top
Search