Mock a GET request for an image

0

I'd like to mock a get request for an image so that it could be used in an html img element e.g. <img src="https://xyz.execute-api.us-east-1.amazonaws.com/test/log/ffs.png">

In my Integration Response I've got a Mapping Template for Content-Type image/png

{
"isBase64Encoded":  true,
"body": 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=='
}

But the logs keep telling me: Execution failed due to configuration error: Unable to transform request

All the examples out there seem to be around using S3 or Lambda to return the images rather than hard coding them.

It maybe that I am attempting the impossible - but I can't see what I am doing wrong.

Alinea
asked 2 years ago49 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions