SlideShare uma empresa Scribd logo
1 de 65
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Adrian Hornsby, Cloud Architecture Evangelist
Serverless Architectural Patterns
@adhorn
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Session objectives
1. Understand Serverless Key Concepts.
2. Understand Event Processing Architecture.
3. Understand Operation Automation Architecture.
4. Understand Web Application Architecture.
5. Understand Data Processing Architecture.
1. Kinesis-based apps.
2. IoT-based apps.
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serverless Key Concepts
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
No servers to provision
or manage
Scales with usage
Never pay for idle Availability and fault
tolerance built in
Serverless means…
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spectrum of AWS offerings
AWS
Lambda
Amazon
Kinesis
Amazon
S3
Amazon API
Gateway
Amazon
SQS
Amazon
DynamoDB
AWS IoT
Amazon
EMR
Amazon
ElastiCache
Amazon
RDS
Amazon
Redshift
Amazon ES
Managed Serverless
Amazon EC2
Microsoft SQL
Server
“On EC2”
Amazon
Cognito
Amazon
CloudWatch
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Regional services
AZ1 AZ2 AZ3
Service XYZ
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Anatomy of a Lambda function
Handler() function
Function to be executed
upon invocation
Event object
Data sent during
Lambda Function
Invocation
Context object
Methods available to
interact with runtime
information (request ID,
log group, etc.)
def handler(event, context):
return {
"message": ”Hello World!",
"event": event
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda execution model
Synchronous (push) Asynchronous (event) Stream-based
Amazon
API Gateway
AWS Lambda
function
Amazon
DynamoDB
Amazon
SNS
/api/hello
AWS Lambda
function
Amazon
S3
reqs
Amazon
Kinesis
changes
AWS Lambda
service
function
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lambda Best Practices
• Minimize package size to necessities
• Separate the Lambda handler from core logic
• Use Environment Variables to modify operational
behavior
• Self-contain dependencies in your function package
• Leverage “Max Memory Used” to right-size your
functions
• Delete large unused functions (75GB limit)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS X-Ray Integration with Serverless
• Lambda instruments incoming requests for
all supported languages
• Lambda runs the X-Ray daemon on all
languages with an SDK
var AWSXRay = require(‘aws-xray-sdk-core‘);
AWSXRay.middleware.setSamplingRules(‘sampling-rules.json’);
var AWS = AWSXRay.captureAWS(require(‘aws-sdk’));
S3Client = AWS.S3();
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
X-Ray Trace Example
Chalice
awslabs/aws-serverless-express
awslabs/aws-serverless-java-container
Serverless Frameworks
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event Processing Architecture
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event driven
A B CEvent A on B triggers C
Invocation
Lambda functions
Action
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event-driven platform
S3 event
notifications
DynamoDB
Streams
Kinesis
events
Cognito
events
SNS
events
Custom
events
CloudTrail
events
LambdaDynamoDB
Kinesis S3
Any custom
Invoked in response to events
- Changes in data
- Changes in state
Redshift
SNS
Access any service,
including your own
Such as…
Lambda functions
CloudWatch
events
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Event-driven actions
Lambda:
Resize Images
Users upload photos
S3:
Source Bucket
S3:
Destination Bucket
Triggered on
PUTs
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Source data
Source data
Source data
Source data
S3 Data Staging
Layer
/data/source-raw
S3 Data Staging
Layer
/data/source-validated
Lambda: Input
Validation and
Conversion layer
Lambda: Input
Tracking layer
State Management
Store
Event-driven controls
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Step Functions:
Orchestrate a Serverless processing
workflow using AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Operation Automation Architecture
https://github.com/awslabs/lambda-refarch-imagerecognition
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Automation characteristics
• Periodic jobs
• Event triggered workflows
• Enforce security policies
• Audit and notification
• Respond to alarms
• Extend AWS functionality
… All while being Highly Available, Scalable and Auditable
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto tagging resources as they start
AWS Lambda:
Update Tag
Amazon CloudWatch Events:
Rule Triggered
Amazon EC2 Instance
State Changes
Amazon DynamoDB:
EC2 Instance Properties
Tag: N/A
Amazon EC2 Instance
State Changes
Tag:
Owner=userName
PrincipalID=aws:userid
• AMI
• Instances
• Snapshot
• Volume
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
CapitalOne Cloud Custodian
AWS Lambda:
Policy & Compliance Rules
Amazon CloudWatch Events:
Rules Triggered
AWS CloudTrail:
Events
Amazon SNS:
Alert Notifications
Amazon CloudWatch Logs:
Logs
Read more here: http://www.capitalone.io/cloud-custodian/docs/index.html
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scheduled backup operation
AWS Lambda:
Backup Rules
Amazon CloudWatch Events:
Scheduled Trigger
Amazon Redshift Cluster XYZ Snapshot
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scheduled AI jobs
Amazon
S3
AWS
Lambda
CloudWatch:
Time-based events
Amazon
Polly
https://github.com/adhorn/pollycast
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Ops Automator
CloudWatch:
Time-based events
Lambda:
Event handler
Lambda:
Task executors
SNS:
Error & warning notifications
Resources in multiple AWS
Regions and Accounts
EC2 Instances
Tags
OpsAutomatorTaskList CreateSnapshot
DynamoDB:
Task configuration & tracking
CloudWatch:
Logs
Redshift Clusters
https://aws.amazon.com/answers/infrastructure-management/ops-automator/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Autodesk - Tailor
Serverless AWS Account Provisioning and Management Service:
• Automates AWS Account creation,
• Configures IAM, CloudTrail, AWS Config, Direct Connect, and VPC
• Enforces corporate standards
• Audit for compliance
Provisions new Accounts in 10 minutes vs 10 hours in earlier manual process
Open source and extensible: https://github.com/alanwill/aws-tailor
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Web Application Architecture
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Web application
Data stored in
Amazon
DynamoDB
Dynamic content
in AWS Lambda
Amazon API
Gateway
Browser
Amazon
CloudFront
Amazon
S3
Amazon
Cognito
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bustle Achieves 84% Cost Savings with
AWS Lambda
Bustle is a news, entertainment, lifestyle, and fashion
website targeted towards women.
With AWS Lambda, we
eliminate the need to worry
about operations
Tyler Love
CTO, Bustle
”
“ • Bustle had trouble scaling and
maintaining high availability for its
website without heavy management
• Moved to serverless architecture using
AWS Lambda and Amazon API
Gateway
• Experienced approximately 84% in cost
savings
• Engineers are now focused on
innovation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon API
Gateway AWS
Lambda
Amazon
DynamoDB
Amazon
S3
Amazon
CloudFront
• Bucket Policies
• ACLs
• OAI
• Geo-Restriction
• Signed Cookies
• Signed URLs
• DDOS Protection
IAM
AuthZ
IAM
• Throttling
• Caching
• Usage Plans
• ACM
Browser
Amazon Cognito
Serverless web app security
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Custom Authorizer
Lambda function
Client
Lambda
function
AmazonAPI
Gateway
Amazon
DynamoDB
AWS Identity &
Access Management
SAML
Two types:
• TOKEN - authorization token
passed in a header
• REQUEST – all headers, query
strings, paths, stage variables or
context variables.
Custom Authorizers
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
us-west-2
us-east-1
Client
Amazon
Route 53
Regional
API
Endpoint
Regional
API
Endpoint
Custom
Domain
Name
Custom
Domain
Name
API Gateway
API Gateway
Lambda
Lambda
Multi-Region with API Gateway
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Processing Architecture
Kinesis-based apps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Processing real-time, streaming data
• Durable
• Continuous
• Fast
• Correct
• Reactive
• Reliable
What are the key requirements?
Ingest Transform Analyze React Persist
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon S3
Amazon S3- Foundations for Data Processing
Ingest Transform Analyze React Persist
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Standard
Active data Archive dataInfrequently accessed data
Standard - Infrequent Access Amazon Glacier
Choice of storage classes on S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
S3 Standard
• Big data analysis
• Content distribution
• Static website
hosting
Standard - IA
• Backup & archive
• Disaster recovery
• File sync & share
• Long-retained data
Amazon Glacier
• Long term archives
• Digital preservation
• Magnetic tape
replacement
Active data Archive dataInfrequently accessed data
Choice of storage classes on S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis makes it easy to work with real-
time streaming data
Amazon Kinesis
Streams
• For Technical Developers
• Collect and stream data
for ordered, replay-able,
real-time processing
Amazon Kinesis
Firehose
• For all developers, data
scientists
• Easily load massive
volumes of streaming data
into Amazon S3, Redshift,
ElasticSearch
Amazon Kinesis
Analytics
• For all developers, data
scientists
• Easily analyze data
streams using standard
SQL queries
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Producers Consumers
Shard 1
Shard 2
Shard n
Shard 3
…
…
Write: 1MB Read: 2MB
** A shard is a group of data records in a stream
Amazon Kinesis
Amazon Kinesis under the hood
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Producers Amazon S3
Amazon ES
Amazon Redshift
Amazon Kinesis Firehose
Real-time analytics
Amazon
Kinesis
Stream
Amazon
Kinesis
Analytics
Amazon
Cognito
Amazon
Kinesis
Stream
Amazon
DynamoDB
Amazon
Lambda
Amazon S3
JavaScript
SDK
Real-time Analytics Demo
http://quad.adhorn.me
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Input
Source JSON Data
• Once per second, using JavaScript SDK:
• Unique Cognito ID (anonymous user)
• OS
• Quadrant
• Data sent to Kinesis Stream
Amazon
Kinesis
Stream
Amazon
Cognito
Amazon
S3
JavaScript
SDK
{
"recordTime": 1486505943.204,
"cognitoId": "us-east-1:3626e211-d2a3-447b-8231-e1f4e0486f44",
"os": "Android",
"quadrant": "A”,
…
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How is raw data mapped to a schema?
Amazon Kinesis stream Amazon KinesisAnalytics
cognitoID os quadrant
<guid1> Android A
<guid2> iOS B
Source Data for Kinesis Analytics
{
"recordTime": 1486505943.204,
"cognitoId": "us-east-1:<guid>",
"os": "Android",
"quadrant": "A"
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How is streaming data accessed with SQL?
STREAM
• Analogous to a TABLE
• Represents continuous data flow
CREATE OR REPLACE STREAM DISTINCT_USER_STREAM(
COGNITO_ID VARCHAR(64),
DEVICE VARCHAR(32),
OS VARCHAR(32),
QUADRANT char(1),
DT TIMESTAMP);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How is streaming data accessed with SQL?
PUMP
• Continuous INSERT query
• Inserts data from one in-application stream to another
CREATE OR REPLACE PUMP "DISTINCT_USER_PUMP" AS
INSERT INTO "DISTINCT_USER_STREAM"
SELECT STREAM DISTINCT
"cognitoId",
...
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How do we get distinct user records?
Use PUMP to insert distinct records into in-app STREAM
CREATE OR REPLACE PUMP "DISTINCT_USER_PUMP" AS
INSERT INTO "DISTINCT_USER_STREAM"
SELECT STREAM DISTINCT
"cognitoId",
"device",
"os",
"quadrant",
FLOOR(s.ROWTIME TO SECOND)
FROM "SOURCE_SQL_STREAM_001" s;
DISTINCT_USERS_STREAM
•COGNITO_ID
•OS
•QUADRANT
•DT
SOURCE_STREAM
•cognitoID
•os
•quadrant
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How do we aggregate per second?
• Tumbling window, group by time period
CREATE OR REPLACE PUMP "OUTPUT_PUMP" AS
INSERT INTO "DESTINATION_SQL_STREAM"
SELECT STREAM
COUNT(dus.COGNITO_ID) AS UNIQUE_USER_COUNT,
COUNT((CASE WHEN dus.OS = 'Android' THEN COGNITO_ID ELSE null END)) AS ANDROID_COUNT,
COUNT((CASE WHEN dus.OS = 'iOS' THEN COGNITO_ID ELSE null END)) AS IOS_COUNT,
COUNT((CASE WHEN dus.OS = 'Windows Phone' THEN COGNITO_ID ELSE null END)) AS WINDOWS_PHONE_COUNT,
COUNT((CASE WHEN dus.OS = 'other' THEN COGNITO_ID ELSE null END)) AS OTHER_OS_COUNT,
COUNT((CASE WHEN dus.QUADRANT = 'A' THEN COGNITO_ID ELSE null END)) AS QUADRANT_A_COUNT,
COUNT((CASE WHEN dus.QUADRANT = 'B' THEN COGNITO_ID ELSE null END)) AS QUADRANT_B_COUNT,
COUNT((CASE WHEN dus.QUADRANT = 'C' THEN COGNITO_ID ELSE null END)) AS QUADRANT_C_COUNT,
COUNT((CASE WHEN dus.QUADRANT = 'D' THEN COGNITO_ID ELSE null END)) AS QUADRANT_D_COUNT,
ROWTIME
FROM "DISTINCT_USER_STREAM" dus
GROUP BY
FLOOR(dus.ROWTIME TO SECOND);
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Comparing Types of Windows
• Output created at the end of the window
• The output of the window will be single event based on the aggregate
function used
Tumbling window
Aggregate per time interval
Sliding window
Windows constantly re-evaluated
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Output to Kinesis Stream
MENTION_COUNT_STREAM
•UNIQUE_USER_COUNT
•ANDROID_COUNT
•… Amazon
Kinesis Stream
{
"unique_user_count": 96,
"android_count": 50,
"ios_count": 46,
"android_count": 50,
"quadrant_a_count": 80,
"quadrant_b_count ": 10,
"quadrant_c_count ": 3,
"quadrant_d_count ": 3
}
1 record, every second
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Persist aggregated data in DynamoDB
Kinesis Stream Lambda DynamoDB
event.Records.forEach((record) => {
const payload = new Buffer(record.kinesis.data, 'base64').toString('ascii');
var docClient = new AWS.DynamoDB.DocumentClient();
var table = "user-quadrant-data";
var data = JSON.parse(payload);
var params = {
TableName: table,
Item:{
"dataType": "quadrantRollup",
"windowtime": (new Date(data.WINDOW_TIME)).getTime(),
"userCount": data.UNIQUE_USER_COUNT,
"quadrantA": data.QUADRANT_A_COUNT,
"quadrantB": data.QUADRANT_B_COUNT, ...
}
};
docClient.put(params, function(err, data) { ...
Lambda event source mapping
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Processing a Kinesis Streams with AWS Lambda
Shard 1 Shard 2 Shard 3 Shard 4 Shard n
Kinesis Stream
. . .
. . .
• Single instance of Lambda function per shard
• Polls shard once per second
• Lambda function instances created and removed automatically as stream is scaled
Gets Records
1x per sec
10k records
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kinesis Firehose Amazon S3 Amazon Athena AWS QuickSight
Users browse content
Logs Analytics
https://github.com/adhorn/logtoes
Amazon Athena
Amazon Athena
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Data Processing Architecture
IoT-based apps
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Sensor data collection
IoT
rules
IoT
actions
MQTT
Amazon S3:
Raw records
Amazon Kinesis Firehose:
Delivery stream
Amazon S3:
Batched records
Amazon Kinesis Streams:
Real-time stream
AWS IoT:
Data collection
IoT Sensors
Real-time analytics
applications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS
Lambda
Notifications:
Amazon SNS
DynamoDB
AWS IoTSensors Control System
Anomaly Detection Using AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS IoT IoT
shadow
Amazon
Cognito
MQTT over WebSockets
AWS
LambdaAlexa
Amazon
S3
Interactive Serverless applications
http://bit.ly/adhornlightbulb
Interactive Serverless applications
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Further Reading
Optimizing Enterprise Economics with Serverless Architectures
https://d0.awsstatic.com/whitepapers/optimizing-enterprise-economics-serverless-architectures.pdf
Serverless Architectures with AWS Lambda
https://d1.awsstatic.com/whitepapers/serverless-architectures-with-aws-lambda.pdf
Serverless Applications Lens - AWS Well-Architected Framework
https://d1.awsstatic.com/whitepapers/architecture/AWS-Serverless-Applications-Lens.pdf
Streaming Data Solutions on AWS with Amazon Kinesis
https://d1.awsstatic.com/whitepapers/whitepaper-streaming-data-solutions-on-aws-with-amazon-kinesis.pdf
AWS Serverless Multi-Tier Architectures
https://d1.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Archiectures.pdf
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
More info:
https://aws.amazon.com/serverless/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thanks you!

Mais conteúdo relacionado

Mais procurados

Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAmazon Web Services
 
Build a Serverless Web Application in One Day
Build a Serverless Web Application in One DayBuild a Serverless Web Application in One Day
Build a Serverless Web Application in One DayAmazon Web Services
 
Deep Dive on Serverless Application Development
Deep Dive on Serverless Application DevelopmentDeep Dive on Serverless Application Development
Deep Dive on Serverless Application DevelopmentAmazon Web Services
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSAmazon Web Services
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWSAmazon Web Services
 
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...Amazon Web Services
 
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...Amazon Web Services
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceAmazon Web Services
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWSDonnie Prakoso
 
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017Amazon Web Services
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSAmazon Web Services
 
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesAmazon Web Services
 
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Amazon Web Services
 
SRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessSRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessAmazon Web Services
 
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesSRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesAmazon Web Services
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesAmazon Web Services
 

Mais procurados (20)

Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
Build a Serverless Web Application in One Day
Build a Serverless Web Application in One DayBuild a Serverless Web Application in One Day
Build a Serverless Web Application in One Day
 
AI: State of the Union
AI: State of the UnionAI: State of the Union
AI: State of the Union
 
Deep Dive on Serverless Application Development
Deep Dive on Serverless Application DevelopmentDeep Dive on Serverless Application Development
Deep Dive on Serverless Application Development
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Getting Started with Docker On AWS
Getting Started with Docker On AWSGetting Started with Docker On AWS
Getting Started with Docker On AWS
 
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
Getting Started with Serverless Computing Using AWS Lambda - ENT332 - re:Inve...
 
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...
SRV315_How We Built a Mission-Critical, Serverless File Processing Pipeline f...
 
Getting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container ServiceGetting Started with Amazon EC2 Container Service
Getting Started with Amazon EC2 Container Service
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWS
 
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017
Monitoring and Troubleshooting in a Serverless World - SRV303 - re:Invent 2017
 
Introducing Amazon EKS
Introducing Amazon EKSIntroducing Amazon EKS
Introducing Amazon EKS
 
CON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWSCON319_Interstella GTC CICD for Containers on AWS
CON319_Interstella GTC CICD for Containers on AWS
 
HLC308_Refactoring to the Cloud
HLC308_Refactoring to the CloudHLC308_Refactoring to the Cloud
HLC308_Refactoring to the Cloud
 
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web ServicesCMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
CMP323_AWS Batch Easy & Efficient Batch Computing on Amazon Web Services
 
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
 
SRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with ServerlessSRV310_Designing Microservices with Serverless
SRV310_Designing Microservices with Serverless
 
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in MinutesSRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
SRV314_Building a Serverless Pipeline to Transcode a Two-Hour Video in Minutes
 
CON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized ServicesCON320_Monitoring, Logging and Debugging Containerized Services
CON320_Monitoring, Logging and Debugging Containerized Services
 

Semelhante a Serverless Architectural Patterns

Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSServerless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSCodeOps Technologies LLP
 
Serverless Architecture and Best Practices
Serverless Architecture and Best PracticesServerless Architecture and Best Practices
Serverless Architecture and Best PracticesAmazon Web Services
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWSAdrian Hornsby
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWSAdrian Hornsby
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Boaz Ziniman
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...AWS Germany
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveAmazon Web Services
 
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL MeetupIntroduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL MeetupBoaz Ziniman
 
Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicessaifam
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Brendan Bouffler
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureJohn Yeung
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Amazon Web Services
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...Amazon Web Services
 
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)Amazon Web Services
 
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...Amazon Web Services
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Amazon Web Services
 
AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless Roman Plessl
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Amazon Web Services
 
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitBuilding Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitAmazon Web Services
 

Semelhante a Serverless Architectural Patterns (20)

Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWSServerless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
 
Serverless Architecture and Best Practices
Serverless Architecture and Best PracticesServerless Architecture and Best Practices
Serverless Architecture and Best Practices
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWS
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
 
Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda Serverless use cases with AWS Lambda
Serverless use cases with AWS Lambda
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
 
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to MoveGPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
GPSTEC314-GPS From Monolithic to Serverless - Why and How to Move
 
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL MeetupIntroduction to Serverless Computing and AWS Lambda - AWS IL Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
 
Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practices
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018Genomics on aws-webinar-april2018
Genomics on aws-webinar-april2018
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless Architecture
 
Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM Build and Deploy Serverless Applications with AWS SAM
Build and Deploy Serverless Applications with AWS SAM
 
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
The Future of Enterprise Applications is Serverless (ENT314-R1) - AWS re:Inve...
 
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
How to Handle PCI and HIPAA Compliance with Serverless Architecture( SRV214)
 
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
Serverless Architectural Patterns and Best Practices (ARC305-R2) - AWS re:Inv...
 
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
Build and Deploy Serverless Applications with AWS SAM - SRV316 - Chicago AWS ...
 
AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless AWSomeDay Zurich 2018 - How to go serverless
AWSomeDay Zurich 2018 - How to go serverless
 
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
Create a Serverless Image Processing Platform - ARC326 - re:Invent 2017
 
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS SummitBuilding Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
Building Serverless Enterprise Applications - SRV315 - Anaheim AWS Summit
 

Mais de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Serverless Architectural Patterns

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Adrian Hornsby, Cloud Architecture Evangelist Serverless Architectural Patterns @adhorn
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Session objectives 1. Understand Serverless Key Concepts. 2. Understand Event Processing Architecture. 3. Understand Operation Automation Architecture. 4. Understand Web Application Architecture. 5. Understand Data Processing Architecture. 1. Kinesis-based apps. 2. IoT-based apps.
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serverless Key Concepts
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No servers to provision or manage Scales with usage Never pay for idle Availability and fault tolerance built in Serverless means…
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spectrum of AWS offerings AWS Lambda Amazon Kinesis Amazon S3 Amazon API Gateway Amazon SQS Amazon DynamoDB AWS IoT Amazon EMR Amazon ElastiCache Amazon RDS Amazon Redshift Amazon ES Managed Serverless Amazon EC2 Microsoft SQL Server “On EC2” Amazon Cognito Amazon CloudWatch
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Regional services AZ1 AZ2 AZ3 Service XYZ
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Anatomy of a Lambda function Handler() function Function to be executed upon invocation Event object Data sent during Lambda Function Invocation Context object Methods available to interact with runtime information (request ID, log group, etc.) def handler(event, context): return { "message": ”Hello World!", "event": event }
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda execution model Synchronous (push) Asynchronous (event) Stream-based Amazon API Gateway AWS Lambda function Amazon DynamoDB Amazon SNS /api/hello AWS Lambda function Amazon S3 reqs Amazon Kinesis changes AWS Lambda service function
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lambda Best Practices • Minimize package size to necessities • Separate the Lambda handler from core logic • Use Environment Variables to modify operational behavior • Self-contain dependencies in your function package • Leverage “Max Memory Used” to right-size your functions • Delete large unused functions (75GB limit)
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS X-Ray Integration with Serverless • Lambda instruments incoming requests for all supported languages • Lambda runs the X-Ray daemon on all languages with an SDK var AWSXRay = require(‘aws-xray-sdk-core‘); AWSXRay.middleware.setSamplingRules(‘sampling-rules.json’); var AWS = AWSXRay.captureAWS(require(‘aws-sdk’)); S3Client = AWS.S3();
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. X-Ray Trace Example
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event Processing Architecture
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event driven A B CEvent A on B triggers C Invocation Lambda functions Action
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event-driven platform S3 event notifications DynamoDB Streams Kinesis events Cognito events SNS events Custom events CloudTrail events LambdaDynamoDB Kinesis S3 Any custom Invoked in response to events - Changes in data - Changes in state Redshift SNS Access any service, including your own Such as… Lambda functions CloudWatch events
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Event-driven actions Lambda: Resize Images Users upload photos S3: Source Bucket S3: Destination Bucket Triggered on PUTs
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Source data Source data Source data Source data S3 Data Staging Layer /data/source-raw S3 Data Staging Layer /data/source-validated Lambda: Input Validation and Conversion layer Lambda: Input Tracking layer State Management Store Event-driven controls
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Step Functions: Orchestrate a Serverless processing workflow using AWS Lambda
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Operation Automation Architecture
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Automation characteristics • Periodic jobs • Event triggered workflows • Enforce security policies • Audit and notification • Respond to alarms • Extend AWS functionality … All while being Highly Available, Scalable and Auditable
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Auto tagging resources as they start AWS Lambda: Update Tag Amazon CloudWatch Events: Rule Triggered Amazon EC2 Instance State Changes Amazon DynamoDB: EC2 Instance Properties Tag: N/A Amazon EC2 Instance State Changes Tag: Owner=userName PrincipalID=aws:userid • AMI • Instances • Snapshot • Volume
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CapitalOne Cloud Custodian AWS Lambda: Policy & Compliance Rules Amazon CloudWatch Events: Rules Triggered AWS CloudTrail: Events Amazon SNS: Alert Notifications Amazon CloudWatch Logs: Logs Read more here: http://www.capitalone.io/cloud-custodian/docs/index.html
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scheduled backup operation AWS Lambda: Backup Rules Amazon CloudWatch Events: Scheduled Trigger Amazon Redshift Cluster XYZ Snapshot
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scheduled AI jobs Amazon S3 AWS Lambda CloudWatch: Time-based events Amazon Polly https://github.com/adhorn/pollycast
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Ops Automator CloudWatch: Time-based events Lambda: Event handler Lambda: Task executors SNS: Error & warning notifications Resources in multiple AWS Regions and Accounts EC2 Instances Tags OpsAutomatorTaskList CreateSnapshot DynamoDB: Task configuration & tracking CloudWatch: Logs Redshift Clusters https://aws.amazon.com/answers/infrastructure-management/ops-automator/
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Autodesk - Tailor Serverless AWS Account Provisioning and Management Service: • Automates AWS Account creation, • Configures IAM, CloudTrail, AWS Config, Direct Connect, and VPC • Enforces corporate standards • Audit for compliance Provisions new Accounts in 10 minutes vs 10 hours in earlier manual process Open source and extensible: https://github.com/alanwill/aws-tailor
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Web Application Architecture
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Web application Data stored in Amazon DynamoDB Dynamic content in AWS Lambda Amazon API Gateway Browser Amazon CloudFront Amazon S3 Amazon Cognito
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bustle Achieves 84% Cost Savings with AWS Lambda Bustle is a news, entertainment, lifestyle, and fashion website targeted towards women. With AWS Lambda, we eliminate the need to worry about operations Tyler Love CTO, Bustle ” “ • Bustle had trouble scaling and maintaining high availability for its website without heavy management • Moved to serverless architecture using AWS Lambda and Amazon API Gateway • Experienced approximately 84% in cost savings • Engineers are now focused on innovation
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon API Gateway AWS Lambda Amazon DynamoDB Amazon S3 Amazon CloudFront • Bucket Policies • ACLs • OAI • Geo-Restriction • Signed Cookies • Signed URLs • DDOS Protection IAM AuthZ IAM • Throttling • Caching • Usage Plans • ACM Browser Amazon Cognito Serverless web app security
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Custom Authorizer Lambda function Client Lambda function AmazonAPI Gateway Amazon DynamoDB AWS Identity & Access Management SAML Two types: • TOKEN - authorization token passed in a header • REQUEST – all headers, query strings, paths, stage variables or context variables. Custom Authorizers
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. us-west-2 us-east-1 Client Amazon Route 53 Regional API Endpoint Regional API Endpoint Custom Domain Name Custom Domain Name API Gateway API Gateway Lambda Lambda Multi-Region with API Gateway
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Processing Architecture Kinesis-based apps
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Processing real-time, streaming data • Durable • Continuous • Fast • Correct • Reactive • Reliable What are the key requirements? Ingest Transform Analyze React Persist
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon S3 Amazon S3- Foundations for Data Processing Ingest Transform Analyze React Persist
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Standard Active data Archive dataInfrequently accessed data Standard - Infrequent Access Amazon Glacier Choice of storage classes on S3
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. S3 Standard • Big data analysis • Content distribution • Static website hosting Standard - IA • Backup & archive • Disaster recovery • File sync & share • Long-retained data Amazon Glacier • Long term archives • Digital preservation • Magnetic tape replacement Active data Archive dataInfrequently accessed data Choice of storage classes on S3
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Kinesis makes it easy to work with real- time streaming data Amazon Kinesis Streams • For Technical Developers • Collect and stream data for ordered, replay-able, real-time processing Amazon Kinesis Firehose • For all developers, data scientists • Easily load massive volumes of streaming data into Amazon S3, Redshift, ElasticSearch Amazon Kinesis Analytics • For all developers, data scientists • Easily analyze data streams using standard SQL queries
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Producers Consumers Shard 1 Shard 2 Shard n Shard 3 … … Write: 1MB Read: 2MB ** A shard is a group of data records in a stream Amazon Kinesis
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Producers Amazon S3 Amazon ES Amazon Redshift Amazon Kinesis Firehose
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Input Source JSON Data • Once per second, using JavaScript SDK: • Unique Cognito ID (anonymous user) • OS • Quadrant • Data sent to Kinesis Stream Amazon Kinesis Stream Amazon Cognito Amazon S3 JavaScript SDK { "recordTime": 1486505943.204, "cognitoId": "us-east-1:3626e211-d2a3-447b-8231-e1f4e0486f44", "os": "Android", "quadrant": "A”, … }
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How is raw data mapped to a schema? Amazon Kinesis stream Amazon KinesisAnalytics cognitoID os quadrant <guid1> Android A <guid2> iOS B Source Data for Kinesis Analytics { "recordTime": 1486505943.204, "cognitoId": "us-east-1:<guid>", "os": "Android", "quadrant": "A" }
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How is streaming data accessed with SQL? STREAM • Analogous to a TABLE • Represents continuous data flow CREATE OR REPLACE STREAM DISTINCT_USER_STREAM( COGNITO_ID VARCHAR(64), DEVICE VARCHAR(32), OS VARCHAR(32), QUADRANT char(1), DT TIMESTAMP);
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How is streaming data accessed with SQL? PUMP • Continuous INSERT query • Inserts data from one in-application stream to another CREATE OR REPLACE PUMP "DISTINCT_USER_PUMP" AS INSERT INTO "DISTINCT_USER_STREAM" SELECT STREAM DISTINCT "cognitoId", ...
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How do we get distinct user records? Use PUMP to insert distinct records into in-app STREAM CREATE OR REPLACE PUMP "DISTINCT_USER_PUMP" AS INSERT INTO "DISTINCT_USER_STREAM" SELECT STREAM DISTINCT "cognitoId", "device", "os", "quadrant", FLOOR(s.ROWTIME TO SECOND) FROM "SOURCE_SQL_STREAM_001" s; DISTINCT_USERS_STREAM •COGNITO_ID •OS •QUADRANT •DT SOURCE_STREAM •cognitoID •os •quadrant
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How do we aggregate per second? • Tumbling window, group by time period CREATE OR REPLACE PUMP "OUTPUT_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM" SELECT STREAM COUNT(dus.COGNITO_ID) AS UNIQUE_USER_COUNT, COUNT((CASE WHEN dus.OS = 'Android' THEN COGNITO_ID ELSE null END)) AS ANDROID_COUNT, COUNT((CASE WHEN dus.OS = 'iOS' THEN COGNITO_ID ELSE null END)) AS IOS_COUNT, COUNT((CASE WHEN dus.OS = 'Windows Phone' THEN COGNITO_ID ELSE null END)) AS WINDOWS_PHONE_COUNT, COUNT((CASE WHEN dus.OS = 'other' THEN COGNITO_ID ELSE null END)) AS OTHER_OS_COUNT, COUNT((CASE WHEN dus.QUADRANT = 'A' THEN COGNITO_ID ELSE null END)) AS QUADRANT_A_COUNT, COUNT((CASE WHEN dus.QUADRANT = 'B' THEN COGNITO_ID ELSE null END)) AS QUADRANT_B_COUNT, COUNT((CASE WHEN dus.QUADRANT = 'C' THEN COGNITO_ID ELSE null END)) AS QUADRANT_C_COUNT, COUNT((CASE WHEN dus.QUADRANT = 'D' THEN COGNITO_ID ELSE null END)) AS QUADRANT_D_COUNT, ROWTIME FROM "DISTINCT_USER_STREAM" dus GROUP BY FLOOR(dus.ROWTIME TO SECOND);
  • 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Comparing Types of Windows • Output created at the end of the window • The output of the window will be single event based on the aggregate function used Tumbling window Aggregate per time interval Sliding window Windows constantly re-evaluated
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Output to Kinesis Stream MENTION_COUNT_STREAM •UNIQUE_USER_COUNT •ANDROID_COUNT •… Amazon Kinesis Stream { "unique_user_count": 96, "android_count": 50, "ios_count": 46, "android_count": 50, "quadrant_a_count": 80, "quadrant_b_count ": 10, "quadrant_c_count ": 3, "quadrant_d_count ": 3 } 1 record, every second
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Persist aggregated data in DynamoDB Kinesis Stream Lambda DynamoDB event.Records.forEach((record) => { const payload = new Buffer(record.kinesis.data, 'base64').toString('ascii'); var docClient = new AWS.DynamoDB.DocumentClient(); var table = "user-quadrant-data"; var data = JSON.parse(payload); var params = { TableName: table, Item:{ "dataType": "quadrantRollup", "windowtime": (new Date(data.WINDOW_TIME)).getTime(), "userCount": data.UNIQUE_USER_COUNT, "quadrantA": data.QUADRANT_A_COUNT, "quadrantB": data.QUADRANT_B_COUNT, ... } }; docClient.put(params, function(err, data) { ... Lambda event source mapping
  • 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Processing a Kinesis Streams with AWS Lambda Shard 1 Shard 2 Shard 3 Shard 4 Shard n Kinesis Stream . . . . . . • Single instance of Lambda function per shard • Polls shard once per second • Lambda function instances created and removed automatically as stream is scaled Gets Records 1x per sec 10k records
  • 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kinesis Firehose Amazon S3 Amazon Athena AWS QuickSight Users browse content Logs Analytics https://github.com/adhorn/logtoes
  • 58. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Data Processing Architecture IoT-based apps
  • 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sensor data collection IoT rules IoT actions MQTT Amazon S3: Raw records Amazon Kinesis Firehose: Delivery stream Amazon S3: Batched records Amazon Kinesis Streams: Real-time stream AWS IoT: Data collection IoT Sensors Real-time analytics applications
  • 60. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Lambda Notifications: Amazon SNS DynamoDB AWS IoTSensors Control System Anomaly Detection Using AWS Lambda
  • 61. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS IoT IoT shadow Amazon Cognito MQTT over WebSockets AWS LambdaAlexa Amazon S3 Interactive Serverless applications
  • 63. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Further Reading Optimizing Enterprise Economics with Serverless Architectures https://d0.awsstatic.com/whitepapers/optimizing-enterprise-economics-serverless-architectures.pdf Serverless Architectures with AWS Lambda https://d1.awsstatic.com/whitepapers/serverless-architectures-with-aws-lambda.pdf Serverless Applications Lens - AWS Well-Architected Framework https://d1.awsstatic.com/whitepapers/architecture/AWS-Serverless-Applications-Lens.pdf Streaming Data Solutions on AWS with Amazon Kinesis https://d1.awsstatic.com/whitepapers/whitepaper-streaming-data-solutions-on-aws-with-amazon-kinesis.pdf AWS Serverless Multi-Tier Architectures https://d1.awsstatic.com/whitepapers/AWS_Serverless_Multi-Tier_Archiectures.pdf
  • 64. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. More info: https://aws.amazon.com/serverless/
  • 65. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thanks you!