Say I have this HTML:
What I would like to do is have example.com/pic map to an AWS API Gateway end
Luckily, now AWS API Gateway supports binary data, though you also need to update your resource method through the CLI as it is not yet implemented in the Console. This is what you need to do:
Content-Type
as image/jpeg
in HTTP 200 Status Response
HeaderContent-Type
as 'image/jpeg'
in Header Mappings. Mind the quotes!contentHandling
attribute to CONVERT_TO_BINARY
on your Integration ResponseCheck to entire process in this great step-by step guide: https://stackoverflow.com/a/41434295/720665