I’m pretty new to Serverless so please excuse the stupid question. I have a POST endpoint configured with lambda-proxy and working fine with some test data (path variables and query variables are read correctly and so on).
The next step is actually to use the endpoint to upload a file the way my current Flask app works (i.e. with a standard request such as
curl --form "catalogue=@FILE_NAME.zip" ENDPOINT
However I cannot seem to find a way to code the endpoint so that you can upload a zip file and save it locally with lambda. In other words, my function below should retrieved the posted data (the zip file) in the event object and save it to the temp folder for further processing (or store it in s3, it’s really the same).
def index(event, context): # read from event the uploaded file and save it as FILE.zip in the temp folder
Can somebody have a detailed explanation or some pointers on how to achieve this?