SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
SEPTEMBER 2016
AWS LAMBDA
Tooling and deployment at scale
Erwan Alliaume
Alexandre Gindre
WHO ARE WE? 2
Erwan Alliaume Alexandre Gindre
Chief Technical Officer Consultant
AGENDA 3
What is a lambda? Examples and demos
Not true unfortunately … we have only 20
minutes
But materials will be shared in the slide deck
1. AWS Lambda overview
2. AWS Compute offering
3. Use cases
4. Framework Landscape
5. Why do you need a framework
1. AWS Lambda Web Console
2. AWS Lambda CLI
3. AWS Cloud Formation for AWS
Lambda
4. Jenkins Lambda Plugin
5. Gordon framework
6. Serverless framework
21
>01 WHAT IS A LAMBDA?
WHAT IS A LAMBDA? 5
AWS Lambda is a serverless compute service that runs your code in response to events
and automatically manages the underlying compute resources for you
Event
From an AWS service event To anything (not only AWS)
austoscale
Trigger
Asynchronous function
event driven
Any behaviour
AWS COMPUTE OFFERINGS 6
Pricing: cheap!
#requests , execution time , memory
First million call free, $0.20usd per million over
¤ Containers
> Deploy in seconds
> Live for hours
¤ Serverless compute platform
> Deploy in milliseconds
> Live for seconds
Granularity
AWS EC2
AWS ECS
AWS Lambda
¤ Virtual servers
> Deploy in minutes
> Live for weeks
USE CASES 7
¤ Auto Start / Auto Stop of EC2 instances
¤ AWS inventory, and clean-up suggestion
¤ Slack bot, via API Gateway and push
hooks
¤ Time based notifications: mail, slack…
¤ CV/Resume transfer to our HR tool
¤ …
At
¤ Airline: SNS to S3 to topic backup
¤ … and replay them for testing
purpose
¤ 100 invocations by second
¤ Bank: Copy user form data from s3 to a
homemade analytics tool
Deployed for our clients
¤ Heroku like paas
¤ s3 code => deploy ECS or EC2
¤ Mutli region autodeployer
¤ s3 region1 => s3 region2 => deploy
¤ CI/CD or load testing pipeline
Other examples
¤ Dynamic data ingestion
¤ Image processing, transcoding
¤ Event stream processing
¤ Serverless http backends (microservices)
¤ Database triggers
¤ AWS services plumbing
Generic usages
FRAMEWORKS LANDSCAPE
OCTO TECHNOLOGY >
8
Build, package and deploy – CLI and generic tools
Nodejs microservices
Actor driven nodejs app
JavaScript APIs with
AWS API Gateway and Lambda
CLI to deploy, update, and test functionscreate, wire and deploy AWS Lambdas
using CloudFormation
serverless architectures on AWS Lambda,
Azure Functions, Google Cloud Functions
Serverless Python Web Services
with AWS Lambda + API Gateway
Develop and deploy serverless
Python in AWS Lambda
AWS Lambda automation
and integration for Python
Python serverless microframework
from Amazon for AWS lambda
AWS Lambda manager
with Golang support
A Go framework for
AWS Lambda microservices
.Net, Javascript, Java, Scala,
Ruby, and Python lambdas
Build serverless REST API's
with JAVA with JAX-RS
AWS Lambda functions
using Apache Maven and Java
WHY DO YOU NEED A FRAMEWORK?
OCTO TECHNOLOGY >
9ProvidedbyAWSUptoyou!
New Runtime? You need a new CI/CD process!
AWS LAMBDA, THE OTHER SIDE OF THE COIN 10
Missing
on the AWS Picture…
AWS Lambda
Awesomeness!
¤ Simple to learn
¤ Event driven
¤ Ideal for simple stateless process
¤ Cheap!
¤ Fully managed (including monitoring/logging)
¤ Packaging is up to you
¤ Versioning is up to you
¤ Configuration variables are not so easy
¤ Not multi-env friendly {dev, test, preprod, prod}
¤ Error handling is hard
Need to design your { process , tools , pipeline } to use them in a company context level!
>02 EXAMPLES!
THE AWS LAMBDA WEB CONSOLE
OCTO TECHNOLOGY >
12
ConsPros
¤ Simple to learn and use
¤ Templates of code and role
¤ Code directly in the console or use zip file
¤ Provides information on other AWS services
¤ S3, VPC, Security Groups
¤ Not automatic
¤ Packaging is up to you
¤ No variable by environment
¤ Versioning is up to you
¤ Naming strategy
¤ Via Alias or version
¤ Code directly in the console
¤ Impossible to see the content of a ZIP file
¤ Manual testing
THE AWS LAMBDA CLI 13
ConsPros
¤ Well documented, easy to learn
¤ Same than the console, but scriptable
¤ CLI completion possible
¤ Flexible, you have all AWS capabilities
available from the CLI
¤ Same than the console, only low level operations
¤ Packaging is up to you
¤ Versioning is up to you
¤ Multi-env is complicated
¤ Code sharing is complicated
¤ Testing is complicated
¤ CI integration is up to you
aws lambda create-function --function-name my-lambda --zip-file fileb://file-path/my-lambda.zip 
--role role-arn –handler mylambda.handler --runtime nodejs4.3
aws lambda invoke --invocation-type RequestResponse --function-name my-lambda --payload file://file-path/input.txt outputfile.txt
AWS CLOUDFORMATION
OCTO TECHNOLOGY >
14
ConsPros
¤ AWS Standard
¤ Everything at the same place
¤ Lambda, Role, Triggers, Destination
¤ Easy cleanup and update
¤ Parameterisable
¤ Code inline or ZIP in s3
¤ Reusable!
¤ Packaging is up to you
¤ If packaging ZIP, hard to variabilize the content
¤ Some triggers are complicated to setup
¤ Topic subscription
¤ Versioning is up to you
¤ Naming strategy
¤ Manual testing
¤ Large ugly JSON file
THE JENKINS AWS LAMBDA PLUGIN 15
https://wiki.jenkins-ci.org/display/JENKINS/AWS+Lambda+Plugin
ConsPros
¤ Integration to Jenkins, a CI/CD solution
¤ Wrapper of the AWS CLI
¤ 1-click Lambda deploy
¤ Integration test via, invoke the deployed lambda
¤ Packaging is still up to you
¤ Multi-env still complicated
¤ No variable / parameters
¤ Versioning is up to you
¤ via a naming strategy
¤ Only basics operations available…
GORDON
OCTO TECHNOLOGY >
16
ConsPros
¤ Easy to use
¤ Easily to manage the code with versioning tool
¤ Manage different environments
¤ Config files
¤ CLI to deploy
¤ Generated cloud formation script
¤ Support Golang
¤ Multi-region
¤ Very intrusive
¤ Use mandatory lambda ”libs”
¤ Use too permissive role
¤ Still has some bug with variables injection
¤ Doesn't have lambda level of granularity
¤ Generated cloud formation
OCTO TECHNOLOGY >
17SERVERLESS FRAMEWORK
https://github.com/serverless/serverless
ConsPros
¤ One of the most advanced tool around lambdas
¤ Less intrusive than Gordon
¤ Code reusable across several lambdas
¤ Multi-Env, yaml configuration
¤ Moving/growing very fast
¤ 10k+ stars on github
¤ Simple: create / deploy / invoke, cloudformation based
¤ Multi-Regions
¤ Testable
¤ Still buggy! Very young!
¤ Variables not available everywhere
¤ Cloud agnostic … on the paper at least J
SUMMARY 18
AWS
Console
AWS CLI
Jenkins Lambda
Plugin
AWS Cloud
Formation
Gordon Serverless
Code reuse - - - - ++ ++
Variables - - - + ++ ++
Package - - + ++ +++ +++
Multi-Env - - - + ++ ++
Invoke + ++ ++ - ++ ++
Flexibility ++ +++ - + ++ ++
Maintainability - ? + ++ ++ +++
Discreet +++ +++ ++ + - ++
Multi-cloud - - - - - +
Prod Ready +++ +++ + ++ - -
CONCLUSION, TAKE AWAY 19
¤ Packaging, deploying and maintaining AWS Lambda is complex
¤ You need to build your CI/CD tools and process around the AWS
Lambda Runtime
¤ Frameworks can help, but the are still very young!
¤ May be less risky to use low level tools (AWS CLI)?!...
¤ … frameworks are evolving very fast
Young!Need tools!
20

Mais conteúdo relacionado

Mais de PolarSeven Pty Ltd

Amazon Web Services User Group Sydney - March 2018
Amazon Web Services User Group Sydney - March 2018Amazon Web Services User Group Sydney - March 2018
Amazon Web Services User Group Sydney - March 2018PolarSeven Pty Ltd
 
Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018PolarSeven Pty Ltd
 
Deep Dive on Cloud Policies and Automation
Deep Dive on Cloud Policies and AutomationDeep Dive on Cloud Policies and Automation
Deep Dive on Cloud Policies and AutomationPolarSeven Pty Ltd
 
Securing Traffic Leaving A VPC
Securing Traffic Leaving A VPCSecuring Traffic Leaving A VPC
Securing Traffic Leaving A VPCPolarSeven Pty Ltd
 
Telstra Programmable Networks & Scaling a Serverless Team with Automation
 Telstra Programmable Networks & Scaling a Serverless Team with Automation Telstra Programmable Networks & Scaling a Serverless Team with Automation
Telstra Programmable Networks & Scaling a Serverless Team with AutomationPolarSeven Pty Ltd
 
AWS User Group Sydney - Meetup #60
AWS User Group Sydney - Meetup #60AWS User Group Sydney - Meetup #60
AWS User Group Sydney - Meetup #60PolarSeven Pty Ltd
 
Visibility, Optimization & Governance for Cloud Services
Visibility, Optimization & Governance for Cloud ServicesVisibility, Optimization & Governance for Cloud Services
Visibility, Optimization & Governance for Cloud ServicesPolarSeven Pty Ltd
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomatePolarSeven Pty Ltd
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...PolarSeven Pty Ltd
 
The Internet of Things - PolarSeven
The Internet of Things - PolarSevenThe Internet of Things - PolarSeven
The Internet of Things - PolarSevenPolarSeven Pty Ltd
 
How our AWS account got hacked and what we did to ensure it never happened ag...
How our AWS account got hacked and what we did to ensure it never happened ag...How our AWS account got hacked and what we did to ensure it never happened ag...
How our AWS account got hacked and what we did to ensure it never happened ag...PolarSeven Pty Ltd
 
Brocade AWS user group Sydney presentation
Brocade AWS user group Sydney presentationBrocade AWS user group Sydney presentation
Brocade AWS user group Sydney presentationPolarSeven Pty Ltd
 
What we learned from the AWS Outage
What we learned from the AWS OutageWhat we learned from the AWS Outage
What we learned from the AWS OutagePolarSeven Pty Ltd
 

Mais de PolarSeven Pty Ltd (20)

AWS User Group October
AWS User Group OctoberAWS User Group October
AWS User Group October
 
AWS User Group August
AWS User Group AugustAWS User Group August
AWS User Group August
 
AWS User Group November
AWS User Group NovemberAWS User Group November
AWS User Group November
 
AWS User Group September
AWS User Group September AWS User Group September
AWS User Group September
 
Amazon Web Services User Group Sydney - March 2018
Amazon Web Services User Group Sydney - March 2018Amazon Web Services User Group Sydney - March 2018
Amazon Web Services User Group Sydney - March 2018
 
Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018Amazon Web Services User Group Sydney - February 2018
Amazon Web Services User Group Sydney - February 2018
 
Deep Dive on Cloud Policies and Automation
Deep Dive on Cloud Policies and AutomationDeep Dive on Cloud Policies and Automation
Deep Dive on Cloud Policies and Automation
 
Securing Traffic Leaving A VPC
Securing Traffic Leaving A VPCSecuring Traffic Leaving A VPC
Securing Traffic Leaving A VPC
 
Telstra Programmable Networks & Scaling a Serverless Team with Automation
 Telstra Programmable Networks & Scaling a Serverless Team with Automation Telstra Programmable Networks & Scaling a Serverless Team with Automation
Telstra Programmable Networks & Scaling a Serverless Team with Automation
 
AWS User Group Sydney - Meetup #60
AWS User Group Sydney - Meetup #60AWS User Group Sydney - Meetup #60
AWS User Group Sydney - Meetup #60
 
Shared Security in AWS
Shared Security in AWSShared Security in AWS
Shared Security in AWS
 
Visibility, Optimization & Governance for Cloud Services
Visibility, Optimization & Governance for Cloud ServicesVisibility, Optimization & Governance for Cloud Services
Visibility, Optimization & Governance for Cloud Services
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
AWS CloudFormation Automation, TrafficScript, and Serverless architecture wit...
 
AWS User Group December 2016
AWS User Group December 2016AWS User Group December 2016
AWS User Group December 2016
 
The Internet of Things - PolarSeven
The Internet of Things - PolarSevenThe Internet of Things - PolarSeven
The Internet of Things - PolarSeven
 
How our AWS account got hacked and what we did to ensure it never happened ag...
How our AWS account got hacked and what we did to ensure it never happened ag...How our AWS account got hacked and what we did to ensure it never happened ag...
How our AWS account got hacked and what we did to ensure it never happened ag...
 
