AWS Api Gateway - Tile Response Encoding #399
-
Hi @vincentsarago, Thanks as always for all you do for this community 🙏 I've been using a Titiler Lambda integrated with an API Gateway endpoint since August. After attempting to upgrade from v0.3.3 to v0.3.12 (I want to use the new You can see that when I Base64 decode the data, I have a valid JPEG: Obviously API Gateway settings are a bit finicky regarding this type of thing, but I don't believe that's what's at fault in this case. I version control all of my infrastructure, and a change to the Titiler version alone seems to be responsible for this change in behavior. After looking through the diffs over the last couple months, I noticed the upgrade from v0.3.9 -> v0.3.10 included a change to response middleware. Do you think that could be the culprit? Any other change you can think of that might have caused such a thing? Thanks for your thoughts, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
That's really interesting. So the change between 0.3.9 and 0.3.10 you are referring is the switch to starlette_cramjam, which should return the exact same data as the previous compression middleware. can you check the headers returned by the API? |
Beta Was this translation helpful? Give feedback.
-
Yeah, super strange. Thanks for chiming in.
I'm not familiar with This Lambda is the result of building Titiler myself and hooking it up to API GW, rather than using the provided AWS CDK:
That also means that the API Gateway definition is my own as well. All Lambda and API GW settings are inspired by values in your CDK definition, but it sure seems likely that the root cause is in my infrastructure definition. I'll keep digging and report back. @vincentsarago Do you happen to know of any API Gateway-hosted instances of ^0.3.10 that have properly functioning Thanks again, |
Beta Was this translation helpful? Give feedback.
-
This looks to be a problem with missing @vincentsarago thanks for your attention on this and I'm sorry for the distraction. I've still got the previous configuration around in a non-prod environment if this is something interesting to you and you'd care to see any request/responses. |
Beta Was this translation helpful? Give feedback.
This looks to be a problem with missing
Binary Media Types
specified in my API Gateway REST API settings. A new*/*
wildcard entry fixes the issue. I'm a bit baffled why I didn't previously need any binary media types specified with Titiler v0.3.3, but 🤷 I'm going to simply move ahead with a new*/*
entry without digging any further into root cause.@vincentsarago thanks for your attention on this and I'm sorry for the distraction. I've still got the previous configuration around in a non-prod environment if this is something interesting to you and you'd care to see any request/responses.