SlideShare a Scribd company logo
1 of 56
Download to read offline
© 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

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
 
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)

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...
 
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
Implementing Multi-Region AWS IoT, ft. Analog Devices (IOT401) - AWS re:Inven...
 

More from Heitor Lessa

Organising time effectively
Organising time effectivelyOrganising time effectively
Organising time effectively
Heitor 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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

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