what’s new for serverless - awsmarketingbucket.s3-eu...
TRANSCRIPT
![Page 1: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/1.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Heitor Lessa
Specialist Solutions Architect, Amazon Web Services
What’s New for Serverless
@heitor_lessa
![Page 2: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/2.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Brief intro to Serverless
![Page 3: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/3.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Build and run
applications
without thinking about
servers
… pay per request not
for idle
“ Scales with usage
Never pay for idle
High availability
built-in
No servers
to provision
or manage
A serverless world…
![Page 4: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/4.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Applications
Services (anything)
Changes in
data state
Requests to
endpoints
Changes in
resource state
Event source Lambda function
Node.js
Python
Java
C#
Go
![Page 5: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/5.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Common Serverless Application Use Cases
AnalyticsOperational management
Live Dashboards
Data workflowsContent management
ETL workflows
Interactive BackendsMobile and web apps
Webhooks and Bots
Autonomous ITPolicy engines
Infrastructure management
![Page 6: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/6.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Services for Building Serverless Applications
AWS Lambda Amazon DynamoDB
Amazon SNS
Amazon API GatewayAmazon SQS
Amazon Kinesis
Amazon S3
Developer Tools and User Management
API Management and Real-time Backend Orchestration, Messaging and Queues Analytics
Compute Storage Database
Amazon Cognito
AWS AppSync Amazon Athena
AWS Lambda@Edge Amazon Aurora(preview)
AWS Step Functions
AWS CodeBuild AWS CodePipeline
AWS Cloud9
AWS CodeDeploy
AWS Serverless Application
Model (SAM)
AWS X-Ray
Open Source and
Third parties
![Page 7: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/7.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What’s New for Serverlessa.k.a In Case You Missed These Goodies!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
a.k.a In Case You Missed These Goodies!
![Page 8: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/8.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
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
![Page 9: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/9.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Concurrency metric in Amazon Cloudwatch
Per-function concurrency throttles
What you can do with it
1. Limit concurrency to legacy systems
2. Protect serverless production services
from other functions in the same account
3. Temporarily disable a function
4. Develop functions with limited billing and
“runaway” protection
Lambda – Concurrency controls
![Page 10: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/10.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda – Safe deployments with CodeDeploy
![Page 11: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/11.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda – Safe deployments with SAM/CodeDeploy
Globals:
Function:
Runtime: python3.6
AutoPublishAlias: live
DeploymentPreference:
Type: Linear10PercentEvery10Minutes
MyLambdaFunction:
Type: AWS::Serverless::Function
Properties:
Handler: app.lambda_handler
….
NEW!
![Page 12: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/12.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda – Safe deployments with SAM/CodeDeploy
Globals:
Function:
Runtime: python3.6
AutoPublishAlias: live
DeploymentPreference:
Type: Linear10PercentEvery10Minutes
Alarms:
# A list of alarms that you want to monitor
- !Ref AliasErrorMetricGreaterThanZeroAlarm
- !Ref LatestVersionErrorMetricGreaterThanZeroAlarm
Hooks:
# Validation Lambda functions that are run before & after traffic shifting
PreTraffic: !Ref PreTrafficLambdaFunction
PostTraffic: !Ref PostTrafficLambdaFunction
NEW!
![Page 13: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/13.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lambda – Multi-Account deployments reference
aws.amazon.com/blogs/compute/managing-cross-account-serverless-microservices/
![Page 14: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/14.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API Gateway
![Page 15: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/15.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API Gateway - Canary Support
API Clients All publicly
and privately
accessible
endpoints
Backends
in AWSv1
90%
v2
10%
api.mydomain.com/prod
10% traffic to new deployment of stage, rest to previous version
No changes to client
![Page 16: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/16.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API Gateway – New features summary
Your Virtual Private Cloud (VPC)
Endpoints
in your VPCAPI Gateway
Network
Load BalancerPrivate Link
Another AWS Account
Authorizer Backend
Another AWS Account
IAM Users
IAM Resource Policy
Mobile Apps
Websites
Services
IP/CIDR Block via
IAM Resource Policy
Cross-Account
Authorizer/Integ.
![Page 17: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/17.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AppSync
![Page 18: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/18.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AppSync – GA
AppSync General Availability across multiple regions
![Page 19: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/19.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GraphQL APIs
Open, declarative data-fetching specification
!= Graph database
Use NoSQL, Relational, HTTP, etc.
Traditional data-fetching GraphQL
/posts
/postInfo
/postJustTitle
/postsByAuthor
/postNameStartsWithX
/commentsOnPost
/posts
![Page 20: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/20.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
GraphQL Spec - Schema
{
"id": "1",
"name": "Get Milk",
“priority": "1"
},
{
"id": “2",
"name": “Go to gym",
“priority": “5"
},…
type Query {
getTodos: [Todo]
}
type Todo {
id: ID!
name: String
description: String
priority: Int
duedate: String
}
query {
getTodos {
id
name
priority
}
}
Model data with
application schema
Client requests what it
needs
Only that data is
returned
![Page 21: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/21.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AppSync – Feature summary
GraphQL
Schema
Upload
Schema
GraphQL
Query
Mutation
Subscription
Real-time
Offline
AppSync
API
Cognito
User Pool
Legacy
Application
Data sources
DynamoDB
Table
Lambda
Function
Elasticsearch
Service
Authorization
Any Provider
OIDC compliant
![Page 22: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/22.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Developer tooling
![Page 23: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/23.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Developer tooling – SAM CLIAWS CLI tool for local testing of serverless apps
Works with Lambda functions and
“proxy-style” APIs
Deep SAM template validation and
project bootstrapping for all runtimes
Uses open-source Docker-Lambda images to
mimic Lambda’s execution environment:
• Emulates timeout, memory limits, runtimes
github.com/awslabs/aws-sam-cli
![Page 24: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/24.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Developer tooling – CodeBuild Local Agent
Locally test and debug CodeBuild builds
Supports Artifacts, Curated CodeBuild images
and custom Docker images
docker pull amazon/aws-codebuild-local
docker run \-v /var/run/docker.sock:/var/run/docker.sock \-e "IMAGE_NAME=aws/codebuild/python:3.6.5" \-e "ARTIFACTS=/Users/myUser/build-artifacts" \-e "SOURCE=/Users/myUser/sample-app" \
amazon/aws-codebuild-local
aws.amazon.com/blogs/devops/announcing-local-build-support-for-aws-codebuild/
![Page 25: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/25.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resources
![Page 26: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/26.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Additional Resources
aws.amazon.com/about-aws/whats-new/2018/
aws.amazon.com/serverless/
![Page 27: What’s New for Serverless - awsmarketingbucket.s3-eu ...awsmarketingbucket.s3-eu-west-1.amazonaws.com/2018/Summit/Decks/T1S3... · Amazon API Gateway Amazon SQS Amazon Kinesis Amazon](https://reader030.vdocuments.us/reader030/viewer/2022040705/5e038a4daeda9a36da4a07ec/html5/thumbnails/27.jpg)
Tricky demo time