SlideShare a Scribd company logo
1 of 28
© 2020, Amazon Web Services, Inc. or its Affiliates.
What’s NewWith SAM?
Ben Smith
Senior Developer Advocate, AWS Serverless
@benjamin_l_s
© 2020, Amazon Web Services, Inc. or its Affiliates.
S
A
M
© 2020, Amazon Web Services, Inc. or its Affiliates.
Serverless
Application
Model
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM comes in 2 parts
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM comes in 2 parts
SAM templates SAM CLI
Using shorthand syntax to
express resources and event
source mappings, it provides
infrastructure as code (IaC)
for serverless applications.
Provides tooling for local
development, debugging,
build, packaging, and
deployment for serverless
applications
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAMTemplates
• Can mix in other CloudFormation resources
• i.e. Amazon S3, Amazon Kinesis, AWS Step
Functions
• Supports use of Parameters, Mappings, Outputs,
• Supports Intrinsic Functions
• ie: Ref, Sub, Join, Select, Split
• YAML or JSON
© 2020, Amazon Web Services, Inc. or its Affiliates.
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources:
GetProductsFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.getProducts
Runtime: nodejs10.x
CodeUri: src/
Policies:
- DynamoDBReadPolicy:
TableName: !Ref ProductTable
Events:
GetResource:
Type: Api
Properties:
Path: /products/{productId}
Method: get
ProductTable:
Type: AWS::Serverless::SimpleTable
In just 20 lines:
• Lambda function
• IAM role
• API Gateway
• DynamoDB table
SAMTemplates
© 2020, Amazon Web Services, Inc. or its Affiliates.
AWSTemplateFormatVersion: '2010-09-09’
Transform: AWS::Serverless-2016-10-31
Resources:
GetProductsFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.getProducts
Runtime: nodejs10.x
CodeUri: src/
Policies:
- DynamoDBReadPolicy:
TableName: !Ref ProductTable
Events:
GetResource:
Type: Api
Properties:
Path: /products/{productId}
Method: get
ProductTable:
Type: AWS::Serverless::SimpleTable
SAMTemplates
AWS Cloud
Amazon API Gateway
Lambda function
Table Role
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM Command
Line Interface
CLI tool for local development, debugging,
testing, deploying, and monitoring of serverless
applications
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
Minimized Deployment
Commands
This:
sam package --s3-bucket my-regional-bucket --
output-template-file out.yaml
sam deploy --template-file out.yaml --capabilities
CAPABILITY_IAM --stack-name MyStackName
> sam deploy
Is now this:
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
S3 Bucket Management
• SAM CLI now automatically creates a Bucket
> sam deploy
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• A new Interactive deployment process
> sam deploy –g (--guided)
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
The Guided Deployment
• Deployment config saved in samconfig.toml.
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
Updated User Interface
• More feedback and validation choices
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
Updated User Interface
• Developers can confirm changeset before
deploying
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI
Updated User Interface
• Console displays changes and outputs
© 2020, Amazon Web Services, Inc. or its Affiliates.
• SAM CLI outputs example
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI - FAQ
Backwards Compatibility ?
• SAM package still exists
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI - FAQ
Backwards Compatibility ?
• Parameters can be passed in for CICD
deployments
sam package --s3-bucket aws-sam-cli-managed-default-
samclisourcebucket-xic3fipuh9n9 --output-template-file
out.yaml
sam deploy --template-file out.yaml --capabilities
CAPABILITY_IAM --stack-name sam-app --region us-west-2
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI - FAQ
How many buckets are
Created ?
1 bucket per Region for a root level account
© 2020, Amazon Web Services, Inc. or its Affiliates.
SAM CLI - FAQ
What if samconfig.toml
is deleted ?
• SAM treats the application as new.
• Use the -g flag to reconfigure the application.
© 2020, Amazon Web Services, Inc. or its Affiliates.
Summary
• Streamlining the deployment process
• Removing the need to manage an S3 bucket
• Providing clear deployment feedback and data
Latest version of SAM CLI makes serverless development easier for developers by:
© 2020, Amazon Web Services, Inc. or its Affiliates.
Thank you
Ben Smith
Senior Developer Advocate, AWS Serverless
@benjamin_l_s

More Related Content

Similar to AWS re:Invent serverless recap day: What's new with SAM

Continuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero DowntimeContinuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero DowntimeCasey Lee
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinBoaz Ziniman
 
AWS DevDay Berlin - Automating building blocks choices you will face with con...
AWS DevDay Berlin - Automating building blocks choices you will face with con...AWS DevDay Berlin - Automating building blocks choices you will face with con...
AWS DevDay Berlin - Automating building blocks choices you will face with con...Cobus Bernard
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateAmazon Web Services
 
AWS DevDay Vienna - Automating building blocks choices you will face with con...
AWS DevDay Vienna - Automating building blocks choices you will face with con...AWS DevDay Vienna - Automating building blocks choices you will face with con...
AWS DevDay Vienna - Automating building blocks choices you will face with con...Cobus Bernard
 
What can you do with Serverless in 2020
What can you do with Serverless in 2020What can you do with Serverless in 2020
What can you do with Serverless in 2020Boaz Ziniman
 
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...Amazon Web Services Korea
 
Serverless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet UpServerless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet UpAmazon Web Services
 
Ci/CD for AWS Lambda Projects - JLM CTO Club
Ci/CD for AWS Lambda Projects - JLM CTO ClubCi/CD for AWS Lambda Projects - JLM CTO Club
Ci/CD for AWS Lambda Projects - JLM CTO ClubBoaz Ziniman
 
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...Amazon Web Services
 
Serverless-First Function: Serverless application security
Serverless-First Function: Serverless application securityServerless-First Function: Serverless application security
Serverless-First Function: Serverless application securityRobSutter2
 
CI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud MeetupCI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud MeetupBoaz Ziniman
 
AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...Cobus Bernard
 
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...Amazon Web Services
 
AWS Startup Garage - Building your MVP on AWS
AWS Startup Garage - Building your MVP on AWSAWS Startup Garage - Building your MVP on AWS
AWS Startup Garage - Building your MVP on AWSCobus Bernard
 
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.020191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0Amazon Web Services Japan
 
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftOperationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftAmazon Web Services
 
Private Equity Value Creation Carve Outs, Divestitures and mergers
Private Equity Value Creation Carve Outs, Divestitures and mergersPrivate Equity Value Creation Carve Outs, Divestitures and mergers
Private Equity Value Creation Carve Outs, Divestitures and mergersTom Laszewski
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureMassimo Ferre'
 

Similar to AWS re:Invent serverless recap day: What's new with SAM (20)

Continuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero DowntimeContinuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero Downtime
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit Berlin
 
AWS DevDay Berlin - Automating building blocks choices you will face with con...
AWS DevDay Berlin - Automating building blocks choices you will face with con...AWS DevDay Berlin - Automating building blocks choices you will face with con...
AWS DevDay Berlin - Automating building blocks choices you will face with con...
 
CI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and FargateCI/CD with AWS Developer Tools and Fargate
CI/CD with AWS Developer Tools and Fargate
 
AWS DevDay Vienna - Automating building blocks choices you will face with con...
AWS DevDay Vienna - Automating building blocks choices you will face with con...AWS DevDay Vienna - Automating building blocks choices you will face with con...
AWS DevDay Vienna - Automating building blocks choices you will face with con...
 
What can you do with Serverless in 2020
What can you do with Serverless in 2020What can you do with Serverless in 2020
What can you do with Serverless in 2020
 
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...
[AWS Innovate 온라인 컨퍼런스] Kubernetes와 SageMaker를 활용하여 Machine Learning 워크로드 관리하...
 
Serverless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet UpServerless-AWS SAM CLI Session: Developer Meet Up
Serverless-AWS SAM CLI Session: Developer Meet Up
 
Ci/CD for AWS Lambda Projects - JLM CTO Club
Ci/CD for AWS Lambda Projects - JLM CTO ClubCi/CD for AWS Lambda Projects - JLM CTO Club
Ci/CD for AWS Lambda Projects - JLM CTO Club
 
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
Serverless Application Debugging and Delivery Best Practices (DEV307-R1) - AW...
 
Serverless-First Function: Serverless application security
Serverless-First Function: Serverless application securityServerless-First Function: Serverless application security
Serverless-First Function: Serverless application security
 
CI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud MeetupCI/CD for AWS Lambda Projects - IsraelCloud Meetup
CI/CD for AWS Lambda Projects - IsraelCloud Meetup
 
AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...
 
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...
Deploy and scale your first cloud application with Amazon Lightsail - CMP202 ...
 
AWS Startup Garage - Building your MVP on AWS
AWS Startup Garage - Building your MVP on AWSAWS Startup Garage - Building your MVP on AWS
AWS Startup Garage - Building your MVP on AWS
 
Devops on serverless
Devops on serverlessDevops on serverless
Devops on serverless
 
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.020191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
20191126 AWS Black Belt Online Seminar Amazon AppStream 2.0
 
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up LoftOperationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
Operationalizing Microsoft Workloads, AWS Federal Pop-Up Loft
 
Private Equity Value Creation Carve Outs, Divestitures and mergers
Private Equity Value Creation Carve Outs, Divestitures and mergersPrivate Equity Value Creation Carve Outs, Divestitures and mergers
Private Equity Value Creation Carve Outs, Divestitures and mergers
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
 

Recently uploaded

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)Wonjun Hwang
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...panagenda
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfAnubhavMangla3
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 

Recently uploaded (20)

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdfFrisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
Frisco Automating Purchase Orders with MuleSoft IDP- May 10th, 2024.pptx.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 

AWS re:Invent serverless recap day: What's new with SAM

  • 1. © 2020, Amazon Web Services, Inc. or its Affiliates. What’s NewWith SAM? Ben Smith Senior Developer Advocate, AWS Serverless @benjamin_l_s
  • 2. © 2020, Amazon Web Services, Inc. or its Affiliates. S A M
  • 3. © 2020, Amazon Web Services, Inc. or its Affiliates. Serverless Application Model
  • 4. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM comes in 2 parts
  • 5. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM comes in 2 parts SAM templates SAM CLI Using shorthand syntax to express resources and event source mappings, it provides infrastructure as code (IaC) for serverless applications. Provides tooling for local development, debugging, build, packaging, and deployment for serverless applications
  • 6. © 2020, Amazon Web Services, Inc. or its Affiliates. SAMTemplates • Can mix in other CloudFormation resources • i.e. Amazon S3, Amazon Kinesis, AWS Step Functions • Supports use of Parameters, Mappings, Outputs, • Supports Intrinsic Functions • ie: Ref, Sub, Join, Select, Split • YAML or JSON
  • 7. © 2020, Amazon Web Services, Inc. or its Affiliates. AWSTemplateFormatVersion: '2010-09-09’ Transform: AWS::Serverless-2016-10-31 Resources: GetProductsFunction: Type: AWS::Serverless::Function Properties: Handler: index.getProducts Runtime: nodejs10.x CodeUri: src/ Policies: - DynamoDBReadPolicy: TableName: !Ref ProductTable Events: GetResource: Type: Api Properties: Path: /products/{productId} Method: get ProductTable: Type: AWS::Serverless::SimpleTable In just 20 lines: • Lambda function • IAM role • API Gateway • DynamoDB table SAMTemplates
  • 8. © 2020, Amazon Web Services, Inc. or its Affiliates. AWSTemplateFormatVersion: '2010-09-09’ Transform: AWS::Serverless-2016-10-31 Resources: GetProductsFunction: Type: AWS::Serverless::Function Properties: Handler: index.getProducts Runtime: nodejs10.x CodeUri: src/ Policies: - DynamoDBReadPolicy: TableName: !Ref ProductTable Events: GetResource: Type: Api Properties: Path: /products/{productId} Method: get ProductTable: Type: AWS::Serverless::SimpleTable SAMTemplates AWS Cloud Amazon API Gateway Lambda function Table Role
  • 9. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM Command Line Interface CLI tool for local development, debugging, testing, deploying, and monitoring of serverless applications
  • 10. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI Minimized Deployment Commands This: sam package --s3-bucket my-regional-bucket -- output-template-file out.yaml sam deploy --template-file out.yaml --capabilities CAPABILITY_IAM --stack-name MyStackName > sam deploy Is now this:
  • 11. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI S3 Bucket Management • SAM CLI now automatically creates a Bucket > sam deploy
  • 12. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • A new Interactive deployment process > sam deploy –g (--guided)
  • 13. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 14. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 15. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 16. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 17. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 18. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI The Guided Deployment • Deployment config saved in samconfig.toml.
  • 19. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI Updated User Interface • More feedback and validation choices
  • 20. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI Updated User Interface • Developers can confirm changeset before deploying
  • 21. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI Updated User Interface • Console displays changes and outputs
  • 22. © 2020, Amazon Web Services, Inc. or its Affiliates. • SAM CLI outputs example
  • 23. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI - FAQ Backwards Compatibility ? • SAM package still exists
  • 24. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI - FAQ Backwards Compatibility ? • Parameters can be passed in for CICD deployments sam package --s3-bucket aws-sam-cli-managed-default- samclisourcebucket-xic3fipuh9n9 --output-template-file out.yaml sam deploy --template-file out.yaml --capabilities CAPABILITY_IAM --stack-name sam-app --region us-west-2
  • 25. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI - FAQ How many buckets are Created ? 1 bucket per Region for a root level account
  • 26. © 2020, Amazon Web Services, Inc. or its Affiliates. SAM CLI - FAQ What if samconfig.toml is deleted ? • SAM treats the application as new. • Use the -g flag to reconfigure the application.
  • 27. © 2020, Amazon Web Services, Inc. or its Affiliates. Summary • Streamlining the deployment process • Removing the need to manage an S3 bucket • Providing clear deployment feedback and data Latest version of SAM CLI makes serverless development easier for developers by:
  • 28. © 2020, Amazon Web Services, Inc. or its Affiliates. Thank you Ben Smith Senior Developer Advocate, AWS Serverless @benjamin_l_s