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
preguntada hace 2 años49 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas