SlideShare a Scribd company logo
1 of 21
Download to read offline
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
AWS Lambda
8 things/tools you did not know
Miro Masat
Solutions Architect
Amazon Web Services
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Agenda
1. Alternative Monitoring
2. AWS Chalice
3. Event Filtering
4. Rightsizing Lambda
5. Serverless Airline
6. Invoke Lambda from your DB
7. Cold Start Optimization
8. Graviton
2
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Alternative Monitoring
3
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Send AWS Lambda logs to custom destinations
- Lambda Extensions are a new way for
monitoring, observability, security, and
governance
- You can therefore disable logging to
CloudWatch Logs
- Integrations already written for
Datadog, Sumologic, New Relic and
others
- or write your own integration
4
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
AWS Chalice
5
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
- Command-line utility for
creating and deploying
apps
- shorthand syntax to
express functions, APIs,
databases
- Local and Remote
development
- Automatic IAM policy
generation
Yet another option how to build easier on Lambda
AWS SAM AWS CDK
- Supports Multiple
Languages
- Command-line utility for
creating and deploying
apps
- Automatic IAM policy
generation
- Focused on Infrastructure
AWS Chalice
- Python Microframework
- Command-line utility for
creating and deploying apps
- Support for Amazon API
Gateway, Amazon S3,
Amazon SNS, Amazon SQS
- Automatic IAM policy
generation
- Focused on application
6
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
from chalice import Chalice
app = Chalice(app_name="helloworld")
@app.route("/")
def index():
return {"hello": "world"}
AWS Chalice Examples
REST API Periodic Job Deployment
7
from chalice import Chalice
app = Chalice(app_name="helloworld")
@app.schedule(Rate(5, unit=Rate.MINUTES))
def periodic_task(event):
return {"hello": "world"}
$ chalice deploy ...
https://endpoint/dev
$ curl https://endpoint/api
{"hello": "world"}
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Event Filtering
8
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Filter your events to save on $$$
- Amazon Kinesis, Amazon DynamoDB,
and Amazon Simple Queue Service
- E.g.: process only the records from a
Kinesis stream that have the status
code ERROR
- Up to 5 different filters
- Based on same set of syntax and
rules as Amazon EventBridge
What it is? / How it can help me?
9
aws lambda create-event-source-mapping 
--function-name my-function 
--event-source-arn arn:aws:sqs:us-east-2:123456789012:my-queue 
--filter-criteria "{"Filters": [{"Pattern": "{ "a" : [ 1, 2 ]}"}]}"
{
"Filters": [
{
"Pattern": "{ "partitionKey": [ "1" ], "data": { "Location": [ "Los Angeles" ] }}"
}
]
}
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Serverless Airline
10
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Design your Airline to learn best practices
- Originally live video Twitch Series
- 14 parts
- Complete architecture that includes
Messaging, Authentication, CI/CD,
API Design and Frontend
- Developed by AWS Experts, Principal
Engineers
- https://github.com/aws-
samples/aws-serverless-airline-
booking
What it is? / How it can help me?
11
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Rightsizing Lambda
12
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Right-size your AWS Lambda Configuration
via Power Tuning
- state machine powered by AWS Step Functions
that helps you optimize your Lambda functions
for cost and/or performance in a data-driven way
- invoke that function with multiple power
configurations (from 128MB to 10GB)
- Resulting in a visualization
- https://github.com/alexcasalboni/aws-lambda-
power-tuning
13
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Invoke Lambda from
your DB
14
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Take Lambdas to your DBs
- enrich data by integrating with external
services
- support for Aurora PG, Redshift and
Athena
- scalar, not inline functions
- use-cases: geolocation, sentiment,
translation, news, weather and others
15
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Cold Start Optimization
16
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Make your functions respond faster by reducing cold-start
- first two steps of setting up the environment and the code are
frequently referred to as a “cold start”
- lambda retains created environment for some time and the
function responds faster, we call this a ”warm start”
- “cold start” occurs in under 1% of invocations
17
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Make your functions respond faster by reducing cold-start
- Function “warmers”, which are some mechanisms to periodically
invoke a function to increase likeliness of “warm start”
- Provisioned Concurrency
- Understanding invocation patterns
- Optimizing static initialization
- Regions and SDKs
18
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
Graviton
19
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Configure your AWS Lambda functions to use Graviton
- up to 19 percent better
performance at 20 percent lower cost
- If using Docker Images, change
FROM line in the Dockerfile to use
an AWS base image for Lambda for the
Arm architecture
20
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark.
SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW
Thank you!
© 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 21

More Related Content

Recently uploaded

Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdfSelfMade bd
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphNeo4j
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio, Inc.
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...Neo4j
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Varun Mithran
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)Roberto Bettazzoni
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 

Recently uploaded (20)

