I want to POST an image to an API Gateway and I see that this is now possible after reading this: Binary Support for API Integrations with Amazon API Gateway | AWS Compute Blog
Is it possible to add additional attributes to the request as well or can it only contain the image?
On the page I linked, there is a section called Body Mapping Template and it shows:
{
“operation”: “thumbnail”,
“base64image”: $input.body
}
My question is can I do something like this:
{
“operation”: “thumbnail”,
“base64image”: “$input.body.image”,
“otherData”: “$input.body.otherData”
}
or something similar.
Thanks in advance! (And sorry for yet another question)
Edit/Update: I think I found a better way to accomplish what I want to do. I’m going to upload the image to S3 with some metadata. The upload will trigger a lambda function, then I can use the image in the lambda with the metadata. Then image is only needed for text recognition, so once I get what I need from it, I’ll remove it from S3 in order to save space.
Related discussions: