🔥 AWS Lambda Powertools for Python is now GA 🔥

We're now GA with four utilities

🌟Core: Tracer, Logger, and Metrics
🌟Bring your own middleware

Core contributors: @Tom_McC @NMoutschen

More details in this 🧵

#serverless #aws #python
https://github.com/awslabs/aws-lambda-powertools-python/releases/tag/v1.0.0
Last year I was fortunate enough to speak at re:Invent about Serverless Architectural Patterns and Best Practices

That preceded the work we've been doing with the AWS Well-Architected Serverless Lens since 201, however there was to it than patterns.. https://www.youtube.com/watch?reload=9&v=9IYpGTS7Jy0
What I also mentioned was that some of those best practices shouldn't be that hard, and it's on us to make that easier - Both in finding and adopting them.

And finalized by going through the initial version of the Powertools that's now GA https://github.com/aws-samples/aws-lambda-powertools/
The first utility that came out was Tracer.

A thin abstraction of AWS X-Ray SDK that would encapsulate some common practices

1. Add a Cold start annotation
2. Capture both sync and async methods
3. Add function return and exceptions as metadata

https://awslabs.github.io/aws-lambda-powertools-python/core/tracer/
The second utility that came out was Logger.

There's a lot of setup to get a good structured logging for Python functions - Well, there was

Logger also handles cold start as a key, appending additional keys, logging structured exceptions, sampling etc.

https://awslabs.github.io/aws-lambda-powertools-python/core/logger/
The third utility that came out was Metrics.

Creating metrics asynchronously wasn't an easy task until CloudWatch Embedded Metric Format came out.

We took that, and made it easier to use, capture cold start, and validation against common mistakes.

https://awslabs.github.io/aws-lambda-powertools-python/core/metrics/
Then we thought - If we continue this way, we will have 50 decorators...

The fourth utility that came out was the Middleware Factory.

That gives you flexibility to create things your way, and if you want, we can trace the execution of that for you with no effort
Last but not least, it's still Day one.

There's tons I wish we had included before GA, but we'd like to hear from you in that RFC what would make your Serverless dev life easier....

and obviously the inevitable question

What other runtime you'd like this to be?

Thank you <3
You can follow @heitor_lessa.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: