aws lambda UTF-8 response header

Question:

I have a lambda function that returns a string that contains UTF-8 characters (german umlaute). However, The AWS API-Gateway response does not contain the utf-8 header. How can I add it so the client receives a readable response?

Answer:

I was able to solve this problem like this in Python:

I just needed to set the additional header “content-type”.
But I’m not sure whether you need to have “HTTP-Proxy-Integration” enabled (like i did).

Leave a Reply