ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
C H R I S M I T C H E L L
P R O G R A M M E R A N A L Y S T
E & J G A L L O W I N E R Y
@ M O T O B R E A T H
G I T H U B . C O M / M O T O B R E A T H
B L O G . C H R I S M I T C H E L L O N L I N E . C O M
C H R I S @ C H R I S M I T C H E L L O N L I N E
Lambda Lambda Lambda!
Lets Go Over
? What is Lambda & the Lambda dashboard?
? Versioning with Lambda qualifiers
? Lambda Layers
? Local Development
PRE-REQ¡¯S
? AWS Account
? CLI == Dashboard
? Demo using dashboard, all commands available with CLI
? CLI demo at https://blog.chrismitchellonline.com
? Local development will require AWS CLI and SAM
installed
What Is Lambda
? Run code in the cloud
? Operating system ¨C Amazon Linux
? AMI ¨C amzn-ami-hvm-2017.03.1.20170812-x86_64-
gp2
? Linux kernel ¨C 4.14.77-70.59.amzn1.x86_64
? Docker container the whole thing
? AWS SDK for JavaScript ¨C 2.290.0
? SDK for Python (Boto 3) ¨C 3-1.7.74 botocore-1.10.74
New Lambda Function
? Login via https://aws.amazon.com/console/
? Find Lambda Dashboard
? Create new function
? Use defaults, create new role for function
? Roles
? Create new role
? Existing roll
Lambda Dashboard
? Designer Section
? Integrate Lambda, Layers, Logs, architect your function
? Triggers (Event sources)
? Code
? Write code¡­
? Environment Variables
? Incorporate environment variables in
? Memory
? Tagging
? More..
Testing Functions
? Test events should match the event that your
function would run from
? Example: API gateway sends video game data
? Configure test events and test function
? Create test events to run your function in the dashboard
? Essentially a ¡°run your code¡± trigger
Demo
? Enough talk, lets setup a function and see a
dashboard
? Setup a test event
? Run code!
Versioning
? Multiple versions of Lambda code
? Separate DEV/ACC/Prod environment
? Lambda Qualifiers
? Manage what aliases run what code
? Versioning locks in function settings, unable to
change code
? Must change things like memory and environment at
root function level
Creating All Those Things
? Create a new version of our Lambda function code,
will be version 1
? Create 3 aliases, dev,acc,prod, point each of those
aliases to version 1
? Use $LATEST for active development
? Deploy new version of the code, version 2
? Point aliases accordingly.
? Check Qualifiers menu to see where aliases point
Demo Again
? Setup versions for our function
Layers
? Pull custom code into your Lambda function
? Most useful with NPM libraries
? Custom NPM libraries to boot
? Salesforce NPM package
? Reusable across all Lambda functions
Setup Layer
? Setup code locally using NPM install
? Directory structure must match:
? -name_of_layer
-node_js
-npm_modules
-package.json
-index.js
? Zip up directory so your zip file contains node_js
Lambda Layers Dashboard
? Create new layer
? Name, description, license, runtime
? Upload zip
? Set Runtime
? Attach layer to function
? Use the code!
Demo Layers
? See it in action
Local Lambda
? Develop locally, upload code, run in cloud
? Good for large (or all!) functions
? Upload zip directly to Lambda
? Function code section, change dropdown from Edit code inline
? ~10mb upload limit
? Upload zip to S3, load from there
? Better for larger functions
? With Lambda layers we don¡¯t have to include NPM!
? NPM install locally, exclude from zip
Local Lambda with SAM
? AWS Serverless Application Model
? Uses Docker container to simulate running Lambda locally
? Local debugging and testing
? VS Code integration for debugging
? Breakpoints, stepping through code
? Use test events to trigger function similar to Lambda
dashboard
Local Lambda Components
? Install Docker and AWS CLI/SAM
? Create template.yml to define your functions
? One template.yml for many functions
? Define resources and outputs, 1-1 mapping to generate
function calls
Lambda lambda-lambda
? Create debugging config in VS Code
? Add debug configuration -> dropdown -> add new
configuration
? Config type is nodeJS
? See repo for launch.json
? One configuration item per function, matches 1-1 with
template.yml entries
Lambda lambda-lambda
Local Lambda Components Continued
? Test event
? JSON file that matches test events from either dashboard or
other AWS triggers
? One test event per function
? Layers
? Layers available either locally (folder)
? ARN from AWS account
? Configure in template.yml
? Bring it together: SAM->template.yml -> VS Code
debug config -> test event
Running Lambda Locally
? From the command line use SAM to trigger your
function
? Can run with or without the debugging
? Use debugging flag --debug-port 5858 to connect to debugger
? Without debug flag will execute your function similar to
running in the dashboard
? sam local invoke LocalLambda -e test-
events/videogames.json --debug-port 5858
Debugging
? If running with --debug-flag 5858 connect VS Code
debugger
? Debug menu -> select debug configuration -> Play
? One to one map with template.yml
? Breakpoints will stop code
? Step in/over code
? Evaluate Watch, Call Stack, and Debug console
Debug All the Things Demo
? Run Lambda code locally with Debug
In Closing
? More Lambda features
? Applications
? Monitoring
? Code Deploy
? Create triggers to use Lambda functions in other
AWS services
Thanks!
? Drop me a line:
? chris@chrismitchellonline.com
? Twitter: @motobreath
? Github: https://www.github.com/motobreath
? ºÝºÝߣs will be here!
? Blog: blog.chrismitchellonline.com

