SlideShare a Scribd company logo
1 of 23
Download to read offline
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS -Serverless
Alexandre Pinhel
AWS – Solutions Architect
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Serverlessapplications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Function
Node.js
Python
Java
C#
Go
Ruby
Runtime API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
ServerlessWebApplications
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Lambda releasehistory
?
*As of October 2018, does not include region launches
2015 2016 2017 2018
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Lambda Layers
Lets functions easily share code: Upload layer
once, reference within any function
Promote separation of responsibilities, lets
developers iterate faster on writing business logic
Built in support for secure sharing by ecosystem
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Using Lambda Layers
• Put common components in a ZIP file and
upload it as a Lambda Layer
• Layers are immutable and can be versioned
to manage updates
• When a version is deleted or permissions to
use it are revoked, functions that used it
previously will continue to work, but you won’t
be able to create new ones
• You can reference up to five layers, one of
which can optionally be a custom runtime
Lambda
Layers
arn:aws:lambda:region:accountId:layer:shared-lib
Lambda
Layers
arn:aws:lambda:region:accountId:layer:shared-lib:2
Lambda
Layers
arn:aws:lambda:region:accountId:layer:shared-lib:3
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Lambda RuntimeAPI
Bring any Linux compatible language runtime
Powered by new Runtime API - Codifies the
runtime calling conventions and integration points
At launch, custom runtimes powering Ruby support
in AWS Lambda, more runtimes from partners (like
Erlang)
Custom runtimes distributed as “layers”
Rule
Stack
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
RuntimeBootstrap
• The bootstrap executable act as a bridge
between the Runtime HTTP API and the
Function to be executed
• Bootstrap needs to manage response/error
handling, context creation and function execution
• Information on the interface endpoint and the
function handler are shared as environment
variables
/runtime API
/invocation/next
/init/error /ID/error
/invocation/ID/response
/invocation/ID/error
bootstrap
Process events/headers
Clean up
Initialize and Invoke function
Response/Error handling
Lambda
Function
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Bootstrap d’un RuntimeCustom
• L’exécutable bootstrap agit comme un pont entre
le Runtime HTTP de Lambda et la fonction à
exécuter
• Le Boostrap doit gérer la gestion des réponses
et des erreurs, créer le contexte et executer la
fonction
• Les informations liées au endpoint et les handler
de fonction sont partagées comme des variables
environnement
/runtime API
/invocation/next
/init/error /ID/error
/invocation/ID/response
/invocation/ID/error
bootstrap
Process events/headers
Clean up
Initialize and Invoke function
Response/Error handling
Lambda
Function
#!/bin/sh
set -euo pipefail
# Initialization - load function handler
source $LAMBDA_TASK_ROOT/"$(echo $_HANDLER | cut -d. -f1).sh"
# Processing
while true
do
HEADERS="$(mktemp)"
# Get an event
EVENT_DATA=$(curl -sS -LD "$HEADERS" -X GET "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-
01/runtime/invocation/next")
REQUEST_ID=$(grep -Fi Lambda-Runtime-Aws-Request-Id "$HEADERS" | tr -d '[:space:]' | cut -d: -f2)
# Execute the handler function from the script
RESPONSE=$($(echo "$_HANDLER" | cut -d. -f2) "$EVENT_DATA")
# Send the response
curl -X POST "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response" -d
"$RESPONSE"
done
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Common Lambda usecases
Web
Applications
• Static websites
• Complex web
apps
• Packages for
Flask and
Express
Data
Processing
• Real time
• MapReduce
• Batch
Chatbots
• Powering
chatbot logic
Backends
• Apps &
services
• Mobile
• IoT
</></>
Amazon
Alexa
• Powering
voice-enabled
apps
• Alexa Skills Kit
IT
Automation
• Policy engines
• Extending
AWS services
• Infrastructure
management
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Serverlessarchitectures
1. File put into bucket
2. Lambda invoked 2. Lambda invoked
1. Data published to a
topic
Data
1. Message inserted
into to a queue
3. Function
removes
message from
queue
2. Lambda polls
queue and invokes
function
Topic
MessageObject
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Serverlessarchitectures
2. Lambda polls
stream
1. Data published to a
stream
3. Amazon Kinesis
returns stream
data
Data
2. Lambda invoked
1. Chatbot conversation
needs “fulfillment”
Chatbot
1. Scheduled time
occurs
2. Lambda invoked
Event (time-based)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Keeporchestration outof code
Track status of data
and execution
Remove
redundant code
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWSStepFunctions
“Serverless” workflow management with
zero administration
• Makes it easy to coordinate the components of
distributed applications and microservices
using visual workflows
• Automatically triggers and tracks each step
and retries when there are errors, so your
application executes in order and as expected
• Logs the state of each step, so when things do
go wrong, you can diagnose and debug
problems quickly
Task
Choice
Failure capture
Parallel tasks
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
StepFunctions: Integrations
Simplify building workloads such as order processing,
report generation, and data analysis
Write and maintain less code; add services in minutes
More service integrations:
AWS Step
Functions
Amazon Simple
Notification
Service
Amazon Simple
Queue Service
Amazon
SageMaker
AWS Glue AWS Batch Amazon Elastic
Container Service
AWS Fargate
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Simpler integration,lesscode
With serverless polling With direct service integrationStart
End
AWS
Lambda
functions
Start
End
No
Lambda
functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Best
Practices
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Don’t startfromscratch
AWS
Chalice
AWS Amplify
AWS
SAM
AWS: Third-party:
Serverless
Framework
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
SAMTemplate
Note to Cloudformation that it is a
SAM template
Create an AWS Lambda function with
an IAM policy, runtime, the code
available on zip file and the handler
to start.
Will create an event with API
Gateway and the path associated.
Create an Amazon DynamoDB with 5
RCU & WCU
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://sam-demo-bucket/todo_list.zip
Handler: index.gethtml
Runtime: nodejs8.10
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
ListTable:
Type: AWS::Serverless::SimpleTable
DEMO!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
aws.amazon.com/serverless
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
https://secure.flickr.com/photos/dullhunk/202872717/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Resources
Workshop serverless on Github:
https://github.com/aws-samples/aws-serverless-workshops
Twitter Bot on github (without layer):
https://github.com/aws-samples/aws-twitterbot-workshop
Power tuning for Lambda:
https://github.com/alexcasalboni/aws-lambda-power-tuning
Registration for AWS free workshop:
https://aws.amazon.com/fr/serverless-workshops/
Layers:
https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
https://github.com/mthenw/awesome-layers (languages, tools, monitoring)
Amplify:
https://aws-amplify.github.io/docs/

More Related Content

What's hot

Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...Chris Munns
 
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...Amazon Web Services
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...Chris Munns
 
Practical Guidance for Increasing your Serverless Application's Security
Practical Guidance for Increasing your Serverless Application's SecurityPractical Guidance for Increasing your Serverless Application's Security
Practical Guidance for Increasing your Serverless Application's SecurityChris Munns
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019AWS Summits
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKDonnie Prakoso
 
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...Amazon Web Services
 
All the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessAll the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessChris Munns
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019AWS Summits
 
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019AWS Summits
 
Serverless Applications with AWS SAM
Serverless Applications with AWS SAMServerless Applications with AWS SAM
Serverless Applications with AWS SAMChris Munns
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019AWS Summits
 
Deep Dive On Serverless Application Development
Deep Dive On Serverless Application DevelopmentDeep Dive On Serverless Application Development
Deep Dive On Serverless Application DevelopmentAmazon Web Services
 
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS SummitKubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS SummitAmazon Web Services
 
Networking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless ApplicationsNetworking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless ApplicationsChris Munns
 
Dalle macchine virtuali ai container usando AWS Fargate
Dalle macchine virtuali ai container usando AWS FargateDalle macchine virtuali ai container usando AWS Fargate
Dalle macchine virtuali ai container usando AWS FargateAmazon Web Services
 

What's hot (19)

Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
 
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
CI/CD best practices for building modern applications - MAD304 - Chicago AWS ...
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
 
Practical Guidance for Increasing your Serverless Application's Security
Practical Guidance for Increasing your Serverless Application's SecurityPractical Guidance for Increasing your Serverless Application's Security
Practical Guidance for Increasing your Serverless Application's Security
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
Serverless functions deep dive
Serverless functions deep diveServerless functions deep dive
Serverless functions deep dive
 
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...Scalable serverless architectures using event-driven design - MAD301 - Atlant...
Scalable serverless architectures using event-driven design - MAD301 - Atlant...
 
All the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev ServerlessAll the Ops you need to know to Dev Serverless
All the Ops you need to know to Dev Serverless
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
 
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
Frontend and Mobile with AWS Amplify | AWS Summit Tel Aviv 2019
 
Serverless Applications with AWS SAM
Serverless Applications with AWS SAMServerless Applications with AWS SAM
Serverless Applications with AWS SAM
 
Lambda Layers & Runtime API
Lambda Layers & Runtime APILambda Layers & Runtime API
Lambda Layers & Runtime API
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 
Deep Dive On Serverless Application Development
Deep Dive On Serverless Application DevelopmentDeep Dive On Serverless Application Development
Deep Dive On Serverless Application Development
 
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS SummitKubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
 
Networking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless ApplicationsNetworking Best Practices for Your Serverless Applications
Networking Best Practices for Your Serverless Applications
 
Dalle macchine virtuali ai container usando AWS Fargate
Dalle macchine virtuali ai container usando AWS FargateDalle macchine virtuali ai container usando AWS Fargate
Dalle macchine virtuali ai container usando AWS Fargate
 

Similar to Serverless workshop with Amazon Web Services

Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Amazon Web Services
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Amazon Web Services
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsAmazon Web Services
 
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Amazon Web Services
 
Introduction to Serverless Computing - OOP Munich
 Introduction to Serverless Computing - OOP Munich Introduction to Serverless Computing - OOP Munich
Introduction to Serverless Computing - OOP MunichBoaz Ziniman
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...Amazon Web Services
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesAmazon Web Services
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019Amazon Web Services
 
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitThirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitAmazon Web Services
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversAmazon Web Services
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Amazon Web Services
 
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...Amazon Web Services
 
Thinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGThinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGEric Johnson
 
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitBuilding Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitAmazon Web Services
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Amazon Web Services
 
Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitTwelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitAmazon Web Services
 
Serverless Computing How to Innovate Faster
Serverless Computing How to Innovate FasterServerless Computing How to Innovate Faster
Serverless Computing How to Innovate FasterAmazon Web Services
 

Similar to Serverless workshop with Amazon Web Services (20)

Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Introduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless ApplicationsIntroduction to AWS Lambda and Serverless Applications
Introduction to AWS Lambda and Serverless Applications
 
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
Intro to AWS Lambda and Serverless Applications: re:Invent 2018 Recap at the ...
 
Introduction to Serverless Computing - OOP Munich
 Introduction to Serverless Computing - OOP Munich Introduction to Serverless Computing - OOP Munich
Introduction to Serverless Computing - OOP Munich
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
Serverless Functions Deep Dive
Serverless Functions Deep DiveServerless Functions Deep Dive
Serverless Functions Deep Dive
 
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019 Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
Let Your Business Logic go Serverless | AWS Summit Tel Aviv 2019
 
.NET on AWS
.NET on AWS.NET on AWS
.NET on AWS
 
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS SummitThirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
Thirty serverless architectures in 30 minutes - MAD202 - Chicago AWS Summit
 
Serverless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about serversServerless computing - Build and run applications without thinking about servers
Serverless computing - Build and run applications without thinking about servers
 
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
 
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...
Unlocking Agility with the AWS Serverless Application Model (SAM) - AWS Summi...
 
Thinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UGThinking Asynchronously Full Vesion - Utah UG
Thinking Asynchronously Full Vesion - Utah UG
 
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitBuilding Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM
 
Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS SummitTwelve-Factor serverless applications - MAD311 - Chicago AWS Summit
Twelve-Factor serverless applications - MAD311 - Chicago AWS Summit
 
Serverless Computing How to Innovate Faster
Serverless Computing How to Innovate FasterServerless Computing How to Innovate Faster
Serverless Computing How to Innovate Faster
 

More from TheFamily

Building a design culture from day one
Building a design culture from day oneBuilding a design culture from day one
Building a design culture from day oneTheFamily
 
Individual Contributors vs Managers
Individual Contributors vs ManagersIndividual Contributors vs Managers
Individual Contributors vs ManagersTheFamily
 
Build the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofBuild the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofTheFamily
 
CEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersCEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersTheFamily
 
Managing fully remote teams
Managing fully remote teamsManaging fully remote teams
Managing fully remote teamsTheFamily
 
State of European Tech by Atomico
State of European Tech by AtomicoState of European Tech by Atomico
State of European Tech by AtomicoTheFamily
 
Building a real estate startup
Building a real estate startupBuilding a real estate startup
Building a real estate startupTheFamily
 
A VC view on Enterprise Sales
A VC view on Enterprise SalesA VC view on Enterprise Sales
A VC view on Enterprise SalesTheFamily
 
Find your style and create emotions
Find your style and create emotionsFind your style and create emotions
Find your style and create emotionsTheFamily
 
From product to ecosystem
From product to ecosystemFrom product to ecosystem
From product to ecosystemTheFamily
 
Demystifying the product black box
Demystifying the product black boxDemystifying the product black box
Demystifying the product black boxTheFamily
 
The secrets to create bank brand love
The secrets to create bank brand loveThe secrets to create bank brand love
The secrets to create bank brand loveTheFamily
 
Building an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonBuilding an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonTheFamily
 
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadMixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadTheFamily
 
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibA new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibTheFamily
 
Building a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillBuilding a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillTheFamily
 
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustBuilding an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustTheFamily
 
Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A TheFamily
 
Onboarding developers and setting them up for success
Onboarding developers and setting them up for successOnboarding developers and setting them up for success
Onboarding developers and setting them up for successTheFamily
 
Apprendre à penser comme un journaliste
Apprendre à penser comme un journalisteApprendre à penser comme un journaliste
Apprendre à penser comme un journalisteTheFamily
 

More from TheFamily (20)

Building a design culture from day one
Building a design culture from day oneBuilding a design culture from day one
Building a design culture from day one
 
Individual Contributors vs Managers
Individual Contributors vs ManagersIndividual Contributors vs Managers
Individual Contributors vs Managers
 
Build the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed ofBuild the decentralized team you ever dreamed of
Build the decentralized team you ever dreamed of
 
CEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what mattersCEOs best practices to win time back & focus on what matters
CEOs best practices to win time back & focus on what matters
 
Managing fully remote teams
Managing fully remote teamsManaging fully remote teams
Managing fully remote teams
 
State of European Tech by Atomico
State of European Tech by AtomicoState of European Tech by Atomico
State of European Tech by Atomico
 
Building a real estate startup
Building a real estate startupBuilding a real estate startup
Building a real estate startup
 
A VC view on Enterprise Sales
A VC view on Enterprise SalesA VC view on Enterprise Sales
A VC view on Enterprise Sales
 
Find your style and create emotions
Find your style and create emotionsFind your style and create emotions
Find your style and create emotions
 
From product to ecosystem
From product to ecosystemFrom product to ecosystem
From product to ecosystem
 
Demystifying the product black box
Demystifying the product black boxDemystifying the product black box
Demystifying the product black box
 
The secrets to create bank brand love
The secrets to create bank brand loveThe secrets to create bank brand love
The secrets to create bank brand love
 
Building an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & BaldertonBuilding an insurance startup with Alan, Luko, Coverd & Balderton
Building an insurance startup with Alan, Luko, Coverd & Balderton
 
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at BrigadMixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
Mixing Product & Tech by Jean Lebrument, CTO & CPO at Brigad
 
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at DoctolibA new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
A new breed of CTO - Philippe Vimard, CTO & COO at Doctolib
 
Building a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFillBuilding a logistics startup  with Trusk, Totem & SpaceFill
Building a logistics startup  with Trusk, Totem & SpaceFill
 
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & ChaintrustBuilding an accounting startup with Fred de la compta, Acasi & Chaintrust
Building an accounting startup with Fred de la compta, Acasi & Chaintrust
 
Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A Scale your tech team from 0 to Series A
Scale your tech team from 0 to Series A
 
Onboarding developers and setting them up for success
Onboarding developers and setting them up for successOnboarding developers and setting them up for success
Onboarding developers and setting them up for success
 
Apprendre à penser comme un journaliste
Apprendre à penser comme un journalisteApprendre à penser comme un journaliste
Apprendre à penser comme un journaliste
 

Recently uploaded

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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Recently uploaded (20)

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
 
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...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Serverless workshop with Amazon Web Services

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS -Serverless Alexandre Pinhel AWS – Solutions Architect
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Serverlessapplications Services (anything) Changes in data state Requests to endpoints Changes in resource state Event source Function Node.js Python Java C# Go Ruby Runtime API
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T ServerlessWebApplications
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWS Lambda releasehistory ? *As of October 2018, does not include region launches 2015 2016 2017 2018
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Lambda Layers Lets functions easily share code: Upload layer once, reference within any function Promote separation of responsibilities, lets developers iterate faster on writing business logic Built in support for secure sharing by ecosystem
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Using Lambda Layers • Put common components in a ZIP file and upload it as a Lambda Layer • Layers are immutable and can be versioned to manage updates • When a version is deleted or permissions to use it are revoked, functions that used it previously will continue to work, but you won’t be able to create new ones • You can reference up to five layers, one of which can optionally be a custom runtime Lambda Layers arn:aws:lambda:region:accountId:layer:shared-lib Lambda Layers arn:aws:lambda:region:accountId:layer:shared-lib:2 Lambda Layers arn:aws:lambda:region:accountId:layer:shared-lib:3
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Lambda RuntimeAPI Bring any Linux compatible language runtime Powered by new Runtime API - Codifies the runtime calling conventions and integration points At launch, custom runtimes powering Ruby support in AWS Lambda, more runtimes from partners (like Erlang) Custom runtimes distributed as “layers” Rule Stack
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T RuntimeBootstrap • The bootstrap executable act as a bridge between the Runtime HTTP API and the Function to be executed • Bootstrap needs to manage response/error handling, context creation and function execution • Information on the interface endpoint and the function handler are shared as environment variables /runtime API /invocation/next /init/error /ID/error /invocation/ID/response /invocation/ID/error bootstrap Process events/headers Clean up Initialize and Invoke function Response/Error handling Lambda Function
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Bootstrap d’un RuntimeCustom • L’exécutable bootstrap agit comme un pont entre le Runtime HTTP de Lambda et la fonction à exécuter • Le Boostrap doit gérer la gestion des réponses et des erreurs, créer le contexte et executer la fonction • Les informations liées au endpoint et les handler de fonction sont partagées comme des variables environnement /runtime API /invocation/next /init/error /ID/error /invocation/ID/response /invocation/ID/error bootstrap Process events/headers Clean up Initialize and Invoke function Response/Error handling Lambda Function #!/bin/sh set -euo pipefail # Initialization - load function handler source $LAMBDA_TASK_ROOT/"$(echo $_HANDLER | cut -d. -f1).sh" # Processing while true do HEADERS="$(mktemp)" # Get an event EVENT_DATA=$(curl -sS -LD "$HEADERS" -X GET "http://${AWS_LAMBDA_RUNTIME_API}/2018-06- 01/runtime/invocation/next") REQUEST_ID=$(grep -Fi Lambda-Runtime-Aws-Request-Id "$HEADERS" | tr -d '[:space:]' | cut -d: -f2) # Execute the handler function from the script RESPONSE=$($(echo "$_HANDLER" | cut -d. -f2) "$EVENT_DATA") # Send the response curl -X POST "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response" -d "$RESPONSE" done
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Common Lambda usecases Web Applications • Static websites • Complex web apps • Packages for Flask and Express Data Processing • Real time • MapReduce • Batch Chatbots • Powering chatbot logic Backends • Apps & services • Mobile • IoT </></> Amazon Alexa • Powering voice-enabled apps • Alexa Skills Kit IT Automation • Policy engines • Extending AWS services • Infrastructure management
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Serverlessarchitectures 1. File put into bucket 2. Lambda invoked 2. Lambda invoked 1. Data published to a topic Data 1. Message inserted into to a queue 3. Function removes message from queue 2. Lambda polls queue and invokes function Topic MessageObject
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Serverlessarchitectures 2. Lambda polls stream 1. Data published to a stream 3. Amazon Kinesis returns stream data Data 2. Lambda invoked 1. Chatbot conversation needs “fulfillment” Chatbot 1. Scheduled time occurs 2. Lambda invoked Event (time-based)
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Keeporchestration outof code Track status of data and execution Remove redundant code
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T AWSStepFunctions “Serverless” workflow management with zero administration • Makes it easy to coordinate the components of distributed applications and microservices using visual workflows • Automatically triggers and tracks each step and retries when there are errors, so your application executes in order and as expected • Logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly Task Choice Failure capture Parallel tasks
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T StepFunctions: Integrations Simplify building workloads such as order processing, report generation, and data analysis Write and maintain less code; add services in minutes More service integrations: AWS Step Functions Amazon Simple Notification Service Amazon Simple Queue Service Amazon SageMaker AWS Glue AWS Batch Amazon Elastic Container Service AWS Fargate
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Simpler integration,lesscode With serverless polling With direct service integrationStart End AWS Lambda functions Start End No Lambda functions
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Best Practices
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Don’t startfromscratch AWS Chalice AWS Amplify AWS SAM AWS: Third-party: Serverless Framework
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T SAMTemplate Note to Cloudformation that it is a SAM template Create an AWS Lambda function with an IAM policy, runtime, the code available on zip file and the handler to start. Will create an event with API Gateway and the path associated. Create an Amazon DynamoDB with 5 RCU & WCU AWSTemplateFormatVersion: '2010-09-09’ Transform: AWS::Serverless-2016-10-31 Resources: GetHtmlFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://sam-demo-bucket/todo_list.zip Handler: index.gethtml Runtime: nodejs8.10 Policies: AmazonDynamoDBReadOnlyAccess Events: GetHtml: Type: Api Properties: Path: /{proxy+} Method: ANY ListTable: Type: AWS::Serverless::SimpleTable
  • 20. DEMO!
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T aws.amazon.com/serverless
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T https://secure.flickr.com/photos/dullhunk/202872717/
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Resources Workshop serverless on Github: https://github.com/aws-samples/aws-serverless-workshops Twitter Bot on github (without layer): https://github.com/aws-samples/aws-twitterbot-workshop Power tuning for Lambda: https://github.com/alexcasalboni/aws-lambda-power-tuning Registration for AWS free workshop: https://aws.amazon.com/fr/serverless-workshops/ Layers: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html https://github.com/mthenw/awesome-layers (languages, tools, monitoring) Amplify: https://aws-amplify.github.io/docs/