AWS Summit Milano 2018
Forza computazionale e applicazioni Serverless: costruisci ed esegui applicazioni senza preoccuparti dell'infrastruttura.
Speaker: Diego Natali, Solutions Architect AWS
13. Amazon API Gateway
Create a unified
API frontend for
multiple
microservices
Authenticate and
authorize
requests to a
backend
DDoS protection
and throttling for
your backend
Throttle, meter,
and monetize API
usage by third-
party developers
14. API Gateway Integrations
Internet
Mobile
apps
Websites
Services
AWS Lambda
functions
AWS
API Gateway Cache
Endpoints on
Amazon EC2
All publicly
accessible
endpoints
Amazon CloudWatch
Monitoring
Amazon
CloudFront
Any other
AWS service
Your
VPC
Endpoints
in your VPC
Regional API endpoints
15. AWS Step Functions
Easily coordinate multiple Lambda functions using visual workflows
Visualize in the
console
Define in JSON Monitor
executions
16. Benefits of Step Functions Orchestration
Change and add steps
without writing code to
evolve applications
and innovate faster
Coordinate and visualize
Lambda functions as a
series of steps to quickly
create serverless apps
Automatically trigger and
track each step at scale
and handle errors with
built-in retry and fallback
Productivity AgilityResilience
17. AWS Serverless Application Model (SAM)
• Simplified template driven deployment
model for serverless applications
• Supported serverless resource types:
functions, APIs, and tables
• Supports anything AWS CloudFormation
supports
• Open specification (Apache 2.0)
https://github.com/awslabs/serverless-application-model
18. SAM Template
Tells AWS CloudFormation this is a
SAM template it needs to transform
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
Creates a DynamoDB table with five
read & write units
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
35. What’s New in Serverless (cont.’d)
• Easy-to-use IDE in the cloud
• Built-in GitHub support
• Built-in Lambda blueprint support
• Built-in SAM Local:
• Local testing
• IDE debugging
• Deploy directly to Lambda or push
updates to GitHub
Cloud 9
NEW!
36. AWS Serverless Application Repository
• Search and browse ready-made apps and samples
• Customize open-source apps to get started quickly
• Share apps privately or publically
• Monetize APIs using the AWS Marketplace
• All apps powered by AWS SAM
42. Serverless Deployment Patterns Consideration Matrix
Consumer impact Rollback Event Model
Factors
Deployment
Speed
All at once All at once Redeploy
older version
Any event model
at low concurrency
rate
Immediate
Blue/Green All at once with some
level of production
environment testing
beforehand
Revert traffic
to OLD
Better for async
and sync event
models at medium
concurrency
workloads
Minutes to
hours of
validation and
then immediate
to customers
Canaries/
Linear
1-10% typical initial
traffic shift, then
phased increases or
all at once
Revert traffic
to OLD
Better for high
concurrency
workloads
Minutes to
hours