AWS lambda s3 Api gateway in nodejs


Hi ,
can anyone help me to write my lambda code in Nodejs

I want to save response as content in file and put it into S3 . and that response generate when i press submit button in my website .

How i fetch response and send it to API Gateway ?

Here is workflow :-

press submit —> call API gateway using ajax , Jqery ( inside my website html) -----> invoke lambda function -----> lambda function create file in s3 (content of the file is response generate in json)