flask-lambda | Python module to make Flask | Cloud Functions library
kandi X-RAY | flask-lambda Summary
kandi X-RAY | flask-lambda Summary
Python module to make Flask compatible with AWS Lambda for creating RESTful applications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Build the environ from an event .
- Calls Lambda function .
- Find the version string .
- Initialize the response .
- Start response .
flask-lambda Key Features
flask-lambda Examples and Code Snippets
Community Discussions
Trending Discussions on flask-lambda
QUESTION
I'm running a Flask-application on AWS-Lambda based on this tutorial: https://andrewgriffithsonline.com/blog/180412-deploy-flask-api-any-serverless-cloud-platform/#create-flask-app
My problem now is that this setup works absolutely fine for the defined home-path ("/"), but whenever I call e.g. "/user/7" the API-Gatway returns 403, since it doesn't know the route, although it is defined in the Flask-Lambda.
Is there a possibility to setup API-Gateway in a way to pass the whole request through to the Lambda, regardless of whatever path the request has?
...ANSWER
Answered 2020-Jun-25 at 06:39You can use the {proxy+}
path to act as a catch all for API Gateway.
By creating the proxy resource anything that matches the prefix will automatically use that resource, if you add it to the root resource then it will process all other requests that do not match a specific URL pattern.
You could also use variables in your path resource names, for your user method for example the path would end up being /user/{userId}
. This is the preferable solution as it is still being specific to the request type.
More information is available here.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install flask-lambda
You can use flask-lambda like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page