SlideShare a Scribd company logo
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Lens in AWS WA Tool
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Lens in AWS WA Tool
Most common risks
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Findings come in late
Plan/design Build Ship Operate
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Findings come in late
Plan/design Build Ship Operate
Readiness assessment
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Findings come in late
Plan/design Build Ship Operate
Readiness assessment
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Findings come in late
Plan/design Build Ship Operate
Today, let’s fix here
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Powertools
Logger
Metrics
Tracer
+ Many more
A toolkit to implement
Serverless best practices and
increase developer velocity
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Powertools
OPS1 solution
OPS 1: How do you evaluate your Serverless application’s health?
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda Powertools
walkthrough
Heitor Lessa (he/him)
Principal Solutions Architect, Developer Acceleration (DevAx)
AWS
@heitor_lessa || lessa@amazon.com
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Today Up next
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: Serverless Lens mapping (51%)
Question Practice
SEC 1 Scope access based on identity’s metadata
SEC 2 Design smaller, single-purpose functions
SEC 2 Use temporary credentials between resources and components
SEC 3 Store secrets that are used in your code securely
REL 1 Use mechanisms to protect nonscalable resources
REL 2 Manage transaction, partial, and intermittent failures
REL 2 Manage duplicate and unwanted events
REL 2 Orchestrate long-running transactions
OPS 1 Use distributed tracing, and code is instrumented with additional context
OPS 1 Use structured and centralized logging
OPS 1 Use application, business, and operations metrics
OPS 2 Use infrastructure as code (IaC) and stages isolated in separate environments
OPS 2 Use configuration management
PERF 1 Measure and optimize function startup time
PERF 1 Take advantage of concurrency via async and stream-based function invocations
PERF 1 Optimize access patterns and apply caching where applicable
COST 1 Minimize external calls and function code initialization
COST 1 Optimize logging output and its retention
COST 1 Use cost-aware usage patterns in code
Total 19
Powertools assistance
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: Scale in numbers
5 billion 161%
weekly invocations growth YoY
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: How did we get here?
Our customers grew
Observability
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: How did we get here?
Batch partial failure
REST/GraphQL API
Input/Output validation
Config management
Handling secrets
Idempotency
Observability
BYO middleware
Self-documented schemas Feature flags
Data extraction
Caching
Our customers grew
The community
grew too
~40% came from the community
Streaming
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: How did we get here?
Our customers grew
The community
grew too
Data engineers
Developers
Platform eng.
Security eng.
APIs, event-driven architecture
ETL, data validation
Automation, abstractions
AppSec, guardrails
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: Languages
Feature parity
Java
Python TypeScript .NET
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today: Feature Parity Python Java TypeScript .NET
Tracer x x x x
Logger x x x x
Metrics x x x x
Event handler (REST) x
Event handler (GraphQL) x
Idempotency x x
Parameters x x
Batch processing x
Validation x x
Event source data classes x x x
Parser x
Feature flags x
Streaming x
JMESPath (data extraction) x x
Amazon SQS large
message handling
x
Feature parity
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Up next: What the near
future holds
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon CloudWatch
X-Ray
Amazon CloudWatch and AWS X-Ray
Up next
Observability providers
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Up next
Sensitive data masking
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Up next: Long-term
Lambda Powertools Powertools for AWS
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo
REST API
Data pipeline
Making critical operations idempotent
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
Heitor Lessa (he/him)
@heitor_lessa
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Appendix
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Recap
Raw Semi-structured Canonical Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Without Powertools
Raw
[INFO] 2022-12-02T22:.. 1c8df7d3… Hello world
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Without Powertools
[INFO] 2022-12-02T22:.. … {“message”: “Hello world”}
Semi
structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Without Powertools
Canonical
at=INFO msg=Aha! request_latency=0.1
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Without Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Without Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structured logging: Powertools
Structured
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Distributed tracing: Recap
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trace
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Distributed tracing: Recap
Legend
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trace
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Distributed tracing: Recap
Legend
Segment
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trace
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Distributed tracing: Recap
Legend
Segment
Sub-segment
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trace
API Gateway Lambda Fargate
DynamoDB
API Gateway
S3 bucket
Distributed tracing: Recap
Legend
Segment
Sub-segment
Type Key Value Namespace
Annotation UserId a1c8k...
Metadata Cart {….} Checkout
Trace metadata
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Without Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Distributed tracing: Powertools
Tracing
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics: Recap
Namespace
Metric
Unit
Dimensions
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics: Without Powertools
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics: Powertools
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics: Powertools
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Metrics: Powertools
Metrics
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda Powertools: Humble beginnings
Recap

More Related Content

Similar to AWS Lambda Powertools walkthrough.pdf

Amazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridgeAmazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridge
Carlos Santana
 
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
kreuzwerker GmbH
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open Source
All Things Open
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Amazon Web Services
 
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
Amazon Web Services
 
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdfre:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
Heitor Lessa
 
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Amazon Web Services
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Amazon Web Services
 
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
HostedbyConfluent
 
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
HostedbyConfluent
 
Göteborg Reinvent 2023_Aritra_updated.pptx
Göteborg Reinvent 2023_Aritra_updated.pptxGöteborg Reinvent 2023_Aritra_updated.pptx
Göteborg Reinvent 2023_Aritra_updated.pptx
Aritra Nag
 
How to Architect and Bring to Market SaaS on AWS GovCloud (US)
How to Architect and Bring to Market SaaS on AWS GovCloud (US)How to Architect and Bring to Market SaaS on AWS GovCloud (US)
How to Architect and Bring to Market SaaS on AWS GovCloud (US)
Amazon Web Services
 
AWS reInvent 2022 reCap AI/ML and Data
AWS reInvent 2022 reCap AI/ML and DataAWS reInvent 2022 reCap AI/ML and Data
AWS reInvent 2022 reCap AI/ML and Data
Chris Fregly
 
AWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdfAWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdf
Rohini Gaonkar
 
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Amazon Web Services
 
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG ChileRe:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
Alvaro Garcia
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Amazon Web Services
 
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Amazon Web Services
 
Control Planes on Kubernetes and Policy Validation
Control Planes on Kubernetes and Policy ValidationControl Planes on Kubernetes and Policy Validation
Control Planes on Kubernetes and Policy Validation
Carlos Santana
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
All Things Open
 

Similar to AWS Lambda Powertools walkthrough.pdf (20)

Amazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridgeAmazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridge
 
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
kreuzwerker AWS Modernizing Legacy Operations with Containerized Solutions 20...
 
Build Developer Experience Teams for Open Source
Build Developer Experience Teams for Open SourceBuild Developer Experience Teams for Open Source
Build Developer Experience Teams for Open Source
 
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
Instrumenting Kubernetes for Observability Using AWS X-Ray and Amazon CloudWa...
 
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
Migration Planning with AWS Application Discovery Service - ENT308 - Chicago ...
 
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdfre:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
 
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
Build Your Own Log Analytics Solutions on AWS (ANT323-R) - AWS re:Invent 2018
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
 
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
Get More from your Data: Accelerate Time-to-Value and Reduce TCO with Conflue...
 
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
 
Göteborg Reinvent 2023_Aritra_updated.pptx
Göteborg Reinvent 2023_Aritra_updated.pptxGöteborg Reinvent 2023_Aritra_updated.pptx
Göteborg Reinvent 2023_Aritra_updated.pptx
 
How to Architect and Bring to Market SaaS on AWS GovCloud (US)
How to Architect and Bring to Market SaaS on AWS GovCloud (US)How to Architect and Bring to Market SaaS on AWS GovCloud (US)
How to Architect and Bring to Market SaaS on AWS GovCloud (US)
 
AWS reInvent 2022 reCap AI/ML and Data
AWS reInvent 2022 reCap AI/ML and DataAWS reInvent 2022 reCap AI/ML and Data
AWS reInvent 2022 reCap AI/ML and Data
 
AWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdfAWS re-Invent re-Cap general deck 2022-2023 .pdf
AWS re-Invent re-Cap general deck 2022-2023 .pdf
 
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
Operational Excellence with Containerized Workloads Using AWS Fargate (CON320...
 
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG ChileRe:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
Re:cap día 2 del Aws Re:Invent 2023 - AWS UG Chile
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
 
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
 
Control Planes on Kubernetes and Policy Validation
Control Planes on Kubernetes and Policy ValidationControl Planes on Kubernetes and Policy Validation
Control Planes on Kubernetes and Policy Validation
 
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
Securing Cloud Resources Deployed with Control Planes on Kubernetes using Gov...
 

More from Heitor Lessa

re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdfre:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
Heitor Lessa
 
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
Heitor Lessa
 
AWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless appAWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless app
Heitor Lessa
 
AWS Lambda Powertools
AWS Lambda PowertoolsAWS Lambda Powertools
AWS Lambda Powertools
Heitor Lessa
 
Serverless days Stockholm - How to build a full-stack airline ticketing web app
Serverless days Stockholm - How to build a full-stack airline ticketing web appServerless days Stockholm - How to build a full-stack airline ticketing web app
Serverless days Stockholm - How to build a full-stack airline ticketing web app
Heitor Lessa
 
ArmadaJS - how to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web appArmadaJS - how to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web app
Heitor Lessa
 
Serverless best practices plus design principles 20m version
Serverless   best practices plus design principles 20m versionServerless   best practices plus design principles 20m version
Serverless best practices plus design principles 20m version
Heitor Lessa
 
Organising time effectively
Organising time effectivelyOrganising time effectively
Organising time effectivelyHeitor Lessa
 

More from Heitor Lessa (8)

re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdfre:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
 
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
 
AWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless appAWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless app
 
AWS Lambda Powertools
AWS Lambda PowertoolsAWS Lambda Powertools
AWS Lambda Powertools
 
Serverless days Stockholm - How to build a full-stack airline ticketing web app
Serverless days Stockholm - How to build a full-stack airline ticketing web appServerless days Stockholm - How to build a full-stack airline ticketing web app
Serverless days Stockholm - How to build a full-stack airline ticketing web app
 
ArmadaJS - how to build a full-stack airline ticketing web app
ArmadaJS - how to build a full-stack airline ticketing web appArmadaJS - 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
Serverless   best practices plus design principles 20m versionServerless   best practices plus design principles 20m version
Serverless best practices plus design principles 20m version
 
Organising time effectively
Organising time effectivelyOrganising time effectively
Organising time effectively
 

Recently uploaded

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 

Recently uploaded (20)

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 

AWS Lambda Powertools walkthrough.pdf

  • 1. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless Lens in AWS WA Tool
  • 2. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless Lens in AWS WA Tool Most common risks
  • 3. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Findings come in late Plan/design Build Ship Operate
  • 4. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Findings come in late Plan/design Build Ship Operate Readiness assessment
  • 5. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Findings come in late Plan/design Build Ship Operate Readiness assessment
  • 6. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Findings come in late Plan/design Build Ship Operate Today, let’s fix here
  • 7. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda Powertools Logger Metrics Tracer + Many more A toolkit to implement Serverless best practices and increase developer velocity
  • 8. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda Powertools OPS1 solution OPS 1: How do you evaluate your Serverless application’s health?
  • 9. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda Powertools walkthrough Heitor Lessa (he/him) Principal Solutions Architect, Developer Acceleration (DevAx) AWS @heitor_lessa || lessa@amazon.com
  • 10. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Today Up next
  • 11. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today
  • 12. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: Serverless Lens mapping (51%) Question Practice SEC 1 Scope access based on identity’s metadata SEC 2 Design smaller, single-purpose functions SEC 2 Use temporary credentials between resources and components SEC 3 Store secrets that are used in your code securely REL 1 Use mechanisms to protect nonscalable resources REL 2 Manage transaction, partial, and intermittent failures REL 2 Manage duplicate and unwanted events REL 2 Orchestrate long-running transactions OPS 1 Use distributed tracing, and code is instrumented with additional context OPS 1 Use structured and centralized logging OPS 1 Use application, business, and operations metrics OPS 2 Use infrastructure as code (IaC) and stages isolated in separate environments OPS 2 Use configuration management PERF 1 Measure and optimize function startup time PERF 1 Take advantage of concurrency via async and stream-based function invocations PERF 1 Optimize access patterns and apply caching where applicable COST 1 Minimize external calls and function code initialization COST 1 Optimize logging output and its retention COST 1 Use cost-aware usage patterns in code Total 19 Powertools assistance
  • 13. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: Scale in numbers 5 billion 161% weekly invocations growth YoY
  • 14. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: How did we get here? Our customers grew Observability
  • 15. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: How did we get here? Batch partial failure REST/GraphQL API Input/Output validation Config management Handling secrets Idempotency Observability BYO middleware Self-documented schemas Feature flags Data extraction Caching Our customers grew The community grew too ~40% came from the community Streaming
  • 16. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: How did we get here? Our customers grew The community grew too Data engineers Developers Platform eng. Security eng. APIs, event-driven architecture ETL, data validation Automation, abstractions AppSec, guardrails
  • 17. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: Languages Feature parity Java Python TypeScript .NET
  • 18. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Today: Feature Parity Python Java TypeScript .NET Tracer x x x x Logger x x x x Metrics x x x x Event handler (REST) x Event handler (GraphQL) x Idempotency x x Parameters x x Batch processing x Validation x x Event source data classes x x x Parser x Feature flags x Streaming x JMESPath (data extraction) x x Amazon SQS large message handling x Feature parity
  • 19. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Up next: What the near future holds
  • 20. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon CloudWatch X-Ray Amazon CloudWatch and AWS X-Ray Up next Observability providers
  • 21. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Up next Sensitive data masking
  • 22. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Up next: Long-term Lambda Powertools Powertools for AWS
  • 23. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Demo REST API Data pipeline Making critical operations idempotent
  • 24. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! Heitor Lessa (he/him) @heitor_lessa
  • 25. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Appendix
  • 26. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging
  • 27. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Recap Raw Semi-structured Canonical Structured
  • 28. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Without Powertools Raw [INFO] 2022-12-02T22:.. 1c8df7d3… Hello world
  • 29. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Without Powertools [INFO] 2022-12-02T22:.. … {“message”: “Hello world”} Semi structured
  • 30. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Without Powertools Canonical at=INFO msg=Aha! request_latency=0.1
  • 31. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Without Powertools Structured
  • 32. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Without Powertools Structured
  • 33. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Powertools Structured
  • 34. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Powertools Structured
  • 35. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Powertools Structured
  • 36. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structured logging: Powertools Structured
  • 37. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing
  • 38. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. API Gateway Lambda Fargate DynamoDB API Gateway S3 bucket Distributed tracing: Recap
  • 39. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Trace API Gateway Lambda Fargate DynamoDB API Gateway S3 bucket Distributed tracing: Recap Legend
  • 40. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Trace API Gateway Lambda Fargate DynamoDB API Gateway S3 bucket Distributed tracing: Recap Legend Segment
  • 41. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Trace API Gateway Lambda Fargate DynamoDB API Gateway S3 bucket Distributed tracing: Recap Legend Segment Sub-segment
  • 42. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Trace API Gateway Lambda Fargate DynamoDB API Gateway S3 bucket Distributed tracing: Recap Legend Segment Sub-segment Type Key Value Namespace Annotation UserId a1c8k... Metadata Cart {….} Checkout Trace metadata
  • 43. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 44. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 45. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 46. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 47. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 48. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Without Powertools Tracing
  • 49. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Distributed tracing: Powertools Tracing
  • 50. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics
  • 51. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics: Recap Namespace Metric Unit Dimensions Metrics
  • 52. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics: Without Powertools Metrics
  • 53. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics: Powertools Metrics
  • 54. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics: Powertools Metrics
  • 55. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Metrics: Powertools Metrics
  • 56. © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lambda Powertools: Humble beginnings Recap