Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

status 502 bad api gateway error solution for aws lambda

// status 502 bad api gateway error solution for aws lambda

exports.handler = async (event) => {
    const response = {
        statusCode: 200,
        headers: {
            "Access-Control-Allow-Headers" : "Content-Type",
            "Access-Control-Allow-Origin": "https://www.example.com",
            "Access-Control-Allow-Methods": "OPTIONS,POST,GET"
        },
        body: JSON.stringify('Hello from Lambda!'),
    };
    return response;
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: how can i convert object to an array javascript 
Javascript :: clear the command prompt node 
Javascript :: swap function javascript 
Javascript :: add one file to another in ejs 
Javascript :: Ways to iterate array in js 
Javascript :: puppeteer set download path 
Javascript :: javascript string replace all 
Javascript :: map array method create object 
Javascript :: anchor link issue with fixed header css js 
Javascript :: react native new project mac 
Javascript :: mongoBD $inc operator 
Javascript :: map list in javascript 
Javascript :: java json string to map 
Javascript :: js unspecified parameters 
Javascript :: js if string not empty 
Javascript :: merge-sort js 
Javascript :: textarea javascript set value 
Javascript :: open folder node js 
Javascript :: How to set the background image URL of an element using jQuery 
Javascript :: stringify json javascript 
Javascript :: http get response body node js 
Javascript :: js how to sort strings in array 
Javascript :: using bootstrap with react 
Javascript :: toastr.success 
Javascript :: how to route react from laravel 
Javascript :: javascript get element by id and class 
Javascript :: Orderby on multiple columns using typeorm 
Javascript :: Node -Cron Run every minute 
Javascript :: convert an array to uppercase or lowercase js 
Javascript :: mongoose save or update 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =