Enviar búsqueda
Cargar
Microservices with AWS Lambda and the Serverless Framework
•
1 recomendación
•
1,451 vistas
R
Rowell Belen
Seguir
An introduction to AWS Lambda and the Serverless Framework
Leer menos
Leer más
Software
Denunciar
Compartir
Denunciar
Compartir
1 de 55
Descargar ahora
Descargar para leer sin conexión
Recomendados
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
Luciano Mammino
AWS Lambda from the Trenches
AWS Lambda from the Trenches
Yan Cui
Serverless Reality
Serverless Reality
Lynn Langit
Serverless Framework Intro
Serverless Framework Intro
Nikolaus Graf
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Shaun Murakami
Practical Cloud
Practical Cloud
Lynn Langit
Building a PaaS with Docker and AWS
Building a PaaS with Docker and AWS
Amazon Web Services
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
Dev_Events
Recomendados
AWS Lambda and Serverless framework: lessons learned while building a serverl...
AWS Lambda and Serverless framework: lessons learned while building a serverl...
Luciano Mammino
AWS Lambda from the Trenches
AWS Lambda from the Trenches
Yan Cui
Serverless Reality
Serverless Reality
Lynn Langit
Serverless Framework Intro
Serverless Framework Intro
Nikolaus Graf
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Shaun Murakami
Practical Cloud
Practical Cloud
Lynn Langit
Building a PaaS with Docker and AWS
Building a PaaS with Docker and AWS
Amazon Web Services
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
Dev_Events
Node withoutservers aws-lambda
Node withoutservers aws-lambda
ColdFusionConference
IaC on AWS Cloud
IaC on AWS Cloud
Bhuvaneswari Subramani
Tensorflow in production with AWS Lambda
Tensorflow in production with AWS Lambda
Fabian Dubois
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Seven Peaks Speaks
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Source
aspyker
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
Konstantin Tarkus
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
CodeOps Technologies LLP
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
Serverless Framework (2018)
Serverless Framework (2018)
Rowell Belen
NetflixOSS and ZeroToDocker Talk
NetflixOSS and ZeroToDocker Talk
aspyker
Serverless Summit - Quiz
Serverless Summit - Quiz
CodeOps Technologies LLP
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Henning Jacobs
Lessons learned after a year of lambda - AWS Community Day SF 2017
Lessons learned after a year of lambda - AWS Community Day SF 2017
Matt Billock
ASP.NET vNext
ASP.NET vNext
Alex Thissen
Riga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS Lambda
Antons Kranga
Aws serverless architecture
Aws serverless architecture
genesesoftware
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
aspyker
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe-Lexware GmbH & Co KG
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS User Group - Thailand
Serverless Reality
Serverless Reality
Lynn Langit
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
Brian Christner
56k.cloud training
56k.cloud training
Brian Christner
Más contenido relacionado
La actualidad más candente
Node withoutservers aws-lambda
Node withoutservers aws-lambda
ColdFusionConference
IaC on AWS Cloud
IaC on AWS Cloud
Bhuvaneswari Subramani
Tensorflow in production with AWS Lambda
Tensorflow in production with AWS Lambda
Fabian Dubois
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Seven Peaks Speaks
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Source
aspyker
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
Konstantin Tarkus
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
CodeOps Technologies LLP
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
Andrea Scuderi
Serverless Framework (2018)
Serverless Framework (2018)
Rowell Belen
NetflixOSS and ZeroToDocker Talk
NetflixOSS and ZeroToDocker Talk
aspyker
Serverless Summit - Quiz
Serverless Summit - Quiz
CodeOps Technologies LLP
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Henning Jacobs
Lessons learned after a year of lambda - AWS Community Day SF 2017
Lessons learned after a year of lambda - AWS Community Day SF 2017
Matt Billock
ASP.NET vNext
ASP.NET vNext
Alex Thissen
Riga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS Lambda
Antons Kranga
Aws serverless architecture
Aws serverless architecture
genesesoftware
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
aspyker
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe-Lexware GmbH & Co KG
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS User Group - Thailand
Serverless Reality
Serverless Reality
Lynn Langit
La actualidad más candente
(20)
Node withoutservers aws-lambda
Node withoutservers aws-lambda
IaC on AWS Cloud
IaC on AWS Cloud
Tensorflow in production with AWS Lambda
Tensorflow in production with AWS Lambda
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Structuring node.js projects - Seven Peaks Software (Node.JS Meetup 18 nov 2021)
Netflix Cloud Platform and Open Source
Netflix Cloud Platform and Open Source
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Aws Lambda in Swift - NSLondon - 3rd December 2020
Aws Lambda in Swift - NSLondon - 3rd December 2020
Serverless Framework (2018)
Serverless Framework (2018)
NetflixOSS and ZeroToDocker Talk
NetflixOSS and ZeroToDocker Talk
Serverless Summit - Quiz
Serverless Summit - Quiz
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Large Scale Kubernetes on AWS at Europe's Leading Online Fashion Platform - A...
Lessons learned after a year of lambda - AWS Community Day SF 2017
Lessons learned after a year of lambda - AWS Community Day SF 2017
ASP.NET vNext
ASP.NET vNext
Riga DevDays 2017 - Efficient AWS Lambda
Riga DevDays 2017 - Efficient AWS Lambda
Aws serverless architecture
Aws serverless architecture
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
Haufe Onboarding - Fast Iterating With the MERN Stack - TEC Day 2019
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
AWS Community Day Bangkok 2019 - Dev Ops Philosophy Increase Productivity
Serverless Reality
Serverless Reality
Similar a Microservices with AWS Lambda and the Serverless Framework
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
Brian Christner
56k.cloud training
56k.cloud training
Brian Christner
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
Phil Estes
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
VMware Tanzu
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
IBM
Cloud Foundry for PHP developers
Cloud Foundry for PHP developers
Daniel Krook
Architecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt Microservices
Amazon Web Services
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
Amazon Web Services
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Emerson Eduardo Rodrigues Von Staffen
Serverless: The next major shift in cloud computing
Serverless: The next major shift in cloud computing
Doug Vanderweide
Docker vs. Kubernetes vs. Serverless
Docker vs. Kubernetes vs. Serverless
LogicworksNY
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
LeanIX GmbH
Moving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
Hussein Salman
DevOps and BigData Analytics
DevOps and BigData Analytics
sbbabu
2020-02-10 Java on Azure Solution Briefing
2020-02-10 Java on Azure Solution Briefing
Ed Burns
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Docker, Inc.
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
Amazon Web Services
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
Amazon Web Services
Global Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit Utrecht
Daniël te Winkel
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
Patrick Chanezon
Similar a Microservices with AWS Lambda and the Serverless Framework
(20)
Zero to Serverless in 60s - Anywhere
Zero to Serverless in 60s - Anywhere
56k.cloud training
56k.cloud training
Containerize, PaaS, or Go Serverless!?
Containerize, PaaS, or Go Serverless!?
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
PHP Buildpacks in the Cloud on Bluemix
PHP Buildpacks in the Cloud on Bluemix
Cloud Foundry for PHP developers
Cloud Foundry for PHP developers
Architecture: When, how, and if to Adopt Microservices
Architecture: When, how, and if to Adopt Microservices
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Serverless: The next major shift in cloud computing
Serverless: The next major shift in cloud computing
Docker vs. Kubernetes vs. Serverless
Docker vs. Kubernetes vs. Serverless
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Moving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
DevOps and BigData Analytics
DevOps and BigData Analytics
2020-02-10 Java on Azure Solution Briefing
2020-02-10 Java on Azure Solution Briefing
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
Proof of Concept: Serverless with Swarm by Nirmal Mehta, Booz Allen Hamilton
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Summit 2013 | Auckland - Continuous Deployment Practices, with Production...
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
Global Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit Utrecht
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
GIDS 2019: Developing Apps with Containers, Functions and Cloud Services
Último
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
masabamasaba
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Steffen Staab
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
Delhi Call girls
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
panagenda
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
masabamasaba
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
OnePlan Solutions
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Willy Marroquin (WillyDevNET)
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Philip Schwarz
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
SelfMade bd
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
Mind IT Systems
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
Shrmpro
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
Shane Coughlan
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
masabamasaba
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
masabamasaba
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
masabamasaba
The title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
Define the academic and professional writing..pdf
Define the academic and professional writing..pdf
PearlKirahMaeRagusta1
Último
(20)
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension Aid
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
The title is not connected to what is inside
The title is not connected to what is inside
Define the academic and professional writing..pdf
Define the academic and professional writing..pdf
Microservices with AWS Lambda and the Serverless Framework
1.
Serverless Microservices An introduction
to AWS Lambda and the Serverless Framework © Rowell Belen 1
2.
About Me Rowell Belen
/ Software Engineer @ Stedi » LinkedIn: https://linkedin.com/in/rowellbelen » Blog: https://www.rowellbelen.com » GitHub: https://github.com/bytekast » Twitter: @bytekast » Email: rowell.belen@bytekast.com © Rowell Belen 2
3.
What is Serverless
Computing? Serverless Computing is a cloud computing model that allows you to build and run applications and services without thinking about servers. The platform takes care of everything required to run and scale your code with high availability. © Rowell Belen 3
4.
The Sweet Spot ©
Rowell Belen 4
5.
But... but... aren't
PaaS and Serverless the same? © Rowell Belen 5
6.
What is the
key difference between PaaS and Serverless? © Rowell Belen 6
7.
SCALING!! © Rowell Belen
7
8.
Unit of Scale »
Data Center: Hardware (Physical Hosting Env Abstraction) » IaaS: Virtual Machines (Hardware Abstraction) » Paas: Application (VM Abstraction) » Serverless: Function (Runtime Abstraction) © Rowell Belen 8
9.
Wait.. wait... What
about containers? © Rowell Belen 9
10.
What are the
key differences between Containers and Serverless? © Rowell Belen 10
11.
ORCHESTRATION & MANAGEMENT © Rowell Belen
11
12.
and... SCALING!! © Rowell Belen
12
13.
What is AWS
Lambda? Amazon's Serverless compute platform for stateless code execution in response to events © Rowell Belen 13
14.
Other Serverless Platform
Providers » Microsoft Azure Functions » Iron.io » Google Cloud Functions » IBM Open Whisk » WebTask.io » PubNub BLOCKS © Rowell Belen 14
15.
How Is AWS
Lambda Used? » Stream Data Processing » REST Backend Services » One-off Processes » Background Workers » Event Responders © Rowell Belen 15
16.
How are Lambda
Functions Triggered? » Event-driven (SNS, S3, API-Gateway, Amazon Echo Skills, IoT, etc.) » Direct Invocation (CLI, SDK, etc.) » Scheduled Interval © Rowell Belen 16
17.
Supported Languages » Node.js
(Javascript) » Python » JVM ( Java, Scala, Groovy, Kotlin, Clojure, etc. ) » C# © Rowell Belen 17
18.
Pricing Memory (MB) Free
tier seconds per month Price per 100ms ($) 128 3,200,000 0.000000208 256 1,600,000 0.000000417 512 800,000 0.000000834 1024 400,000 0.000001667 1536 266,667 0.000002501 © Rowell Belen 18
19.
Top Tier Pricing
(1536 MB Memory) 1 Million Executions @ 1 sec/exec ≈ $18.34 © Rowell Belen 19
20.
Benefits » Cost and
Utilization » Fully Managed Infrastructure » Rapid Development » Streamlined AWS Integrations » Pay Per Use » Auto Scale » Built-in Versioning © Rowell Belen 20
21.
Drawbacks » Limited Language
Support » Not Suitable for Long-running Tasks » Local Development and Debugging Challenges » Limited Infrastructure Transparency / Less Control » Potential Vendor Lock-in » Cutting-edge quirks » Concurrent Execution Limit is Shared across entire AWS © Rowell Belen 21
22.
Serverless @ © Rowell
Belen 22
23.
© Rowell Belen
23
24.
Enough chit-chat, let's see
some code! © Rowell Belen 24
25.
Send Events/Metrics to
Datadog class DatadogHandler { final rest = new RESTClient('https://app.datadoghq.com/') void handleRequest(Map input, Context context) { def jsonObj = snsJsonBody(input) // Extract Payload def type = jsonObj?.'alert_type' ? 'events' : 'series' def query = ['api_key': System.getenv('DATADOG_API_KEY')] rest.post( path: "api/v1/${type}", body: jsonObj, query: query ) } } © Rowell Belen 25
26.
Custom JWT Token
Authorizer class AuthorizerHandler { Map handleRequest(Map input, Context context) { // extract token and resource from input def token = input.authorizationToken?.minus('Bearer')?.trim() def resource = input.methodArn // authenticate def claims = verifyToken(token) // return policy createPolicy(claims, resource) } } © Rowell Belen 26
27.
Verify Token (cont.) Map
verifyToken(final String token) { def algorithm = Algorithm.HMAC256(System.getenv('AUTH0_CLIENT_SECRET')) def verifier = JWT.require(algorithm).build() def decodedJwt = verifier.verify(token) decodedJwt.getClaims() } © Rowell Belen 27
28.
Create Security Policy
with Claims (cont.) Map createPolicy(final Map claims, final String resource) { [ principalId : claims?.user_id, policyDocument: [ Version : '2012-10-17', Statement: [ Action : 'execute-api:Invoke', Effect : claims ? 'Allow' : 'Deny', Resource: resource ] ], context : claims ] } © Rowell Belen 28
29.
How do I
invoke a Lambda function programatically? © Rowell Belen 29
30.
Direct Lambda Invocation
- Define Interfaces interface DocumentAuditService { @LambdaFunction(invocationType = InvocationType.Event, functionName = 'document-audit') void audit(DocumentAudit documentAudit) } class DocumentAudit { String documentId String status } © Rowell Belen 30
31.
Direct Lambda Invocation
(cont...) - Use a Proxy void handle(Document document, Context context) { // Do something with the document... // Create proxy to DocumentAuditService def docService = LambdaInvokerFactory.builder() .lambdaClient(AWSLambdaClientBuilder.defaultClient()) .build(DocumentAuditService.class) // pass the interface // Call audit lambda function docService.audit( new DocumentAudit(documentId: UUID.randomUUID().toString(), status: 'TRANSMITTED')) } © Rowell Belen 31
32.
What is the
Serverless Framework? Development toolkit for building, managing and deploying Serverless applications and resources © Rowell Belen 32
33.
Serverless Framework CLI npm
install serverless -g mkdir my-api && cd my-api serverless create --template aws-groovy-gradle serverless deploy --stage dev serverless invoke --function my-function --log © Rowell Belen 33
34.
Available Templates » aws-nodejs »
aws-python » aws-groovy-gradle » aws-java-maven » aws-java-gradle » aws-scala-sbt © Rowell Belen 34
35.
serverless.yml - Basic
Function service: serverless-demo provider: runtime: java8 timeout: 300 memorySize: 1536 package: artifact: /build/dist/serverless-demo.zip functions: my-function: handler: com.bytekast.serverless.MyLambdaFunction::handler © Rowell Belen 35
36.
serverless.yml - API
Gateway functions: createUser: handler: com.bytekast.serverless.UserService::createUser events: - http: path: users/create method: post deleteUser: handler: com.bytekast.serverless.UserService::deleteUser events: - http: path: users/delete method: delete © Rowell Belen 36
37.
serverless.yml - API
Gateway (Custom Authorization) ... events: - http: path: users/create method: post cors: true authorizer: arn: arn:aws:lambda:us-east-1:1234567890123:function:authorizer identitySource: method.request.header.Authorization identityValidationExpression: Bearer .* © Rowell Belen 37
38.
serverless.yml - SNS
Topic Subscription functions: audit: handler: com.bytekast.serverless.AuditService::audit events: - sns: dev-audit-topic © Rowell Belen 38
39.
serverless.yml - Scheduled
Trigger functions: crawl: handler: com.bytekast.serverless.SearchService::crawl events: - schedule: rate(2 hours) - schedule: cron(0 12 * * ? *) © Rowell Belen 39
40.
serverless.yml - IAM
Role Permissions provider: ... iamRoleStatements: - Effect: "Allow" Action: - "sqs:*" Resource: arn:aws:sqs:us-east-1:1234567890123:dev-serverless-demo © Rowell Belen 40
41.
serverless.yml - Create
AWS Resources resources: Resources: InboundQueue: Type: "AWS::SQS::Queue" Properties: QueueName: ${self:provider.stage}-serverless-demo MessageRetentionPeriod: 1209600 VisibilityTimeout: 60 © Rowell Belen 41
42.
DEMO Build Slack Command
API using Serverless Framework + API Gateway + AWS Lambda https://github.com/bytekast/serverless-demo © Rowell Belen 42
43.
What about Cloud
Scale DevOps? © Rowell Belen 43
44.
Infrastructure and Environment configurations
need to be reproducible from a definition under source control © Rowell Belen 44
45.
Solution: © Rowell Belen
45
46.
Immutable Infrastructure? Immutable components
are replaced for every deployment, rather than being updated in-place © Rowell Belen 46
47.
Solution: Lambda Built-In
Features » Containers are ephemeral entities that are easily created and destroyed » Preserved history and ability to roll back a bad deployment ( revert to previous version ) » Auto-managed horizontal scaling (Scale out / Scale In) » Automatic Load Balancing » Zero/Minimal Downtime during deployment © Rowell Belen 47
48.
Environments should not
be connected or otherwise intercommunicate © Rowell Belen 48
49.
Solutions: » AWS Lambda
supports running functions in different VPCs (dev, stage, prod) » Use separate AWS accounts per Environment © Rowell Belen 49
50.
Promote immutable application artifacts
from the lowest environment to the highest ( Deployment ) © Rowell Belen 50
51.
Solutions: » Publish Versioned
Build Artifacts to Repository » Continuous Integration » Continuous Delivery © Rowell Belen 51
52.
Centralized Logging © Rowell
Belen 52
53.
Metrics » Better Dashboards »
Custom Metrics and Events © Rowell Belen 53
54.
Other Things to
Consider » AWS functions are recycled about every 8 hours » Container instances idle for about 5 minutes are destroyed » Cold starts can cause delay in response times » 50 MB max deployment package size » 5 minute running time limit » 1000 default concurrent function executions across entire AWS account © Rowell Belen 54
55.
Questions? © Rowell Belen
55
Descargar ahora