I have a lambda running on AWS that processes a JSON file. I'd like to pass that JSON file from the command line using curl through a REST interface configured on an API gateway, e.g.
curl -X POST -H "x-api-key: MyAPIKey" -H "Content-Type: application/json" -d @myFile.json https://my-api.us-east-1.amazonaws.com/default/MyLambda
I've created an API gateway, and added it as a trigger for the lambda, but when the request method is triggered, the content of the JSON file has been added to the "body" attribute of a JSON object.
Is it possible to pass the file directly to the lambda?
