SlideShare une entreprise Scribd logo
1  sur  20
Local Lambda Development and Debugging
Matt Billock
matt@backand.com
Agenda:
● AWS Lambda Overview
● Debugging AWS Lambda
● Building a local test harness
● Deployment with Backand CLI
● Quick overview of Backand
AWS Lambda
● Created in 2014, launched at
re:Invent
● Kicked off "serverless" (caveat)
● Function-as-a-Service
○Deploy code, not applications
Creating A Lambda Function
● Supports Node.JS, Python, C#, and
Java
○ Can call to server functionality (Linux)
● Code deployment options
○ Uploading as a ZIP file
○ Uploading from S3
○ Editing in in-browser editor
Creating A Lambda Function
Demo
Calling AWS Lambda Functions
● Event-based triggers
○ Also On-Demand
● Event Sources
○ AWS Services (S3, DynamoDB, others)
○ API Gateway
○ AWS SDK
Debugging Lambda Functions
● Cloudwatch Integration
○ Provides call record
● console.log()
○ Sends message to Cloudwatch
● … and that's it
Lambda Execution Environment
● Details kept proprietary by Amazon
● Based on Amazon Machine Instance
● Dynamically provisioned (hot vs cold)
● Temporary storage (/tmp, 500 MB)
○ NOT guaranteed to persist
Debugging Lambda Locally
● Need to mimic input format
● Need to mimic output format
○ Transformations in API Gateway
● Need a test harness
Creating a Test Harness
● Function Prototype
● Including Handler
● Mimicking Lambda Invocation
○ Parameters in event object
○ Handlers in the context object
Creating a Test Harness
● Calling a Lambda function, continued:
● Provide handlers in context argument
Test Harness Notes
● Callback mechanism provided by Lambda
○ Only supported by Node.JS actions
● Using callbacks in context parameter
○ Not officially supported
● Not a perfect substitute
○ Calls the function, but not from the same
environment
Improving Iteration Speed
● Per-line output
● Immediate feedback
● Breakpoints and other local
debugging tools
● Unit and Integration tests
Deploying Your Code
● Zip-file from S3, or manual upload
○ NOTE: zip only the source code,
not the parent folder!
● Testing upload
● Publishing
● Complex, non-intuitive
Using Backand's CLI Tool
● Backand On-Demand Node.JS
Lambda actions
● Backand CLI abstracts away
deployment
● npm install -g backand
● Requires registering with Backand
Deploying Lambda Code
● Initializing an action- backand action init
○ Arguments available in docs.backand.com
● Copy your Node.JS code into created
directory
● Deploy - backand action deploy
○ Arguments available in docs.backand.com
Calling Your Lambda
● Authentication
○ can be anonymous
○ api.backand.com/1/token
○ See docs
● cURL
curl -H "<auth header>" "https://api.backand.com/1/objects/action/<object>?name=<name>"
● JavaScript (with Backand SDK)
backand.object.action.get(...)
What is Backand?
● Serverless app platform
● Manages your app's database
● Manages your app's security and
authentication
● Provides custom server-side code execution
● Provides hosting options
● Provides logging, analytics, and more
Backand Features
● Automated REST API
● Bring your own Database
● Custom JavaScript Actions
● Server-Side Code Execution
● Batch and Bulk Processing
● Scheduled Tasks
● Automated messages
● Real-time Communications
● User and Role-based
Security
● Social Media Authentication
● GUI Schema Editor
● Custom Queries
● REST API Playground
● Sample Code Generation
● Hosting
● Detailed Analytics
● Logging
● Multi-Platform SDK
● Single Sign On Support
THANK YOU
https://github.com/backand
https://www.backand.com
matt@backand.com

Contenu connexe

Tendances

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/burbsAWS Chicago
 
Aws Developer Associate Overview
Aws Developer Associate OverviewAws Developer Associate Overview
Aws Developer Associate OverviewAbhi Jain
 
The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to KubernetesDeniz Zoeteman
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13Amrita Prasad
 
Experiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlExperiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlOkis Chuang
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first stepsThe Software House
 
Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019Gerard Klijs
 
Integracia security do ci cd pipelines
Integracia security do ci cd pipelinesIntegracia security do ci cd pipelines
Integracia security do ci cd pipelinesJuraj Hantak
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskipGerard Klijs
 
Angular2 - A story from the trenches
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenchesJohannes Rudolph
 
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 2020Andrea Scuderi
 
Multitenant SaaS Apps In Rails By Iqbal Hasnan
Multitenant SaaS Apps In Rails By Iqbal HasnanMultitenant SaaS Apps In Rails By Iqbal Hasnan
Multitenant SaaS Apps In Rails By Iqbal Hasnaniqbal hasnan
 
Dynamic input tables lwc vs aura vs. visualforce
Dynamic input tables  lwc vs aura vs. visualforceDynamic input tables  lwc vs aura vs. visualforce
Dynamic input tables lwc vs aura vs. visualforceMike Tetlow
 
Introduction to Jhipster
Introduction to JhipsterIntroduction to Jhipster
Introduction to JhipsterKnoldus Inc.
 
Lightning Web Components by Abdul Gafoor
Lightning Web Components by Abdul GafoorLightning Web Components by Abdul Gafoor
Lightning Web Components by Abdul GafoorJayesh Tejwani
 
From rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyFrom rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyArno Schulz
 

Tendances (20)

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 Developer Associate Overview
Aws Developer Associate OverviewAws Developer Associate Overview
Aws Developer Associate Overview
 
Event machine
Event machineEvent machine
Event machine
 
The Road to Kubernetes
The Road to KubernetesThe Road to Kubernetes
The Road to Kubernetes
 
9th docker meetup 2016.07.13
9th docker meetup 2016.07.139th docker meetup 2016.07.13
9th docker meetup 2016.07.13
 
Experiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and PostgresqlExperiences sharing about Lambda, Kinesis, and Postgresql
Experiences sharing about Lambda, Kinesis, and Postgresql
 
Serverless architecture: introduction & first steps
Serverless architecture: introduction & first stepsServerless architecture: introduction & first steps
Serverless architecture: introduction & first steps
 
Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019Rust with-kafka-07-02-2019
Rust with-kafka-07-02-2019
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
 
Integracia security do ci cd pipelines
Integracia security do ci cd pipelinesIntegracia security do ci cd pipelines
Integracia security do ci cd pipelines
 
Rust kafka-5-2019-unskip
Rust kafka-5-2019-unskipRust kafka-5-2019-unskip
Rust kafka-5-2019-unskip
 
Dray
DrayDray
Dray
 
Angular2 - A story from the trenches
Angular2 - A story from the trenchesAngular2 - A story from the trenches
Angular2 - A story from the trenches
 
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
 
Multitenant SaaS Apps In Rails By Iqbal Hasnan
Multitenant SaaS Apps In Rails By Iqbal HasnanMultitenant SaaS Apps In Rails By Iqbal Hasnan
Multitenant SaaS Apps In Rails By Iqbal Hasnan
 
Dynamic input tables lwc vs aura vs. visualforce
Dynamic input tables  lwc vs aura vs. visualforceDynamic input tables  lwc vs aura vs. visualforce
Dynamic input tables lwc vs aura vs. visualforce
 
Introduction to Jhipster
Introduction to JhipsterIntroduction to Jhipster
Introduction to Jhipster
 
Lightning Web Components by Abdul Gafoor
Lightning Web Components by Abdul GafoorLightning Web Components by Abdul Gafoor
Lightning Web Components by Abdul Gafoor
 
From rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyFrom rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journey
 
Behavior-Driven Development with JGiven
Behavior-Driven Development with JGivenBehavior-Driven Development with JGiven
Behavior-Driven Development with JGiven
 

Similaire à Local Lambda Debugging

AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...Luciano Mammino
 
State of serverless
State of serverlessState of serverless
State of serverlessAnurag Saran
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applicationsCesar Cardenas Desales
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsCesar Cardenas Desales
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker kloia
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless worldMatthias Luebken
 
AWS Lambda and serverless Java | DevNation Live
AWS Lambda and serverless Java | DevNation LiveAWS Lambda and serverless Java | DevNation Live
AWS Lambda and serverless Java | DevNation LiveRed Hat Developers
 
Going Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenGoing Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenJay Gandhi
 
The benefits of running Spark on your own Docker
The benefits of running Spark on your own DockerThe benefits of running Spark on your own Docker
The benefits of running Spark on your own DockerItai Yaffe
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverlessDhaval Nagar
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Mike Shutlar
 
AWS Developer Ecosystem.pdf
AWS Developer Ecosystem.pdfAWS Developer Ecosystem.pdf
AWS Developer Ecosystem.pdfDhaval Nagar
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelGarindra Prahandono
 
Orchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWSOrchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWSDerrick Qin
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeansRyan Cuprak
 
Full Stack Meat Project with Arduino Node AWS Mobile
Full Stack Meat Project with Arduino Node AWS MobileFull Stack Meat Project with Arduino Node AWS Mobile
Full Stack Meat Project with Arduino Node AWS MobileKevin Kazmierczak
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using dockerVinod Doshi
 
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...CzechDreamin
 

Similaire à Local Lambda Debugging (20)

AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
 
State of serverless
State of serverlessState of serverless
State of serverless
 
Writing and deploying serverless python applications
Writing and deploying serverless python applicationsWriting and deploying serverless python applications
Writing and deploying serverless python applications
 
PyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applicationsPyConIE 2017 Writing and deploying serverless python applications
PyConIE 2017 Writing and deploying serverless python applications
 
AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker AWS ElasticBeanstalk and Docker
AWS ElasticBeanstalk and Docker
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
AWS Lambda and serverless Java | DevNation Live
AWS Lambda and serverless Java | DevNation LiveAWS Lambda and serverless Java | DevNation Live
AWS Lambda and serverless Java | DevNation Live
 
Going Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGardenGoing Serverless with AWS Lambda at ReportGarden
Going Serverless with AWS Lambda at ReportGarden
 
The benefits of running Spark on your own Docker
The benefits of running Spark on your own DockerThe benefits of running Spark on your own Docker
The benefits of running Spark on your own Docker
 
Write less (code) and build more with serverless
Write less (code) and build more with serverlessWrite less (code) and build more with serverless
Write less (code) and build more with serverless
 
Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017Lambda and serverless - DevOps North East Jan 2017
Lambda and serverless - DevOps North East Jan 2017
 
Running R on AWS Lambda by Ana-Maria Niculescu
Running R on AWS Lambda by Ana-Maria NiculescuRunning R on AWS Lambda by Ana-Maria Niculescu
Running R on AWS Lambda by Ana-Maria Niculescu
 
AWS Developer Ecosystem.pdf
AWS Developer Ecosystem.pdfAWS Developer Ecosystem.pdf
AWS Developer Ecosystem.pdf
 
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development ModelLaskar: High-Velocity GraphQL & Lambda-based Software Development Model
Laskar: High-Velocity GraphQL & Lambda-based Software Development Model
 
Orchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWSOrchestrating workflows Apache Airflow on GCP & AWS
Orchestrating workflows Apache Airflow on GCP & AWS
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
Full Stack Meat Project with Arduino Node AWS Mobile
Full Stack Meat Project with Arduino Node AWS MobileFull Stack Meat Project with Arduino Node AWS Mobile
Full Stack Meat Project with Arduino Node AWS Mobile
 
Containerization using docker
Containerization using dockerContainerization using docker
Containerization using docker
 
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
Build your apps everywhere with Lightning Web Components Open Source, Fabien ...
 