AWS Meetup August 2016
AWS Meetup August 2016AWS Meetup August 2016
AWS Meetup August 2016
 
Brocade AWS user group Sydney presentation
Brocade AWS user group Sydney presentationBrocade AWS user group Sydney presentation
Brocade AWS user group Sydney presentation
 
What we learned from the AWS Outage
What we learned from the AWS OutageWhat we learned from the AWS Outage
What we learned from the AWS Outage
 

Último

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
 
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
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
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
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Último (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
 
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
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
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
 
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
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

AWS User Group Sydney - Lambda Presentation - 5-10-2016

  • 1. SEPTEMBER 2016 AWS LAMBDA Tooling and deployment at scale Erwan Alliaume Alexandre Gindre
  • 2. WHO ARE WE? 2 Erwan Alliaume Alexandre Gindre Chief Technical Officer Consultant
  • 3. AGENDA 3 What is a lambda? Examples and demos Not true unfortunately … we have only 20 minutes But materials will be shared in the slide deck 1. AWS Lambda overview 2. AWS Compute offering 3. Use cases 4. Framework Landscape 5. Why do you need a framework 1. AWS Lambda Web Console 2. AWS Lambda CLI 3. AWS Cloud Formation for AWS Lambda 4. Jenkins Lambda Plugin 5. Gordon framework 6. Serverless framework 21
  • 4. >01 WHAT IS A LAMBDA?
  • 5. WHAT IS A LAMBDA? 5 AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you Event From an AWS service event To anything (not only AWS) austoscale Trigger Asynchronous function event driven Any behaviour
  • 6. AWS COMPUTE OFFERINGS 6 Pricing: cheap! #requests , execution time , memory First million call free, $0.20usd per million over ¤ Containers > Deploy in seconds > Live for hours ¤ Serverless compute platform > Deploy in milliseconds > Live for seconds Granularity AWS EC2 AWS ECS AWS Lambda ¤ Virtual servers > Deploy in minutes > Live for weeks
  • 7. USE CASES 7 ¤ Auto Start / Auto Stop of EC2 instances ¤ AWS inventory, and clean-up suggestion ¤ Slack bot, via API Gateway and push hooks ¤ Time based notifications: mail, slack… ¤ CV/Resume transfer to our HR tool ¤ … At ¤ Airline: SNS to S3 to topic backup ¤ … and replay them for testing purpose ¤ 100 invocations by second ¤ Bank: Copy user form data from s3 to a homemade analytics tool Deployed for our clients ¤ Heroku like paas ¤ s3 code => deploy ECS or EC2 ¤ Mutli region autodeployer ¤ s3 region1 => s3 region2 => deploy ¤ CI/CD or load testing pipeline Other examples ¤ Dynamic data ingestion ¤ Image processing, transcoding ¤ Event stream processing ¤ Serverless http backends (microservices) ¤ Database triggers ¤ AWS services plumbing Generic usages
  • 8. FRAMEWORKS LANDSCAPE OCTO TECHNOLOGY > 8 Build, package and deploy – CLI and generic tools Nodejs microservices Actor driven nodejs app JavaScript APIs with AWS API Gateway and Lambda CLI to deploy, update, and test functionscreate, wire and deploy AWS Lambdas using CloudFormation serverless architectures on AWS Lambda, Azure Functions, Google Cloud Functions Serverless Python Web Services with AWS Lambda + API Gateway Develop and deploy serverless Python in AWS Lambda AWS Lambda automation and integration for Python Python serverless microframework from Amazon for AWS lambda AWS Lambda manager with Golang support A Go framework for AWS Lambda microservices .Net, Javascript, Java, Scala, Ruby, and Python lambdas Build serverless REST API's with JAVA with JAX-RS AWS Lambda functions using Apache Maven and Java
  • 9. WHY DO YOU NEED A FRAMEWORK? OCTO TECHNOLOGY > 9ProvidedbyAWSUptoyou! New Runtime? You need a new CI/CD process!
  • 10. AWS LAMBDA, THE OTHER SIDE OF THE COIN 10 Missing on the AWS Picture… AWS Lambda Awesomeness! ¤ Simple to learn ¤ Event driven ¤ Ideal for simple stateless process ¤ Cheap! ¤ Fully managed (including monitoring/logging) ¤ Packaging is up to you ¤ Versioning is up to you ¤ Configuration variables are not so easy ¤ Not multi-env friendly {dev, test, preprod, prod} ¤ Error handling is hard Need to design your { process , tools , pipeline } to use them in a company context level!
  • 12. THE AWS LAMBDA WEB CONSOLE OCTO TECHNOLOGY > 12 ConsPros ¤ Simple to learn and use ¤ Templates of code and role ¤ Code directly in the console or use zip file ¤ Provides information on other AWS services ¤ S3, VPC, Security Groups ¤ Not automatic ¤ Packaging is up to you ¤ No variable by environment ¤ Versioning is up to you ¤ Naming strategy ¤ Via Alias or version ¤ Code directly in the console ¤ Impossible to see the content of a ZIP file ¤ Manual testing
  • 13. THE AWS LAMBDA CLI 13 ConsPros ¤ Well documented, easy to learn ¤ Same than the console, but scriptable ¤ CLI completion possible ¤ Flexible, you have all AWS capabilities available from the CLI ¤ Same than the console, only low level operations ¤ Packaging is up to you ¤ Versioning is up to you ¤ Multi-env is complicated ¤ Code sharing is complicated ¤ Testing is complicated ¤ CI integration is up to you aws lambda create-function --function-name my-lambda --zip-file fileb://file-path/my-lambda.zip --role role-arn –handler mylambda.handler --runtime nodejs4.3 aws lambda invoke --invocation-type RequestResponse --function-name my-lambda --payload file://file-path/input.txt outputfile.txt
  • 14. AWS CLOUDFORMATION OCTO TECHNOLOGY > 14 ConsPros ¤ AWS Standard ¤ Everything at the same place ¤ Lambda, Role, Triggers, Destination ¤ Easy cleanup and update ¤ Parameterisable ¤ Code inline or ZIP in s3 ¤ Reusable! ¤ Packaging is up to you ¤ If packaging ZIP, hard to variabilize the content ¤ Some triggers are complicated to setup ¤ Topic subscription ¤ Versioning is up to you ¤ Naming strategy ¤ Manual testing ¤ Large ugly JSON file
  • 15. THE JENKINS AWS LAMBDA PLUGIN 15 https://wiki.jenkins-ci.org/display/JENKINS/AWS+Lambda+Plugin ConsPros ¤ Integration to Jenkins, a CI/CD solution ¤ Wrapper of the AWS CLI ¤ 1-click Lambda deploy ¤ Integration test via, invoke the deployed lambda ¤ Packaging is still up to you ¤ Multi-env still complicated ¤ No variable / parameters ¤ Versioning is up to you ¤ via a naming strategy ¤ Only basics operations available…
  • 16. GORDON OCTO TECHNOLOGY > 16 ConsPros ¤ Easy to use ¤ Easily to manage the code with versioning tool ¤ Manage different environments ¤ Config files ¤ CLI to deploy ¤ Generated cloud formation script ¤ Support Golang ¤ Multi-region ¤ Very intrusive ¤ Use mandatory lambda ”libs” ¤ Use too permissive role ¤ Still has some bug with variables injection ¤ Doesn't have lambda level of granularity ¤ Generated cloud formation
  • 17. OCTO TECHNOLOGY > 17SERVERLESS FRAMEWORK https://github.com/serverless/serverless ConsPros ¤ One of the most advanced tool around lambdas ¤ Less intrusive than Gordon ¤ Code reusable across several lambdas ¤ Multi-Env, yaml configuration ¤ Moving/growing very fast ¤ 10k+ stars on github ¤ Simple: create / deploy / invoke, cloudformation based ¤ Multi-Regions ¤ Testable ¤ Still buggy! Very young! ¤ Variables not available everywhere ¤ Cloud agnostic … on the paper at least J
  • 18. SUMMARY 18 AWS Console AWS CLI Jenkins Lambda Plugin AWS Cloud Formation Gordon Serverless Code reuse - - - - ++ ++ Variables - - - + ++ ++ Package - - + ++ +++ +++ Multi-Env - - - + ++ ++ Invoke + ++ ++ - ++ ++ Flexibility ++ +++ - + ++ ++ Maintainability - ? + ++ ++ +++ Discreet +++ +++ ++ + - ++ Multi-cloud - - - - - + Prod Ready +++ +++ + ++ - -
  • 19. CONCLUSION, TAKE AWAY 19 ¤ Packaging, deploying and maintaining AWS Lambda is complex ¤ You need to build your CI/CD tools and process around the AWS Lambda Runtime ¤ Frameworks can help, but the are still very young! ¤ May be less risky to use low level tools (AWS CLI)?!... ¤ … frameworks are evolving very fast Young!Need tools!
  • 20. 20