際際滷

際際滷Share a Scribd company logo
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
DevOps on Serverless
S辿bastien Stormacq, Developer Evangelist
@sebsto
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless means
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless means
No Server to Provision or Manage Scale with Usage
Availability and Fault Tolerance Built-in No Idle Capacity to Pay for
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless across the stack
Database
AccessCompute
Developer Workflow
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Lambda
Changes in data state
Requests to endpoints
Changes in resource state
Event Source Functions
Node.js
Python
Java
C#
Go
Ruby
(*)
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Typical Use Cases
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
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hello
AWS Lambda World
KEEP
CALM
and
WATCH
the
DEMO
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How do you 
Automatically Provision & Configure
your serverless Infrastructure ?
(a.k.a. DevOps on Serverless)
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Meet SAM !
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Application Model
 CloudFormation extension optimized for serverless
 Serverless resource types: functions, APIs, tables
 Supports anything CloudFormation supports
 Open specification (Apache 2.0)
https://github.com/awslabs/serverless-application-model
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Application Model (SAM)
Creates a Lambda function with
the referenced managed IAM
policy, runtime, code at the
referenced zip location, and
handler as defined.
Also creates an API Gateway and
takes care of all
mapping/permissions necessary
Tells CloudFormation this is a
template to transform
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: nodejs4.3
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
ListTable:
Type: AWS::Serverless::SimpleTable Creates a DynamodDB table
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing the SAM CLI
Usage: sam [OPTIONS] COMMAND [ARGS]...

Commands:
validate Validate an AWS SAM template.
init Initialize a serverless application with a...
package Package an AWS SAM application. This is an alias for 'aws
cloudformation package'.
deploy Deploy an AWS SAM application. This is an alias for 'aws
cloudformation deploy'.
logs Fetch logs for a function
local Run your Serverless application locally for...
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introducing the SAM CLI
https://github.com/awslabs/aws-sam-cli
pip install --user aws-sam-cli
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Local Test
sam local generate-event ...
sam local invoke -event event.json
sam local start-api #for API Gateway only
(requires Docker)
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Package and Deploy
sam build
sam package --s3-bucket <BUCKET> > pack.yaml
sam deploy 
--template-file pack.yaml 
--stack-name <STACK> 
--capabilities CAPABILITY_IAM
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hello
AWS SAM CLI
KEEP
CALM
and
WATCH
the
DEMO
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automate Developer Workflow
AWS CodeBuild
AWS CodeCommit
AWS Cloud9
AWS CodeDeploy
AWS
CodePipeline
Develop Build & Test Deploy
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
buildspec.yaml
version: 0.1
environment_variables:
plaintext:
"INPUT_FILE": "saml.yaml
"S3_BUCKET": my_bucket"
phases:
install:
commands:
- npm install
pre_build:
commands:
- eslint *.js
build:
commands:
- npm test
post_build:
commands:
- sam package --template $INPUT_FILE --s3-bucket $S3_BUCKET --output-template post-saml.yaml
artifacts:
type: zip
files:
- post-saml.yaml
- beta.json
Variables
Different phases of the build
Create artifacts and store on them S3
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Safe Deployment with SAM
 SAM integrates with Code Deploy
 Code Deploy integrates with Lambda
 Lambda Versioning supports traffic shifting
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Safe Deployment with SAM
 Version = immutable deployment unit
 Alias = pointer to a version
Lambda Function
alias : LIVE
version : 6
version : 7
90%
10%
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Safe Deployment with SAM
 Preconfigured canary and linear deployments
 Auto alarm-based rollbacks
 Pre and post traffic validation hooks
 Monitor through the CodeDeploy console
 Natively supported in SAM!
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Safe Deployment with SAM
AWSTemplateFormatVersion: '2010-09-09
Transform: AWS::Serverless-2016-10-31
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://demo-bucket/todo_list.zip
Handler: index.js
Runtime: nodejs6.1
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSTemplateFormatVersion: '2010-09-09
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
AutoPublishAlias: Live
DeploymentPreference:
Type: Canary10Percent5Minutes
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://demo-bucket/todo_list.zip
Handler: index.js
Runtime: nodejs6.1
Policies: AmazonDynamoDBReadOnlyAccess
Safe Deployment with SAM
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSTemplateFormatVersion: '2010-09-09
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
AutoPublishAlias: Live
DeploymentPreference:
Type: Canary10Percent10Minutes
Hooks:
PreTraffic: !Ref CodeDeployHook_PreTest
PostTraffic: !Ref CodeDeployHook_PostTest
Alarms:
- !Ref DurationAlarm
- !Ref ErrorAlarm
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://demo-bucket/todo_list.zip
Handler: index.js
Runtime: nodejs6.1
Safe Deployment with SAM
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Safe Deployments
KEEP
CALM
and
WATCH
the
DEMO
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Orchestrate
Develop Build & Test Deploy
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CodePipeline
 Continuous delivery service for fast and reliable
