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
Documenting this here in case someone else comes across this! Thank you again to @logandk for his help resolving this (and for creating this wonderful library).
If you are using serverless-wsgi as a library (not the plugin), and you are trying to make it work with AWS API Gateway in CDK, you will need to set the API_GATEWAY_BASE_PATH environment variable manually in your code.
This way, the serverless_wsgi library parses the api gateway URL correctly. The value you set this env var to needs to be exactly the same as what you pass to to path_part in CDK.
If you do not set the env var, you will see an error like: 404: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Documenting this here in case someone else comes across this! Thank you again to @logandk for his help resolving this (and for creating this wonderful library).
If you are using
serverless-wsgi
as a library (not the plugin), and you are trying to make it work with AWS API Gateway in CDK, you will need to set theAPI_GATEWAY_BASE_PATH
environment variable manually in your code.For example, if you set the
path_part
tov1
You need to do:
This way, the
serverless_wsgi
library parses the api gateway URL correctly. The value you set this env var to needs to be exactly the same as what you pass to topath_part
in CDK.If you do not set the env var, you will see an error like:
404: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again
.Cheers!
Beta Was this translation helpful? Give feedback.
All reactions