SlideShare a Scribd company logo
connect
DevAx
connect
DevAx
AWS Lambda Powertools
Simplifying Serverless best practices
@heitor_lessa
Heitor Lessa
Principal Solutions Architect
connect
DevAx
connect
DevAx
AWS operational responsibility models
On-Premises Cloud
Less More
Compute Virtual Machine
Amazon EC2 AWS Elastic Beanstalk AWS LambdaAWS Fargate
Databases DB
MySQL on EC2 Amazon RDS MySQL Amazon Aurora Aurora Serverless
Storage Storage
Amazon S3
Messaging ESBs
Amazon MQ Amazon Kinesis
Analytics
Hadoop on EC2 Amazon EMR Amazon Elasticsearch
Service
Amazon Athena
Amazon QLDB / DynamoDB
Amazon Event Bridge / SNS / SQS
Amazon Elastic File System
Insights
AWS GlueAmazon Redshift
Amazon MSK
connect
DevAx
connect
DevAx
Serverless Lens in AWS Well-Architected Tool
N
ew
connect
DevAx
Serverless Lens in AWS Well-Architected Tool
connect
DevAx
AWS Lambda Powertools
Logger
Metrics
Tracer
+ Utilities
awslabs / aws-lambda-powertools-python
connect
DevAx
connect
DevAx
[INFO] <timestamp> <msg>
Structured
Logging
Recap
Raw
Semi-structured
Structured
[INFO] ... {“message”: <msg> }
{“level”: “INFO”, “message”: <msg> }
Canonical [timestamp] <operation> meta=data
timestamp | operation | key=value |…
SampleType
connect
DevAx
[INFO] 2020-01-31T22:.. 1c8df7d3… Hello world
Result
Structured
Logging
Before
connect
DevAx
[INFO] … {“message”: “Hello world”}
Result
Structured
Logging
Before
connect
DevAx
Structured
Logging
Before
{
"asctime": "2020-07-12...",
"levelname": "INFO",
"name": "root",
"message": "Aha!"
}
Result
connect
DevAx
Structured
Logging
After
{
"timestamp": "2020-07-14...",
"level": "INFO",
"location": "collect.handler:5",
"service": "payment",
"sampling_rate": 0.0,
"message": ”Aha!”
}
Result
connect
DevAx
Structured
Logging
After
{
…
"lambda_function_name":..,
"lambda_function_memory_size": 128,
"lambda_function_arn": ”…",
"lambda_request_id": "52fd..",
"cold_start": true,
}
Result
connect
DevAx
connect
DevAx
Tracing
Recap
Trace
Segment
Sub-segment
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Type Key Value Namespace
Annotation UserId a1c8k...
Metadata Cart {….} Checkout
Legend Trace metadata
connect
DevAx
Tracing
Setup
connect
DevAx
Tracing
Setup
Result
connect
DevAx
Tracing
Before
connect
DevAx
Tracing
Before
Result
connect
DevAx
Tracing
Before
connect
DevAx
Tracing
Before
Result
connect
DevAx
Tracing
After
connect
DevAx
Tracing
After
connect
DevAx
connect
DevAx
Metrics
Recap
connect
DevAx
Metrics
Step 1
Synchronous
connect
DevAx
Metrics
Step 2
Synchronous
connect
DevAx
Metrics
Step 3
Asynchronous
connect
DevAx
Metrics
Step 3
Asynchronous
connect
DevAx
Metrics
Step 4
Asynchronous
connect
DevAx
Metrics
Step 5
Asynchronous
connect
DevAx
Metrics
Step 5
Asynchronous
connect
DevAx
Metrics
Step 5
Asynchronous
Result
connect
DevAx
Metrics
Result
connect
DevAx
Logger
Tracer
Metrics
All-in-one
Environment variable Value
POWERTOOLS_SERVICE_NAME shopping-cart
POWERTOOLS_METRICS_NAMESPACE e-commerce-app
LOG_LEVEL INFO
connect
DevAx
connect
DevAx
Summary
awslabs / aws-lambda-powertools-python
connect
DevAx
Demo examples
aws-samples / aws-serverless-airline aws-samples / aws-serverless-shopping-cart aws-samples / serverless-ecommerce-platform
Thank you!
connect
DevAx
Heitor Lessa
Principal Solutions Architect
@heitor_lessa

More Related Content

PDF
AWS Community Day Ireland - Refactoring a serverless app
PPTX
Basics AWS Presentation
PDF
Bluesoft @ AWS re:Invent 2017 + AWS 101
PDF
Platform for Innovation - AWS
PPTX
Amy Arambulo Negrette - Serverless Frenemies: Serverless Containers in Lambd...
PPTX
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
PPTX
Aws Diagram Builder
PDF
AWS Chicago user group: AWS Platform for .NET Developers
AWS Community Day Ireland - Refactoring a serverless app
Basics AWS Presentation
Bluesoft @ AWS re:Invent 2017 + AWS 101
Platform for Innovation - AWS
Amy Arambulo Negrette - Serverless Frenemies: Serverless Containers in Lambd...
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Aws Diagram Builder
AWS Chicago user group: AWS Platform for .NET Developers

Similar to AWS Lambda Powertools (20)

PDF
Serverless Architectural Patterns & Best Practices
PPTX
Serverless Architectural Patterns
PPTX
Serverless Architectural Patterns I AWS Dev Day 2018
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
PDF
Big data and serverless - AWS UG The Netherlands
PDF
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
PPTX
Serverless without Code (Lambda)
PDF
beSharp a serverless approach to big data on aws
PDF
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
PDF
Serverless Architectural Patterns and Best Practices | AWS
PPTX
Serverless data and analytics on AWS for operations
PDF
Serverless Day Zero: How to Serveless [July 2019]
PDF
SVS215 - Build observability into a serverless application
PDF
JustGiving | Serverless Data Pipelines, API, Messaging and Stream Processing
PDF
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
PDF
Jumpstart your idea with AWS Serverless [Oct 2020]
PDF
Serverless AWS reInvent 2019 recap
PPTX
Serverless Generative AI on AWS, AWS User Groups of Florida
PDF
Modern Applications Development on AWS
PDF
Building a Sustainable Data Platform on AWS
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns
Serverless Architectural Patterns I AWS Dev Day 2018
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Big data and serverless - AWS UG The Netherlands
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless without Code (Lambda)
beSharp a serverless approach to big data on aws
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Serverless Architectural Patterns and Best Practices | AWS
Serverless data and analytics on AWS for operations
Serverless Day Zero: How to Serveless [July 2019]
SVS215 - Build observability into a serverless application
JustGiving | Serverless Data Pipelines, API, Messaging and Stream Processing
JustGiving – Serverless Data Pipelines, API, Messaging and Stream Processing
Jumpstart your idea with AWS Serverless [Oct 2020]
Serverless AWS reInvent 2019 recap
Serverless Generative AI on AWS, AWS User Groups of Florida
Modern Applications Development on AWS
Building a Sustainable Data Platform on AWS
Ad

More from Heitor Lessa (9)

PPTX
re:Invent 2023 - The Pragmatic Serverless Python Developer
PDF
re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
PDF
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
PDF
AWS Lambda Powertools walkthrough.pdf
PDF
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
PDF
Serverless days Stockholm - How to build a full-stack airline ticketing web app
PDF
ArmadaJS - how to build a full-stack airline ticketing web app
PDF
Serverless best practices plus design principles 20m version
PDF
Organising time effectively
re:Invent 2023 - The Pragmatic Serverless Python Developer
re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
AWS Lambda Powertools walkthrough.pdf
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
Serverless days Stockholm - How to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web app
Serverless best practices plus design principles 20m version
Organising time effectively
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
MIND Revenue Release Quarter 2 2025 Press Release
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Approach and Philosophy of On baking technology

AWS Lambda Powertools