application updates
 Model and visualize your software release process
 Builds, tests, and deploys your code every time there is
a code change
 Integrates with third-party tools and AWS
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless on AWS
Compute Developer Workflow
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Take Away
1. Use the Lambda console for quick creation and iteration of
simple apps
2. Use AWS SAM to describe your serverless architecture
3. Plug SAM CLI into the IDE of your choice for testing and
debugging
4. Build on SAM for CI/CD capabilities, including linear & canary
deployments
5. Automate your deployment workflow using Code* family of
services
息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you
S辿bastien Stormacq, Developer Evangelist
@sebsto

More Related Content

Recently uploaded (20)

The Evolution of Home Security from Cameras to Smart Systems.pdf
The Evolution of Home Security from Cameras to Smart Systems.pdfThe Evolution of Home Security from Cameras to Smart Systems.pdf
The Evolution of Home Security from Cameras to Smart Systems.pdf
Internet Bundle Now
What is Satellite Communication and How Does it Work.pdf
What is Satellite Communication and How Does it Work.pdfWhat is Satellite Communication and How Does it Work.pdf
What is Satellite Communication and How Does it Work.pdf
Telecoms Supermarket
BGP Best Practices, presented by Imtiaz Sajid
BGP Best Practices, presented by Imtiaz SajidBGP Best Practices, presented by Imtiaz Sajid
BGP Best Practices, presented by Imtiaz Sajid
APNIC
Press Conference Future of Business: Trends and Predictions for 2025
Press Conference Future of Business: Trends and Predictions for 2025Press Conference Future of Business: Trends and Predictions for 2025
Press Conference Future of Business: Trends and Predictions for 2025
SanskarTiwari20
Frontier Internet Availability Expanding Access to Rural Communities.pdf
Frontier Internet Availability Expanding Access to Rural Communities.pdfFrontier Internet Availability Expanding Access to Rural Communities.pdf
Frontier Internet Availability Expanding Access to Rural Communities.pdf
Internet Bundle Now
"Revolutionizing Tomorrow: The Power of AI"
"Revolutionizing Tomorrow: The Power of AI""Revolutionizing Tomorrow: The Power of AI"
"Revolutionizing Tomorrow: The Power of AI"
kulbhushanmohtra
APNIC and Policy Development Process (PDP)
APNIC and Policy Development Process (PDP)APNIC and Policy Development Process (PDP)
APNIC and Policy Development Process (PDP)
APNIC
AI & Cybersecurity: Strengthening Business Security in 2025
AI & Cybersecurity: Strengthening Business Security in 2025AI & Cybersecurity: Strengthening Business Security in 2025
AI & Cybersecurity: Strengthening Business Security in 2025
privaxic
Mdf Board manufacturer in india.........
Mdf Board manufacturer in india.........Mdf Board manufacturer in india.........
Mdf Board manufacturer in india.........
veerseo13
Copy of Tech Startup by 際際滷sgo....pptx
Copy of Tech Startup by 際際滷sgo....pptxCopy of Tech Startup by 際際滷sgo....pptx
Copy of Tech Startup by 際際滷sgo....pptx
ErdiErdi6
MiniTool Power Data Recovery Crack Latest
MiniTool Power Data Recovery Crack  LatestMiniTool Power Data Recovery Crack  Latest
MiniTool Power Data Recovery Crack Latest
adreeskhan14780
Amazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
Amazon Sidewalk: A Global Wake-Up Call for the Telecom IndustryAmazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
Amazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
David Swift
download di slideshare ngak bisa padahal udah upload file 2 kali
download di slideshare ngak bisa padahal udah upload file 2 kalidownload di slideshare ngak bisa padahal udah upload file 2 kali
download di slideshare ngak bisa padahal udah upload file 2 kali
haikalmalikpranasta
DT Presentation[1].pptxeffsffewfwefewfewefefeef
DT Presentation[1].pptxeffsffewfwefewfewefefeefDT Presentation[1].pptxeffsffewfwefewfewefefeef
DT Presentation[1].pptxeffsffewfwefewfewefefeef
dipanshu1721
Byzantine Empire.pdf, history and geography yes yes yes
Byzantine Empire.pdf, history and geography yes yes yesByzantine Empire.pdf, history and geography yes yes yes
Byzantine Empire.pdf, history and geography yes yes yes
estuchedetumadre
Introduction to WordPress Basics - WP 101
Introduction to WordPress Basics - WP 101Introduction to WordPress Basics - WP 101
Introduction to WordPress Basics - WP 101
Joe Querin
Mastering SEO: Build a Winning Strategy from the Ground Up
Mastering SEO: Build a Winning Strategy from the Ground UpMastering SEO: Build a Winning Strategy from the Ground Up
Mastering SEO: Build a Winning Strategy from the Ground Up
thedigicenter
State of Artificial Intelligence Report - 2024 ONLINE.pdf
State of Artificial Intelligence Report - 2024 ONLINE.pdfState of Artificial Intelligence Report - 2024 ONLINE.pdf
State of Artificial Intelligence Report - 2024 ONLINE.pdf
ManuBatra12
Chapter 6-firewalls-whitman-information security.ppt
Chapter 6-firewalls-whitman-information security.pptChapter 6-firewalls-whitman-information security.ppt
Chapter 6-firewalls-whitman-information security.ppt
ayeshabatool947681
D 1.2 TYPES OF NETWORKS.ppt. for computer
D 1.2 TYPES OF NETWORKS.ppt. for computerD 1.2 TYPES OF NETWORKS.ppt. for computer
D 1.2 TYPES OF NETWORKS.ppt. for computer
ramniwaskukna874
The Evolution of Home Security from Cameras to Smart Systems.pdf
The Evolution of Home Security from Cameras to Smart Systems.pdfThe Evolution of Home Security from Cameras to Smart Systems.pdf
The Evolution of Home Security from Cameras to Smart Systems.pdf
Internet Bundle Now
What is Satellite Communication and How Does it Work.pdf
What is Satellite Communication and How Does it Work.pdfWhat is Satellite Communication and How Does it Work.pdf
What is Satellite Communication and How Does it Work.pdf
Telecoms Supermarket
BGP Best Practices, presented by Imtiaz Sajid
BGP Best Practices, presented by Imtiaz SajidBGP Best Practices, presented by Imtiaz Sajid
BGP Best Practices, presented by Imtiaz Sajid
APNIC
Press Conference Future of Business: Trends and Predictions for 2025
Press Conference Future of Business: Trends and Predictions for 2025Press Conference Future of Business: Trends and Predictions for 2025
Press Conference Future of Business: Trends and Predictions for 2025
SanskarTiwari20
Frontier Internet Availability Expanding Access to Rural Communities.pdf
Frontier Internet Availability Expanding Access to Rural Communities.pdfFrontier Internet Availability Expanding Access to Rural Communities.pdf
Frontier Internet Availability Expanding Access to Rural Communities.pdf
Internet Bundle Now
"Revolutionizing Tomorrow: The Power of AI"
"Revolutionizing Tomorrow: The Power of AI""Revolutionizing Tomorrow: The Power of AI"
"Revolutionizing Tomorrow: The Power of AI"
kulbhushanmohtra
APNIC and Policy Development Process (PDP)
APNIC and Policy Development Process (PDP)APNIC and Policy Development Process (PDP)
APNIC and Policy Development Process (PDP)
APNIC
AI & Cybersecurity: Strengthening Business Security in 2025
AI & Cybersecurity: Strengthening Business Security in 2025AI & Cybersecurity: Strengthening Business Security in 2025
AI & Cybersecurity: Strengthening Business Security in 2025
privaxic
Mdf Board manufacturer in india.........
Mdf Board manufacturer in india.........Mdf Board manufacturer in india.........
Mdf Board manufacturer in india.........
veerseo13
Copy of Tech Startup by 際際滷sgo....pptx
Copy of Tech Startup by 際際滷sgo....pptxCopy of Tech Startup by 際際滷sgo....pptx
Copy of Tech Startup by 際際滷sgo....pptx
ErdiErdi6
MiniTool Power Data Recovery Crack Latest
MiniTool Power Data Recovery Crack  LatestMiniTool Power Data Recovery Crack  Latest
MiniTool Power Data Recovery Crack Latest
adreeskhan14780
Amazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
Amazon Sidewalk: A Global Wake-Up Call for the Telecom IndustryAmazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
Amazon Sidewalk: A Global Wake-Up Call for the Telecom Industry
David Swift
download di slideshare ngak bisa padahal udah upload file 2 kali
download di slideshare ngak bisa padahal udah upload file 2 kalidownload di slideshare ngak bisa padahal udah upload file 2 kali
download di slideshare ngak bisa padahal udah upload file 2 kali
haikalmalikpranasta
DT Presentation[1].pptxeffsffewfwefewfewefefeef
DT Presentation[1].pptxeffsffewfwefewfewefefeefDT Presentation[1].pptxeffsffewfwefewfewefefeef
DT Presentation[1].pptxeffsffewfwefewfewefefeef
dipanshu1721
Byzantine Empire.pdf, history and geography yes yes yes
Byzantine Empire.pdf, history and geography yes yes yesByzantine Empire.pdf, history and geography yes yes yes
Byzantine Empire.pdf, history and geography yes yes yes
estuchedetumadre
Introduction to WordPress Basics - WP 101
Introduction to WordPress Basics - WP 101Introduction to WordPress Basics - WP 101
Introduction to WordPress Basics - WP 101
Joe Querin
Mastering SEO: Build a Winning Strategy from the Ground Up
Mastering SEO: Build a Winning Strategy from the Ground UpMastering SEO: Build a Winning Strategy from the Ground Up
Mastering SEO: Build a Winning Strategy from the Ground Up
thedigicenter
State of Artificial Intelligence Report - 2024 ONLINE.pdf
State of Artificial Intelligence Report - 2024 ONLINE.pdfState of Artificial Intelligence Report - 2024 ONLINE.pdf
State of Artificial Intelligence Report - 2024 ONLINE.pdf
ManuBatra12
Chapter 6-firewalls-whitman-information security.ppt
Chapter 6-firewalls-whitman-information security.pptChapter 6-firewalls-whitman-information security.ppt
Chapter 6-firewalls-whitman-information security.ppt
ayeshabatool947681
D 1.2 TYPES OF NETWORKS.ppt. for computer
D 1.2 TYPES OF NETWORKS.ppt. for computerD 1.2 TYPES OF NETWORKS.ppt. for computer
D 1.2 TYPES OF NETWORKS.ppt. for computer
ramniwaskukna874

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray

Devops on serverless

  • 1. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. DevOps on Serverless S辿bastien Stormacq, Developer Evangelist @sebsto
  • 2. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless means
  • 3. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless means No Server to Provision or Manage Scale with Usage Availability and Fault Tolerance Built-in No Idle Capacity to Pay for
  • 4. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless across the stack Database AccessCompute Developer Workflow
  • 5. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Lambda Changes in data state Requests to endpoints Changes in resource state Event Source Functions Node.js Python Java C# Go Ruby (*)
  • 6. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Typical Use Cases 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
  • 7. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hello AWS Lambda World KEEP CALM and WATCH the DEMO
  • 8. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. How do you Automatically Provision & Configure your serverless Infrastructure ? (a.k.a. DevOps on Serverless)
  • 9. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Meet SAM !
  • 10. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless Application Model CloudFormation extension optimized for serverless Serverless resource types: functions, APIs, tables Supports anything CloudFormation supports Open specification (Apache 2.0) https://github.com/awslabs/serverless-application-model
  • 11. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless Application Model (SAM) Creates a Lambda function with the referenced managed IAM policy, runtime, code at the referenced zip location, and handler as defined. Also creates an API Gateway and takes care of all mapping/permissions necessary Tells CloudFormation this is a template to transform 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: nodejs4.3 Policies: AmazonDynamoDBReadOnlyAccess Events: GetHtml: Type: Api Properties: Path: /{proxy+} Method: ANY ListTable: Type: AWS::Serverless::SimpleTable Creates a DynamodDB table
  • 12. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Introducing the SAM CLI Usage: sam [OPTIONS] COMMAND [ARGS]... Commands: validate Validate an AWS SAM template. init Initialize a serverless application with a... package Package an AWS SAM application. This is an alias for 'aws cloudformation package'. deploy Deploy an AWS SAM application. This is an alias for 'aws cloudformation deploy'. logs Fetch logs for a function local Run your Serverless application locally for...
  • 13. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Introducing the SAM CLI https://github.com/awslabs/aws-sam-cli pip install --user aws-sam-cli
  • 14. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Local Test sam local generate-event ... sam local invoke -event event.json sam local start-api #for API Gateway only (requires Docker)
  • 15. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Package and Deploy sam build sam package --s3-bucket <BUCKET> > pack.yaml sam deploy --template-file pack.yaml --stack-name <STACK> --capabilities CAPABILITY_IAM
  • 16. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hello AWS SAM CLI KEEP CALM and WATCH the DEMO
  • 17. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Automate Developer Workflow AWS CodeBuild AWS CodeCommit AWS Cloud9 AWS CodeDeploy AWS CodePipeline Develop Build & Test Deploy
  • 18. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. buildspec.yaml version: 0.1 environment_variables: plaintext: "INPUT_FILE": "saml.yaml "S3_BUCKET": my_bucket" phases: install: commands: - npm install pre_build: commands: - eslint *.js build: commands: - npm test post_build: commands: - sam package --template $INPUT_FILE --s3-bucket $S3_BUCKET --output-template post-saml.yaml artifacts: type: zip files: - post-saml.yaml - beta.json Variables Different phases of the build Create artifacts and store on them S3
  • 19. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Safe Deployment with SAM SAM integrates with Code Deploy Code Deploy integrates with Lambda Lambda Versioning supports traffic shifting
  • 20. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Safe Deployment with SAM Version = immutable deployment unit Alias = pointer to a version Lambda Function alias : LIVE version : 6 version : 7 90% 10%
  • 21. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Safe Deployment with SAM Preconfigured canary and linear deployments Auto alarm-based rollbacks Pre and post traffic validation hooks Monitor through the CodeDeploy console Natively supported in SAM!
  • 22. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Safe Deployment with SAM AWSTemplateFormatVersion: '2010-09-09 Transform: AWS::Serverless-2016-10-31 Resources: GetHtmlFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://demo-bucket/todo_list.zip Handler: index.js Runtime: nodejs6.1
  • 23. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWSTemplateFormatVersion: '2010-09-09 Transform: AWS::Serverless-2016-10-31 Globals: Function: AutoPublishAlias: Live DeploymentPreference: Type: Canary10Percent5Minutes Resources: GetHtmlFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://demo-bucket/todo_list.zip Handler: index.js Runtime: nodejs6.1 Policies: AmazonDynamoDBReadOnlyAccess Safe Deployment with SAM
  • 24. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWSTemplateFormatVersion: '2010-09-09 Transform: AWS::Serverless-2016-10-31 Globals: Function: AutoPublishAlias: Live DeploymentPreference: Type: Canary10Percent10Minutes Hooks: PreTraffic: !Ref CodeDeployHook_PreTest PostTraffic: !Ref CodeDeployHook_PostTest Alarms: - !Ref DurationAlarm - !Ref ErrorAlarm Resources: GetHtmlFunction: Type: AWS::Serverless::Function Properties: CodeUri: s3://demo-bucket/todo_list.zip Handler: index.js Runtime: nodejs6.1 Safe Deployment with SAM
  • 25. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Safe Deployments KEEP CALM and WATCH the DEMO
  • 26. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Orchestrate Develop Build & Test Deploy
  • 27. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CodePipeline Continuous delivery service for fast and reliable application updates Model and visualize your software release process Builds, tests, and deploys your code every time there is a code change Integrates with third-party tools and AWS
  • 28. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 29. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Serverless on AWS Compute Developer Workflow
  • 30. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Take Away 1. Use the Lambda console for quick creation and iteration of simple apps 2. Use AWS SAM to describe your serverless architecture 3. Plug SAM CLI into the IDE of your choice for testing and debugging 4. Build on SAM for CI/CD capabilities, including linear & canary deployments 5. Automate your deployment workflow using Code* family of services
  • 31. 息 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you S辿bastien Stormacq, Developer Evangelist @sebsto