AWS Lambda in C#
AWS Lambda in C#AWS Lambda in C#
AWS Lambda in C#
 

Dernier

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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.pdfsudhanshuwaghmare1
 

Dernier (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 

Local Lambda Debugging

  • 1. Local Lambda Development and Debugging Matt Billock matt@backand.com
  • 2. Agenda: ● AWS Lambda Overview ● Debugging AWS Lambda ● Building a local test harness ● Deployment with Backand CLI ● Quick overview of Backand
  • 3. AWS Lambda ● Created in 2014, launched at re:Invent ● Kicked off "serverless" (caveat) ● Function-as-a-Service ○Deploy code, not applications
  • 4. Creating A Lambda Function ● Supports Node.JS, Python, C#, and Java ○ Can call to server functionality (Linux) ● Code deployment options ○ Uploading as a ZIP file ○ Uploading from S3 ○ Editing in in-browser editor
  • 5. Creating A Lambda Function Demo
  • 6. Calling AWS Lambda Functions ● Event-based triggers ○ Also On-Demand ● Event Sources ○ AWS Services (S3, DynamoDB, others) ○ API Gateway ○ AWS SDK
  • 7. Debugging Lambda Functions ● Cloudwatch Integration ○ Provides call record ● console.log() ○ Sends message to Cloudwatch ● … and that's it
  • 8. Lambda Execution Environment ● Details kept proprietary by Amazon ● Based on Amazon Machine Instance ● Dynamically provisioned (hot vs cold) ● Temporary storage (/tmp, 500 MB) ○ NOT guaranteed to persist
  • 9. Debugging Lambda Locally ● Need to mimic input format ● Need to mimic output format ○ Transformations in API Gateway ● Need a test harness
  • 10. Creating a Test Harness ● Function Prototype ● Including Handler ● Mimicking Lambda Invocation ○ Parameters in event object ○ Handlers in the context object
  • 11. Creating a Test Harness ● Calling a Lambda function, continued: ● Provide handlers in context argument
  • 12. Test Harness Notes ● Callback mechanism provided by Lambda ○ Only supported by Node.JS actions ● Using callbacks in context parameter ○ Not officially supported ● Not a perfect substitute ○ Calls the function, but not from the same environment
  • 13. Improving Iteration Speed ● Per-line output ● Immediate feedback ● Breakpoints and other local debugging tools ● Unit and Integration tests
  • 14. Deploying Your Code ● Zip-file from S3, or manual upload ○ NOTE: zip only the source code, not the parent folder! ● Testing upload ● Publishing ● Complex, non-intuitive
  • 15. Using Backand's CLI Tool ● Backand On-Demand Node.JS Lambda actions ● Backand CLI abstracts away deployment ● npm install -g backand ● Requires registering with Backand
  • 16. Deploying Lambda Code ● Initializing an action- backand action init ○ Arguments available in docs.backand.com ● Copy your Node.JS code into created directory ● Deploy - backand action deploy ○ Arguments available in docs.backand.com
  • 17. Calling Your Lambda ● Authentication ○ can be anonymous ○ api.backand.com/1/token ○ See docs ● cURL curl -H "<auth header>" "https://api.backand.com/1/objects/action/<object>?name=<name>" ● JavaScript (with Backand SDK) backand.object.action.get(...)
  • 18. What is Backand? ● Serverless app platform ● Manages your app's database ● Manages your app's security and authentication ● Provides custom server-side code execution ● Provides hosting options ● Provides logging, analytics, and more
  • 19. Backand Features ● Automated REST API ● Bring your own Database ● Custom JavaScript Actions ● Server-Side Code Execution ● Batch and Bulk Processing ● Scheduled Tasks ● Automated messages ● Real-time Communications ● User and Role-based Security ● Social Media Authentication ● GUI Schema Editor ● Custom Queries ● REST API Playground ● Sample Code Generation ● Hosting ● Detailed Analytics ● Logging ● Multi-Platform SDK ● Single Sign On Support