This is project inspired by a blog post from Hendrik Hagen but intend to use Python instead of Node.js
Check out the original Node.js project on https://github.com/Eraszz/tecracer-blog-projects/tree/main/api-gateway-swagger-ui
- Generate a Flask zip for AWS Lambda layer by executing the generate-requirements.sh script.
- Export AWS credentials from your favorite AWS account
- Run
terraform apply
The deployment will generate an Amazon API Gateway api into the Paris (eu-west-3
) region, with a demo route /orders
and the associated documentation at /api-docs
route.
This project is intended to be a minimal-dependecies standalone example of a Python serverless swagger UI served by Amazon Api Gateway. This project also bundles modified versions of other open-source projects, in particular:
- Flask Swagger UI proposing a blueprint to run Swagger UI in Flask
- awsgi exposing a way to run Flask apps directly in Amazon Api Gateway with AWS Lambda proxy integration
The content inside the src/api-docs/layer/dist
directory are binaries from the Swagger UI project and duplicated here as example. You may upgrade or downgrade you Swagger UI version according to your need by downloading the appropriate version and copying inside the directory.
This project is provided under the Apache 2.0 license, just like Swagger UI does. This project is freely inspired by copyrighted work by Hendrik Hagen and other work under the MIT license, like the Flask Swagger UI license or awsgi license
Please ensure all these licenses and copyrights are compatible with your company's policy before using this software.