More Related Content

What's hot (14)

Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
Anton Babenko
?
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at XamarinC# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
Xamarin
?
AWS Primer and Quickstart
AWS Primer and QuickstartAWS Primer and Quickstart
AWS Primer and Quickstart
Manish Pandit
?
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
Xamarin
?
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
roblund
?
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
Massimo Ferre'
?
The future of paas is serverless
The future of paas is serverlessThe future of paas is serverless
The future of paas is serverless
Yan Cui
?
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)
Yan Cui
?
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Pawe? Piku?a
?
Conejo Architecture
Conejo ArchitectureConejo Architecture
Conejo Architecture
paulosuzart
?
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Chris Shenton
?
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devops
mitesh_sharma
?
Serverless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays HamburgServerless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays Hamburg
Avishai Shafir
?
20180321 ʹÓÃaws ½¨Á¢ notification system
20180321 ʹÓÃaws ½¨Á¢ notification system20180321 ʹÓÃaws ½¨Á¢ notification system
20180321 ʹÓÃaws ½¨Á¢ notification system
Freddy Fan
?
Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020Manage any AWS resources with Terraform 0.12 - April 2020
Manage any AWS resources with Terraform 0.12 - April 2020
Anton Babenko
?
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at XamarinC# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
C# Async on iOS and Android - Craig Dunn, Developer Evangelist at Xamarin
Xamarin
?
AWS Primer and Quickstart
AWS Primer and QuickstartAWS Primer and Quickstart
AWS Primer and Quickstart
Manish Pandit
?
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
Xamarin
?
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
roblund
?
End-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS servicesEnd-to-end CI/CD deployments of containerized applications using AWS services
End-to-end CI/CD deployments of containerized applications using AWS services
Massimo Ferre'
?
The future of paas is serverless
The future of paas is serverlessThe future of paas is serverless
The future of paas is serverless
Yan Cui
?
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)
Yan Cui
?
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)Serverless cat detector   workshop - cloudyna 2017 (16.12.2017)
Serverless cat detector workshop - cloudyna 2017 (16.12.2017)
Pawe? Piku?a
?
Conejo Architecture
Conejo ArchitectureConejo Architecture
Conejo Architecture
paulosuzart
?
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Chris Shenton
?
Localize content Devops
Localize content DevopsLocalize content Devops
Localize content Devops
mitesh_sharma
?
Serverless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays HamburgServerless testing @ serverlessdays Hamburg
Serverless testing @ serverlessdays Hamburg
Avishai Shafir
?
20180321 ʹÓÃaws ½¨Á¢ notification system
20180321 ʹÓÃaws ½¨Á¢ notification system20180321 ʹÓÃaws ½¨Á¢ notification system
20180321 ʹÓÃaws ½¨Á¢ notification system
Freddy Fan
?

