0

I am trying to process a WAV(audio) file inside an Lambda function. I had exposed the Lambda through a POST method of API Gateway. I had tried both proxy integration and POST with the body mapping template, but unable to parse the required WAV file inside the lambda. I am getting a BASE64 string through API Gateway in either of the methods, which when decoded doesn't match the original WAV file.

Is there an issue in parsing the file or something needs to be done with the body mapping template ?

kanwal019
  • 95
  • 11
  • Have you tried uploading the wav file on Amazon S3, then triggering the lambda from S3, downloading the WAV file inside the lamba `/tmp` folder and then process it as a local file – piercus Mar 27 '18 at 19:44
  • I require the wav file to be sent by an api, as I need to pass some other data along it. Uploading to S3 and triggering lambda won't help in my case. – kanwal019 Mar 28 '18 at 10:00
  • What is the file size (see https://stackoverflow.com/q/46358922/824979) ? can you share file example and before/after base64 string ? – piercus Mar 28 '18 at 10:15

0 Answers0