Our great sponsors
-
The required files to follow along in this example are available on GitHub, or here on my blog.
-
Further information on FastAPI GitHub Issue and Starlette GitHub Issue:
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
But we do not have a handler function, do we? We have a Mangum object wrapping the FastAPI application. Luckily, the Mangum object acts as a handler function, so we can just add the following in example/src/app/__init__.py:
-
Let's explore the next core utility in Lambda Powertools, the Metrics utility. This utility lets you easily push metrics to CloudWatch by taking care of all the necessary boilerplate. It works asynchronously by using Amazon CloudWatch Embedded Metrics Format, by logging the metrics to stdout. It also aggregates all metrics from each invocation to save on the number of calls to CloudWatch.
Related posts
- Why the Serverless Revolution Has Stalled
- Building Fast APIs with FastAPI: A Comprehensive Guide
- Writing a chat application in Django 4.2 using async StreamingHttpResponse
- Deploying an ML model to Paperspace and creating an API
- FastAPI middleware doesn't run while making request to websocket endpoint