My Authors
Read all threads
🔥 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
github.com/awslabs/aws-la…
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..

At the end of the session, after lots of water, if you watched ;), I talked briefly that Patterns are important to understand what worked well but we shouldn't hang to it as the ultimate truth

That was the hook for the Serverless Lens that came later

aws.amazon.com/blogs/aws/new-…
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

github.com/aws-samples/aw…
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

awslabs.github.io/aws-lambda-pow…
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.

awslabs.github.io/aws-lambda-pow…
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.

awslabs.github.io/aws-lambda-pow…
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
Before we decided to go GA, we knew this was going to grow, so we thought --- We need to learn from OSS folks

For that we created a GA Checklist, where we also documented all open source repo management automation that I learned by asking many of you

github.com/awslabs/aws-la…
When we thought this was good to go for GA, we've had some great folks like @keithrozario @pcolazurdo @michabahr @2Obelisk2 and others "What about X utility"

That triggered this discussion in which you can partake <3

github.com/awslabs/aws-la…
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
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with Heitor Lessa

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!