You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to deploy this project on AWS using API Gateway and Lambda through serverless.
I have modified the dockerfile to use the aws lambda base docker image and the app to access the Magnum handler, set up two endpoints in API Gateway, one for root and one for {proxy+} and manually setup up a pgstac using Aurora PostgreSQL.
Things work well and I can access the endpoints. The problem I am facing is that the root URL of API Gateway contains the stage and results in a URL like https://{api_Id}.execute-api.{region}.amazonaws.com/{stage}/ but the URLs generated from the STAC API are like this https://{api_Id}.execute-api.{region}.amazonaws.com/collections/ which don't work out of the box. Adding the stage by hand (e.g. https://{api_Id}.execute-api.{region}.amazonaws.com/{stage}/collections/) works with the exception of the api.html which is normal under the circumstance.
I have no experience with Fast API and every possible solution I found on the net didn't help.
I am sure that I am missing something. If needed I can post my dockerfile and serverless.yml.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered:
Answering my own question to leave as a reference for anyone else that faces this issue in the future. Following this issue I added this app.root_path = '/dev' after app = api.app in pgstac/app.py. This can be improved to set the root path based on a env variable from serverless.yml.
Hello, I am trying to deploy this project on AWS using API Gateway and Lambda through serverless.
I have modified the dockerfile to use the aws lambda base docker image and the app to access the Magnum handler, set up two endpoints in API Gateway, one for root and one for
{proxy+}
and manually setup up a pgstac using Aurora PostgreSQL.Things work well and I can access the endpoints. The problem I am facing is that the root URL of API Gateway contains the stage and results in a URL like
https://{api_Id}.execute-api.{region}.amazonaws.com/{stage}/
but the URLs generated from the STAC API are like thishttps://{api_Id}.execute-api.{region}.amazonaws.com/collections/
which don't work out of the box. Adding the stage by hand (e.g.https://{api_Id}.execute-api.{region}.amazonaws.com/{stage}/collections/
) works with the exception of theapi.html
which is normal under the circumstance.I have no experience with Fast API and every possible solution I found on the net didn't help.
I am sure that I am missing something. If needed I can post my dockerfile and serverless.yml.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: