59
© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates. Eric Johnson, Sr. Developer Advocate - Serverless May 28, 2020 Automating serverless application development workflows @edjgeek

Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Eric Johnson, Sr. Developer Advocate - Serverless

May 28, 2020

Automating serverless application

development workflows

@edjgeek

Page 2: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Who am I?

• Senior Developer Advocate – Serverless,

AWS

• @edjgeek

Page 3: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Session agenda

- What is CI/CD?

- Fresh Tracks architecture

- Tooling

- Testing

- Best practices

Page 4: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

What is CI/CD?

Page 5: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

What is CI/CD?

CI: Continuous Integration

CD: Continuous Delivery

CD: Continuous Deployment

Page 6: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline

Source Control Build Staging Production

Page 7: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline: continuous integration

Continuous integration

automated

Source Control Build Staging Production

Page 8: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline: continuous delivery

Continuous integration

Continuous delivery

Approved deploy

automated automated manual

Source Control Build Staging Production

Page 9: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline: continuous deployment

Continuous deployment

Continuous integration

Automated deploy

automated automated automated

Source Control Build Staging Production

Continuous delivery

Approved deploy

Page 10: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks architecture

Page 11: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks architecture

Page 12: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks folder structure

Client: Vuejs Application

Backend: Serverless

Page 13: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks folder structure

Client: Vuejs Application

Backend: Serverless

The client can be easily

separated into a separate

repository if needed

Page 14: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Tooling

Page 15: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Serverless Application Model

SAM

Page 16: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

SAM comes in 2 parts

Page 17: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

SAM comes in 2 parts

SAM templates SAM CLIUsing 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

https://aws.amazon.com/serverless/sam/

Page 18: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

SAM templates

AWSTemplateFormatVersion: '2010-09-09’

Transform: AWS::Serverless-2016-10-31

Resources:

GetProductsFunction:

Type: AWS::Serverless::Function

Properties:

Handler: index.getProducts

Runtime: nodejs12.x

CodeUri: src/

Policies:

- DynamoDBReadPolicy:

TableName: !Ref ProductTable

Events:

GetResource:

Type: HttpApi

Properties:

Path: /products/{productId}

Method: get

ProductTable:

Type: AWS::Serverless::SimpleTable

Just 20 lines to create:

• Lambda function

• IAM role

• API Gateway

• DynamoDB table

Page 19: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 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: nodejs12.x

CodeUri: src/

Policies:

- DynamoDBReadPolicy:

TableName: !Ref ProductTable

Events:

GetResource:

Type: HttpApi

Properties:

Path: /products/{productId}

Method: get

ProductTable:

Type: AWS::Serverless::SimpleTable

SAM templates

Amazon API Gateway

Lambda function

Table

Role

===

To become this

Allowing this

AWS Cloud

Page 20: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks

Roughly 90% of

this application

is managed and

deployed with

SAM.

Page 21: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks

Auth0 is

deployed

separately

The Amplify app

will be created

The client code

will be deployed

separately

Page 22: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Code repository

Page 23: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CodeCommit

• Fully-managed source

control service that hosts secure

Git-based repositories

• Allows teams to collaborate on

code in a secure and highly

scalable ecosystem

• Automatically encrypts your files in

transit and at rest

• Integrated with AWS Identity and

Access Management (IAM)

https://aws.amazon.com/codecommit/

Page 24: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Third party code repositories

private repo

Integrates with CodeBuild

and CodePipeline

Integrates with CodeBuild

Page 25: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

AWS Amplify Console

Deploying the client

Page 26: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

AWS Amplify Console

• Powered by Lambda@Edge,

Amazon S3, and Amazon

CloudFront

• Integrated CI/CD

• Build configurations

• Feature branch deployments

• Global availability (CDN)

• Basic password protection

AWS Lambda Amazon S3Amazon

CloudFront

Page 27: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Amplify Console buildspec.yaml

version: 1.0

env:

variables:

key: value

backend:

phases:

preBuild:

build:

postBuild:

frontend:

phases:

preBuild:

commands:

- *enter command*

build:

artifacts:

files:

- location

discard-paths: yes

baseDirectory:

cache:

customHeaders:

test:

phases:

preTest:

commands:

- *enter command*

test:

commands:

- *enter command*

postTest:

commands:

- *enter command*

artifacts:

files:

- location

- location

configFilePath: *location*

baseDirectory: *location*

Page 28: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Amplify Console buildspec.yaml;

version: 1.0

env:

variables:

key: value

backend:

phases:

preBuild:

build:

postBuild:

frontend:

phases:

preBuild:

commands:

- *enter command*

build:

artifacts:

files:

- location

discard-paths: yes

baseDirectory:

cache:

customHeaders:

test:

phases:

preTest:

commands:

- *enter command*

test:

commands:

- *enter command*

postTest:

commands:

- *enter command*

artifacts:

files:

- location

- location

configFilePath: *location*

baseDirectory: *location*

Specific to Amplify generated

architecture

Prepares client artifacts for

deployment

End to end testing

Deployment artifacts

Page 29: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Deploying the client

1. Developer commits code to

repository

2. Amplify console is triggered

3. Code is prepared and tests are run

according to the buildspec

specifications

4. The client is deployed

Page 30: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Deploying the client

Page 31: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CodePipeline

The orchestrator

Page 32: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

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

https://aws.amazon.com/codepipeline/

Page 33: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Example of full pipeline

This pipeline:

• Five stages

• Builds code artifact

• Three deployed to “environments”

• Uses SAM/CloudFormation to deploy

artifact and other AWS resources

• Has Lambda custom actions for testing

functions

• Integrates with a 3rd party tool/service

• Has a manual approval before deploying to

production

Dev AccountStaging Account

Production Account

Source

Source

GitHub i

Build

test-build-source

CodeBuild i

Deploy-Testing

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

Run-stubs

AWS Lambda i

Deploy-Staging

Deploy-Prod

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

Post-Deploy-Stack

AWS Lambda i

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

QA-Sign-Off

Manual Approval i

Review

Run-API-test

Runscope i

Page 34: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CodeBuild

Page 35: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CodeBuild

• Fully-managed build service that

can compile source code, run

tests, and produce software

packages

• Scales continuously and processes

multiple builds concurrently

• Can consume environment

variables from AWS SSM

Parameter Store

• Can run in your VPC and locally

• Supports dependency caching

https://aws.amazon.com/codebuild/

Page 36: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The buildspec.yaml file

version: 0.2variables:parameter-store:BUCKET_NAME: /CodeBuild/BucketName

phases:install:commands:- npm install

pre_build:commands:- eslint *.js

build:commands:- sam build

post_build:commands:- sam package –template-file template.yaml –s3-bucket $BUCKET_NAME –output-template out.yaml

artifacts:type: zipfiles:- out.yaml

Page 37: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The buildspec.yaml file

version: 0.2variables:parameter-store:BUCKET_NAME: /CodeBuild/BucketName

phases:install:commands:- npm install

pre_build:commands:- eslint *.js

build:commands:- sam build

post_build:commands:- sam package –template-file template.yaml –s3-bucket $BUCKET_NAME –output-template out.yaml

artifacts:type: zipfiles:- out.yaml

Prepare and test code

Deployment artifacts

Page 38: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks

Page 39: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh TracksCode built and tested

Page 40: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Artifacts

sam package –template-file template.yaml –s3-bucket $BUCKET_NAME –output-template out.yaml

Page 41: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CloudFormation

Deploying the backend

Page 42: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

AWS CloudFormation

• Infrastructure as code (IaC)

• Provides a common language for

you to describe and provision all

the infrastructure resources in your

cloud environment

• Build and rebuild your

infrastructure and applications,

without having to perform manual

actions or write custom scripts.

https://aws.amazon.com/cloudformation/

Page 43: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

CloudFormation deploy

1 2 3

A template is

submitted to

CloudFormation

A change set

is created and

validated

The change set

is executed to

create or

update a stack

Page 44: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

Testing

Page 45: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline: testing

Configure

and/or compile

Test Package

The build phase is a common place for testing.

Source Control Build Staging Production

Page 46: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The pipeline: testing

Configure

and/or compile

Test Package

Test Points

With serverless it is easy to test at different points in the pipeline.

Source Control Build Staging Production

Page 47: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Where and what to test

• Code review via Pull

Request

• Lint/syntax check

• Unit test pass

• Code successfully

compiles

• Application deploys

successfully

• Mocked/stubbed

integration tests

• Application deploys

successfully

• Test against real services

(potentially against

production dependencies)

• Run pre-traffic Lambda tests

• Deploy canaries

• Complete wait period

successfully

• Deploy 100%

• Run post-traffic Lambda

tests

Source

Source

GitHub i

Build

test-build-source

CodeBuild i

Deploy-Testing

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

Run-stubs

AWS Lambda i

Deploy-Staging

Deploy-Prod

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

Post-Deploy-Stack

AWS Lambda i

create-changeset

AWS CloudFormation i

execute-changeset

AWS CloudFormation i

QA-Sign-Off

Manual Approval i

Review

Run-API-test

Runscope i

Page 48: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Testing using safe deployments

MyLambdaFunction:Type: AWS::Serverless::FunctionProperties:Handler: index.handlerRuntime: nodejs12.xAutoPublishAlias: !Ref ENVIRONMENTDeploymentPreference:Type: Linear10PercentEvery10MinutesAlarms:# A list of alarms that you want to monitor- !Ref AliasErrorMetricGreaterThanZeroAlarm- !Ref LatestVersionErrorMetricGreaterThanZeroAlarm

Hooks:# Validation Lambda functions that are run before & after traffic shiftingPreTraffic: !Ref PreTrafficLambdaFunctionPostTraffic: !Ref PostTrafficLambdaFunction

Page 49: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

The deployment

Page 50: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates. © 2020, Amazon Web Services, Inc. or its Affiliates.

By the numbers

Page 51: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

By the numbers

Developers

1

Developers commit code to repository

CodeCommit

Page 52: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

By the numbers

Developers

1

2

2

Amplify Console builds and deploys client.

CodePipeline triggers and starts backend build

CodeCommit

Amplify Console

CodePipeline

Page 53: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

By the numbers

Developers

1

2

2 3

CodeBuild builds, tests and prepares code for

deployment

CodeCommit

Amplify Console

CodePipeline CodeBuild

Page 54: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

By the numbers

Developers

1

2

2 3 4

CodeCommit

Amplify Console

CodePipeline CodeBuildCloudFormation

CloudFormation deploys code using CodeDeploy

for traffic shifting

Page 55: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Fresh Tracks deployed

Page 56: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

CI/CD Partners

Page 57: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Final resources

AWS Serverless

slip.link/aws-serverless

Page 58: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Final resources

AWS Serverless YouTube Channel

slip.link/serverless

Page 59: Automating serverless application development workflows€¦ · 23-06-2020  · © 2020, Amazon Web Services, Inc. or its Affiliates. SAM templates AWSTemplateFormatVersion: '2010-09-09’

© 2020, Amazon Web Services, Inc. or its Affiliates.

Thank You!

@edjgeek