-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allowing CORS in AWS Lambda #294
Comments
@j08lue @panakouris you got any experience with this? |
What does |
HTTP/2 200 |
I got some advancements: I had to set CORS in the s3 bucket where both the sqlite db and the images are. @dionhaefner does the header look good for you? |
Have not worked with a deployment in a while, but it used to work well out of the box to Zappa-deploy to Lambda and then For debugging CORS issues, a catch is, though, that error responses (500 or 400) do not set CORS headers. So if your request triggers an error response, you will get a CORS error in your client, which obscures the actual issue. You can look into the Lambda logs for seeing whether the original request failed.
Why would you have to do that? It is still just the Lambda connecting to those, not the client, no? |
Header looks good, you can see that CORS is set:
So it's probably what @j08lue said: The lambda is throwing an error which doesn't set CORS. Please check the logs for exceptions. |
Yes only the lambda connects to s3. Cannot really explain this, but its thew only thing that worked in a 4 day struggle. |
If you want to debug this further it could also be helpful if you could share the original requests that failed (which you blacked out in your screenshot). You can censor the endpoint URL of course. |
I am trying deployment on aws lambda with zappa following the tutorial. I need to enable CORS for tiles and apparently this is not working.
I have edited zappa_settings as follows:
However when I do
terracotta connect {address of lambda}
I still cannot see any image and through the developer tool I see an error:Is there anything extra I have to set up on the api gateway or lambda configuration?
The text was updated successfully, but these errors were encountered: