How to create post API in Amazon Web Service

step 1:Go to your amazon API gateway

step 2:Click create API button and text your api name it may be anything,description is optional

step 3:you can select the create method as post in the API

step 4:select the lambda function and region name

step 5:choose method response and just add headers as following

X-Requested-With 
Access-Control-Allow-Headers 
Access-Control-Allow-Origin 
Access-Control-Allow-Methods

step 6:Then go to method response and just edit mapping value as following

X-Requested-With ‘*’
Access-Control-Allow-Headers ‘Content-Type,x-requested-with,Access-Control-Allow-Origin,Access-Control-Allow-Headers,Access-Control-Allow-Methods’
Access-Control-Allow-Origin ‘*’
Access-Control-Allow-Methods ‘POST’

step 7:Finally deploy the API