Auto Affiliate AI Earns First Commission in 3 Hours..pdf
Auto Affiliate  AI Earns First Commission in 3 Hours..pdfAuto Affiliate  AI Earns First Commission in 3 Hours..pdf
Auto Affiliate AI Earns First Commission in 3 Hours..pdf
 
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with GraphGraphSummit Milan - Neo4j: The Art of the Possible with Graph
GraphSummit Milan - Neo4j: The Art of the Possible with Graph
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 

Featured

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageSimplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Top 8 nástrojů a vychytávek v AWS Lambda, které neznáte

  • 1. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AWS Lambda 8 things/tools you did not know Miro Masat Solutions Architect Amazon Web Services
  • 2. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Agenda 1. Alternative Monitoring 2. AWS Chalice 3. Event Filtering 4. Rightsizing Lambda 5. Serverless Airline 6. Invoke Lambda from your DB 7. Cold Start Optimization 8. Graviton 2
  • 3. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Alternative Monitoring 3
  • 4. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Send AWS Lambda logs to custom destinations - Lambda Extensions are a new way for monitoring, observability, security, and governance - You can therefore disable logging to CloudWatch Logs - Integrations already written for Datadog, Sumologic, New Relic and others - or write your own integration 4
  • 5. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. AWS Chalice 5
  • 6. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW - Command-line utility for creating and deploying apps - shorthand syntax to express functions, APIs, databases - Local and Remote development - Automatic IAM policy generation Yet another option how to build easier on Lambda AWS SAM AWS CDK - Supports Multiple Languages - Command-line utility for creating and deploying apps - Automatic IAM policy generation - Focused on Infrastructure AWS Chalice - Python Microframework - Command-line utility for creating and deploying apps - Support for Amazon API Gateway, Amazon S3, Amazon SNS, Amazon SQS - Automatic IAM policy generation - Focused on application 6
  • 7. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW from chalice import Chalice app = Chalice(app_name="helloworld") @app.route("/") def index(): return {"hello": "world"} AWS Chalice Examples REST API Periodic Job Deployment 7 from chalice import Chalice app = Chalice(app_name="helloworld") @app.schedule(Rate(5, unit=Rate.MINUTES)) def periodic_task(event): return {"hello": "world"} $ chalice deploy ... https://endpoint/dev $ curl https://endpoint/api {"hello": "world"}
  • 8. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Event Filtering 8
  • 9. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Filter your events to save on $$$ - Amazon Kinesis, Amazon DynamoDB, and Amazon Simple Queue Service - E.g.: process only the records from a Kinesis stream that have the status code ERROR - Up to 5 different filters - Based on same set of syntax and rules as Amazon EventBridge What it is? / How it can help me? 9 aws lambda create-event-source-mapping --function-name my-function --event-source-arn arn:aws:sqs:us-east-2:123456789012:my-queue --filter-criteria "{"Filters": [{"Pattern": "{ "a" : [ 1, 2 ]}"}]}" { "Filters": [ { "Pattern": "{ "partitionKey": [ "1" ], "data": { "Location": [ "Los Angeles" ] }}" } ] }
  • 10. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Serverless Airline 10
  • 11. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Design your Airline to learn best practices - Originally live video Twitch Series - 14 parts - Complete architecture that includes Messaging, Authentication, CI/CD, API Design and Frontend - Developed by AWS Experts, Principal Engineers - https://github.com/aws- samples/aws-serverless-airline- booking What it is? / How it can help me? 11
  • 12. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Rightsizing Lambda 12
  • 13. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Right-size your AWS Lambda Configuration via Power Tuning - state machine powered by AWS Step Functions that helps you optimize your Lambda functions for cost and/or performance in a data-driven way - invoke that function with multiple power configurations (from 128MB to 10GB) - Resulting in a visualization - https://github.com/alexcasalboni/aws-lambda- power-tuning 13
  • 14. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Invoke Lambda from your DB 14
  • 15. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Take Lambdas to your DBs - enrich data by integrating with external services - support for Aurora PG, Redshift and Athena - scalar, not inline functions - use-cases: geolocation, sentiment, translation, news, weather and others 15
  • 16. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Cold Start Optimization 16
  • 17. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Make your functions respond faster by reducing cold-start - first two steps of setting up the environment and the code are frequently referred to as a “cold start” - lambda retains created environment for some time and the function responds faster, we call this a ”warm start” - “cold start” occurs in under 1% of invocations 17
  • 18. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Make your functions respond faster by reducing cold-start - Function “warmers”, which are some mechanisms to periodically invoke a function to increase likeliness of “warm start” - Provisioned Concurrency - Understanding invocation patterns - Optimizing static initialization - Regions and SDKs 18
  • 19. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. Graviton 19
  • 20. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Configure your AWS Lambda functions to use Graviton - up to 19 percent better performance at 20 percent lower cost - If using Docker Images, change FROM line in the Dockerfile to use an AWS base image for Lambda for the Arm architecture 20
  • 21. © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. SERVERLESS MEETUP BRNO | MARCH 2022 | 8 THINGS/TOOLS YOU DID NOT KNOW Thank you! © 2022, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Confidential and Trademark. 21