Loading favicon.ico on AWS Lambda

Finally I was able to solve the issue. I described the solution is much more detail in another post. Have a look there and I hope this saves a lot of future headaches.

In short: The UnicodeDecodeError happened because awsgi.response() decodes everything as utf-8 by default. You have to tell it explicitly to decode your image type as base 64.