Similar to Lambda lambda-lambda (16)

Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
AWS Chicago
?
Building a chatbot ¨C step by step
Building a chatbot ¨C step by stepBuilding a chatbot ¨C step by step
Building a chatbot ¨C step by step
CodeOps Technologies LLP
?
AWS CodeDeploy
AWS CodeDeploy AWS CodeDeploy
AWS CodeDeploy
Ratan Das
?
Introduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptxIntroduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptx
Mohammed Shefeeq
?
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
?
What¡¯s new in serverless - re:Invent 2020
What¡¯s new in serverless - re:Invent 2020What¡¯s new in serverless - re:Invent 2020
What¡¯s new in serverless - re:Invent 2020
AWS Chicago
?
Aws meetup building_lambda
Aws meetup building_lambdaAws meetup building_lambda
Aws meetup building_lambda
Adam Book
?
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
Yan Cui
?
Writing Rust Command Line Applications
Writing Rust Command Line ApplicationsWriting Rust Command Line Applications
Writing Rust Command Line Applications
All Things Open
?
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
Yan Cui
?
Alexa101 course slides
Alexa101 course slidesAlexa101 course slides
Alexa101 course slides
Dan Bloy
?
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
Yan Cui
?
10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda
Jim Lynch
?
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
Ryan Cuprak
?
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
?
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
Ortus Solutions, Corp
?
Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
Girish Bhatia: 2024 CommunityDay AWS Lambda develop locally with SAM, Docker ...
AWS Chicago
?
AWS CodeDeploy
AWS CodeDeploy AWS CodeDeploy
AWS CodeDeploy
Ratan Das
?
Introduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptxIntroduction to AWS lambda & Serverless Application1.pptx
Introduction to AWS lambda & Serverless Application1.pptx
Mohammed Shefeeq
?
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
?
What¡¯s new in serverless - re:Invent 2020
What¡¯s new in serverless - re:Invent 2020What¡¯s new in serverless - re:Invent 2020
What¡¯s new in serverless - re:Invent 2020
AWS Chicago
?
Aws meetup building_lambda
Aws meetup building_lambdaAws meetup building_lambda
Aws meetup building_lambda
Adam Book
?
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
Yan Cui
?
Writing Rust Command Line Applications
Writing Rust Command Line ApplicationsWriting Rust Command Line Applications
Writing Rust Command Line Applications
All Things Open
?
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
Yan Cui
?
Alexa101 course slides
Alexa101 course slidesAlexa101 course slides
Alexa101 course slides
Dan Bloy
?
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
Yan Cui
?
10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda10 Tips For Serverless Backends With NodeJS and AWS Lambda
10 Tips For Serverless Backends With NodeJS and AWS Lambda
Jim Lynch
?
Containerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS LambdaContainerless in the Cloud with AWS Lambda
Containerless in the Cloud with AWS Lambda
Ryan Cuprak
?
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
AWS Chicago
?

Recently uploaded (20)

CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025
Yevgen Sysoyev
?
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
David Brossard
?
Codequiry: A Code Similarity Checker Every Developer Should Know
Codequiry: A Code Similarity Checker Every Developer Should KnowCodequiry: A Code Similarity Checker Every Developer Should Know
Codequiry: A Code Similarity Checker Every Developer Should Know
Code Quiry
?
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Buwaneka De Silva
?
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Tobias Schneck
?
April Patch Tuesday
April Patch TuesdayApril Patch Tuesday
April Patch Tuesday
Ivanti
?
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
Ivan Tang
?
How to Achieve High-Accuracy Results When Using LLMs
How to Achieve High-Accuracy Results When Using LLMsHow to Achieve High-Accuracy Results When Using LLMs
How to Achieve High-Accuracy Results When Using LLMs
Aggregage
?
Threat Modeling a Batch Job System - AWS Security Community Day
Threat Modeling a Batch Job System - AWS Security Community DayThreat Modeling a Batch Job System - AWS Security Community Day
Threat Modeling a Batch Job System - AWS Security Community Day
Teri Radichel
?
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
?
Future?Proofing the Nordic Economy with GenAI
Future?Proofing the Nordic Economy with GenAIFuture?Proofing the Nordic Economy with GenAI
Future?Proofing the Nordic Economy with GenAI
Pete Nieminen
?
Introduction to Mobile App Development.
Introduction to  Mobile App Development.Introduction to  Mobile App Development.
Introduction to Mobile App Development.
AkashDwivedi43
?
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G¨®mez Abajo
?
Presentation Session 4 -Agent Builder.pdf
Presentation Session 4 -Agent Builder.pdfPresentation Session 4 -Agent Builder.pdf
Presentation Session 4 -Agent Builder.pdf
Mukesh Kala
?
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
DanBrown980551
?
Human Centered Design By Gnanasambandham
Human Centered Design By GnanasambandhamHuman Centered Design By Gnanasambandham
Human Centered Design By Gnanasambandham
Gnanasambandham Anbazhagan CSP, CSM, CSPO
?
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
DOCOMO Innovations, Inc.
?
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD TechnicianRicardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno
?
San Francisco Atlassian ACE - Mar 27 2025.pdf
San Francisco Atlassian ACE - Mar 27 2025.pdfSan Francisco Atlassian ACE - Mar 27 2025.pdf
San Francisco Atlassian ACE - Mar 27 2025.pdf
Matt Doar
?
Introduction to Generative AI refers to a subset of artificial intelligence
Introduction to Generative AI refers to a subset of artificial intelligenceIntroduction to Generative AI refers to a subset of artificial intelligence
Introduction to Generative AI refers to a subset of artificial intelligence
Kongu Engineering College, Perundurai, Erode
?
CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025
Yevgen Sysoyev
?
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
AuthZEN The OpenID Connect of Authorization - Gartner IAM EMEA 2025
David Brossard
?
Codequiry: A Code Similarity Checker Every Developer Should Know
Codequiry: A Code Similarity Checker Every Developer Should KnowCodequiry: A Code Similarity Checker Every Developer Should Know
Codequiry: A Code Similarity Checker Every Developer Should Know
Code Quiry
?
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Atlassian Community - Human-Centered AI in Product Management Unleashing Inno...
Buwaneka De Silva
?
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Evaluating Global Load Balancing Options for Kubernetes in Practice (Kubermat...
Tobias Schneck
?
April Patch Tuesday
April Patch TuesdayApril Patch Tuesday
April Patch Tuesday
Ivanti
?
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
2025-04-05 - Block71 Event - The Landscape of GenAI and Ecosystem.pdf
Ivan Tang
?
How to Achieve High-Accuracy Results When Using LLMs
How to Achieve High-Accuracy Results When Using LLMsHow to Achieve High-Accuracy Results When Using LLMs
How to Achieve High-Accuracy Results When Using LLMs
Aggregage
?
Threat Modeling a Batch Job System - AWS Security Community Day
Threat Modeling a Batch Job System - AWS Security Community DayThreat Modeling a Batch Job System - AWS Security Community Day
Threat Modeling a Batch Job System - AWS Security Community Day
Teri Radichel
?
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
?
Future?Proofing the Nordic Economy with GenAI
Future?Proofing the Nordic Economy with GenAIFuture?Proofing the Nordic Economy with GenAI
Future?Proofing the Nordic Economy with GenAI
Pete Nieminen
?
Introduction to Mobile App Development.
Introduction to  Mobile App Development.Introduction to  Mobile App Development.
Introduction to Mobile App Development.
AkashDwivedi43
?
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G¨®mez Abajo
?
Presentation Session 4 -Agent Builder.pdf
Presentation Session 4 -Agent Builder.pdfPresentation Session 4 -Agent Builder.pdf
Presentation Session 4 -Agent Builder.pdf
Mukesh Kala
?
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
CitrineOS: Bridging the Past and Future of EV Charging with OCPP 1.6 & 2.x Su...
DanBrown980551
?
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...Automating Behavior-Driven Development: Boosting Productivity with Template-D...
Automating Behavior-Driven Development: Boosting Productivity with Template-D...
DOCOMO Innovations, Inc.
?
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD TechnicianRicardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno
?
San Francisco Atlassian ACE - Mar 27 2025.pdf
San Francisco Atlassian ACE - Mar 27 2025.pdfSan Francisco Atlassian ACE - Mar 27 2025.pdf
San Francisco Atlassian ACE - Mar 27 2025.pdf
Matt Doar
?

Lambda lambda-lambda

  • 1. C H R I S M I T C H E L L P R O G R A M M E R A N A L Y S T E & J G A L L O W I N E R Y @ M O T O B R E A T H G I T H U B . C O M / M O T O B R E A T H B L O G . C H R I S M I T C H E L L O N L I N E . C O M C H R I S @ C H R I S M I T C H E L L O N L I N E Lambda Lambda Lambda!
  • 2. Lets Go Over ? What is Lambda & the Lambda dashboard? ? Versioning with Lambda qualifiers ? Lambda Layers ? Local Development
  • 3. PRE-REQ¡¯S ? AWS Account ? CLI == Dashboard ? Demo using dashboard, all commands available with CLI ? CLI demo at https://blog.chrismitchellonline.com ? Local development will require AWS CLI and SAM installed
  • 4. What Is Lambda ? Run code in the cloud ? Operating system ¨C Amazon Linux ? AMI ¨C amzn-ami-hvm-2017.03.1.20170812-x86_64- gp2 ? Linux kernel ¨C 4.14.77-70.59.amzn1.x86_64 ? Docker container the whole thing ? AWS SDK for JavaScript ¨C 2.290.0 ? SDK for Python (Boto 3) ¨C 3-1.7.74 botocore-1.10.74
  • 5. New Lambda Function ? Login via https://aws.amazon.com/console/ ? Find Lambda Dashboard ? Create new function ? Use defaults, create new role for function ? Roles ? Create new role ? Existing roll
  • 6. Lambda Dashboard ? Designer Section ? Integrate Lambda, Layers, Logs, architect your function ? Triggers (Event sources) ? Code ? Write code¡­ ? Environment Variables ? Incorporate environment variables in ? Memory ? Tagging ? More..
  • 7. Testing Functions ? Test events should match the event that your function would run from ? Example: API gateway sends video game data ? Configure test events and test function ? Create test events to run your function in the dashboard ? Essentially a ¡°run your code¡± trigger
  • 8. Demo ? Enough talk, lets setup a function and see a dashboard ? Setup a test event ? Run code!
  • 9. Versioning ? Multiple versions of Lambda code ? Separate DEV/ACC/Prod environment ? Lambda Qualifiers ? Manage what aliases run what code ? Versioning locks in function settings, unable to change code ? Must change things like memory and environment at root function level
  • 10. Creating All Those Things ? Create a new version of our Lambda function code, will be version 1 ? Create 3 aliases, dev,acc,prod, point each of those aliases to version 1 ? Use $LATEST for active development ? Deploy new version of the code, version 2 ? Point aliases accordingly. ? Check Qualifiers menu to see where aliases point
  • 11. Demo Again ? Setup versions for our function
  • 12. Layers ? Pull custom code into your Lambda function ? Most useful with NPM libraries ? Custom NPM libraries to boot ? Salesforce NPM package ? Reusable across all Lambda functions
  • 13. Setup Layer ? Setup code locally using NPM install ? Directory structure must match: ? -name_of_layer -node_js -npm_modules -package.json -index.js ? Zip up directory so your zip file contains node_js
  • 14. Lambda Layers Dashboard ? Create new layer ? Name, description, license, runtime ? Upload zip ? Set Runtime ? Attach layer to function ? Use the code!
  • 15. Demo Layers ? See it in action
  • 16. Local Lambda ? Develop locally, upload code, run in cloud ? Good for large (or all!) functions ? Upload zip directly to Lambda ? Function code section, change dropdown from Edit code inline ? ~10mb upload limit ? Upload zip to S3, load from there ? Better for larger functions ? With Lambda layers we don¡¯t have to include NPM! ? NPM install locally, exclude from zip
  • 17. Local Lambda with SAM ? AWS Serverless Application Model ? Uses Docker container to simulate running Lambda locally ? Local debugging and testing ? VS Code integration for debugging ? Breakpoints, stepping through code ? Use test events to trigger function similar to Lambda dashboard
  • 18. Local Lambda Components ? Install Docker and AWS CLI/SAM ? Create template.yml to define your functions ? One template.yml for many functions ? Define resources and outputs, 1-1 mapping to generate function calls
  • 20. ? Create debugging config in VS Code ? Add debug configuration -> dropdown -> add new configuration ? Config type is nodeJS ? See repo for launch.json ? One configuration item per function, matches 1-1 with template.yml entries
  • 22. Local Lambda Components Continued ? Test event ? JSON file that matches test events from either dashboard or other AWS triggers ? One test event per function ? Layers ? Layers available either locally (folder) ? ARN from AWS account ? Configure in template.yml ? Bring it together: SAM->template.yml -> VS Code debug config -> test event
  • 23. Running Lambda Locally ? From the command line use SAM to trigger your function ? Can run with or without the debugging ? Use debugging flag --debug-port 5858 to connect to debugger ? Without debug flag will execute your function similar to running in the dashboard ? sam local invoke LocalLambda -e test- events/videogames.json --debug-port 5858
  • 24. Debugging ? If running with --debug-flag 5858 connect VS Code debugger ? Debug menu -> select debug configuration -> Play ? One to one map with template.yml ? Breakpoints will stop code ? Step in/over code ? Evaluate Watch, Call Stack, and Debug console
  • 25. Debug All the Things Demo ? Run Lambda code locally with Debug
  • 26. In Closing ? More Lambda features ? Applications ? Monitoring ? Code Deploy ? Create triggers to use Lambda functions in other AWS services
  • 27. Thanks! ? Drop me a line: ? chris@chrismitchellonline.com ? Twitter: @motobreath ? Github: https://www.github.com/motobreath ? ºÝºÝߣs will be here! ? Blog: blog.chrismitchellonline.com