SlideShare a Scribd company logo
1 of 48
AWS Online Tech Talks
La serie di webinar AWS in Italiano
Architetture serverless e pattern avanzati per AWS Lambda
Speaker
Alex Casalboni
Technical Evangelist, AWS
Obiettivi
§ Comprendere le best practice applicative legate a fattori quali
performance, testabilità e sicurezza
§ Approfondire le architetture di riferimento per sistemi di analisi dei
dati, real-time streaming, microservizi e intelligenza artificiale
§ Analizzare i benefici e i dettagli architetturali dei pattern di
riferimento principali
About me
• Software Engineer & Web Developer
• Worked in a startup for 4.5 years
• ServerlessDays Organizer
• AWS customer since 2013
Agenda
Serverless foundations (quickly, I promise!)
Advanced serverless patterns:
1. Web application / API
2. Stream processing
3. Data lakes
4. Machine learning
Compute Spectrum
AWS
Lambda
Amazon
Kinesis
Amazon
S3
Amazon API
Gateway
Amazon
SQS
Amazon
DynamoDB
AWS
IoT
Amazon
EMR
Amazon
ElastiCache
Amazon
RDS
Amazon
Redshift
Amazon
Elasticsearch
Managed Serverless
Amazon EC2
Microsoft SQL
Server
“On Amazon EC2”
Amazon
Cognito
Amazon
CloudWatch
Amazon
Athena
AWS
X-Ray
AWS Step
Functions
Amazon
MQ
Amazon
SageMaker
Amazon
Neptune
AWS Fargate
Amazon
DocumentDB
Serverless means…
No server or container
management
Flexible scaling
No idle capacity
$
High availability
Bootstrap
the runtime
Start your
code
Lambda: The execution lifecycle
Cold start
Warm
start
Download
your code
Start new
container
Time
Tune your function’s resources
Only a memory control - % of CPU core and network capacity
allocated to a function proportionally
Is your code CPU, network or memory-bound? If so, it
could be cheaper to choose more memory
> Memory, > Cores, > Network
“AWS Lambda Power Tuning”
Data-driven cost & performance
optimization for AWS Lambda
github.com/alexcasalboni/aws-lambda-power-tuning
Don’t guesstimate!
Lambda best practices
Minimize your package size & use only needed SDK modules
Put your dependency (e.g. jar files) in a separate directory
Improve dependency injection with smaller and simpler IoC
frameworks that load quickly on startup, like Dagger2
Leverage smaller and faster frameworks like jackson-jr for
Java data binding
Use environment variables to modify operational behavior
Secure secrets/tokens/passwords with Parameter Store and
AWS Secrets Manager
AWS Serverless Application Model (SAM)
AWS CloudFormation extension
(Macro) to simplify serverless apps
New serverless resource types:
functions, APIs, and tables
Local testing with SAM CLI
github.com/awslabs/serverless-application-model
Source Build Test Deploy
AWS CodeCommit AWS CodeBuild Third Party
Tooling
AWS CodeDeploy
AWS CodePipeline
AWS CodeStar
AWS code services
Pattern 1
Web app / microservice / API
Web application (1)
DynamoDBLambdaAPI Gateway
Browser
CloudFront Amazon S3 Cognito
Choose the right API endpoint type
Edge optimized: reduce latency from anywhere on the Internet
AWS Region
API Gateway
Internet
edge location
edge location
edge location
CloudFront
Distribution
API Gateway Managed
Web application (2)
DynamoDBLambdaAPI Gateway
Browser CloudFront
S3 Cognito
Lambda@Edge
Choose the right API endpoint type
Regional AWS us-east-2
API Gateway
Internet AWS us-west-2
API Gateway
Route 53
Lambda DynamoDB
Lambda DynamoDB
GlobalTables
Regional
API Gateway
Internet
API Gateway
Route 53
Lambda DynamoDB
Lambda DynamoDB
GlobalTables
Lambda@Edge
CloudFront
Choose the right API endpoint type
AWS us-east-2
AWS us-west-2
Private: expose APIs only inside your VPC
AWS Region
API Gateway
Your VPC
AWS Direct
Connect
On-premises
Choose the right API endpoint type
DynamoDBLambdaAPI Gateway
Browser
CloudFront Amazon S3 Cognito
Serverless web app security
DynamoDBLambdaAPI Gateway
Browser
CloudFront S3 Cognito
Serverless web app security
Static Content
• Geo-Restrictions
• Signed Cookies
• Signed URLs
• DDOS Protection
• Bucket Policies
• ACLs
AuthZ
• Cross Account
• Throttling per method
• Resource Policies
• Usage Plans
• Encryption at Rest
• VPC Endpoint
• Function policies
• Env Variables
• Parameters/Secrets
Lambda
Authorizer
Client
LambdaAPI
Gateway
DynamoDB
IAM
Lambda authorizers
Pattern 2
Data processing (stream)
Streaming with Amazon Kinesis
Collect, process, and analyze video and data streams in real time
Kinesis Data
Firehose
SQL
Kinesis Data
Analytics
Kinesis Data
Streams
Kinesis Video
Streams
Streaming data ingestion
Amazon S3:
Buffered files
Kinesis
Agent
Record
producers Amazon Redshift:
Table loads
Amazon Elasticsearch Service:
Domain loads
Amazon S3:
Source record backup
Transformed recordsPut Records
Kinesis Firehose:
Delivery stream
AWS Lambda:
Transformations &
enrichment
Amazon DynamoDB:
Lookup tables
Raw
Lookup
Transformed
Streaming data ingestion (HTTP)
HTTP
POST/PUT
API
Gateway
Browser
Amazon S3:
Buffered files
Amazon Redshift:
Table loads
Amazon Elasticsearch Service:
Domain loads
Amazon S3:
Source record backup
AWS Lambda:
Transformations &
enrichment
Amazon DynamoDB:
Lookup tables
Raw
Lookup
Transformed
Transformed records
Kinesis Firehose:
Delivery stream
Streaming data ingestion (at the edge)
Amazon S3:
Buffered files
Amazon Redshift:
Table loads
Amazon Elasticsearch Service:
Domain loads
Amazon S3:
Source record backup
AWS Lambda:
Transformations &
enrichment
Amazon DynamoDB:
Lookup tables
Raw
Lookup
Transformed
Transformed records
Kinesis Firehose:
Delivery stream
HTTP
POST/PUT
CloudFront
Lambda@Edge
Browser
Kinesis Best practices
Tune Firehose buffer size and buffer interval
• Larger objects = fewer Lambda invocations & Amazon S3 PUTs
Enable compression to reduce storage costs
Enable Parquet format transformation (columnar)
Enable Source Record Backup for transformations
• Recover from transformation errors
Kinesis Data Streams and Lambda
# of shards corresponds to concurrent invocations of Lambda function
Batch size sets maximum # of records per invocation (min 1, max 10K)
Data Stream Processor Function
Streaming source Other AWS services
Fan-out pattern
Trade strict message ordering for higher throughput & lower latency
Kinesis Data Streams:
Stream
Lambda:
Dispatcher function
Lambda:
Processor function
Increase throughput, reduce processing latency
Streaming source
github.com/aws-samples/aws-lambda-fanout
Real-time analytics
Data Stream Kinesis Data Analytics:
Time window aggregation
Kinesis Data Firehose:
Error stream
S3:
Error records
Record
producers
Lambda:
Alert function
DynamoDB
SNS:
Notifications
CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM"
SELECT STREAM
"device_id",
STEP("SOURCE_SQL_STREAM_001".ROWTIME BY INTERVAL '10' MINUTE) as "window_ts",
SUM("measurement") as "sample_sum",
COUNT(*) AS "sample_count"
FROM "SOURCE_SQL_STREAM_001"
GROUP BY
"device_id",
STEP("SOURCE_SQL_STREAM_001".ROWTIME BY INTERVAL '10' MINUTE);
Kinesis Data Analytics
Aggregation
10-minute tumbling window
Kinesis Data Analytics:
Time window aggregation
Source stream Destination stream(s)
Pattern 3
Data Lakes
Data lake characteristics
Collect, store, process, consume, and analyze organizational data
Structured, semi-structured, and unstructured data
Decoupled compute and storage
Fast automated ingestion
Schema on-read
Complementary to data warehouses
Serverless data lake
S3
ElasticsearchGlueDynamoDB
Catalog & search
Cognito
API
Gateway
API/UI
Athena QuickSight
Redshift
Spectrum
Analytics & processing
LambdaKinesis
Streams
Kinesis
Firehose
Direct
Connect
Ingest
AWS
IoT
KMS CloudTrailIAM Macie
Security & auditing
Glue
Crawlers
Glue
Data Catalog
QuickSight
Redshift
Spectrum
Athena
S3
Bucket(s)
How to “serverlessly” query your data lake
Athena – Just SQL (presto)
Query duration: 44.66 seconds
Data scanned: 169.53GB
Cost*: $0.85
* $5/TB or $0.005/GB
SELECT gram, year, sum(count)
FROM ngram
WHERE gram = 'just say no'
GROUP BY gram, year
ORDER BY year ASC;
Athena best practices
Partition data
s3://my-bucket/my-data/parquet/year=2018/month=11/day=25/
Use columnar formats – Apache Parquet, AVRO, ORC
Compress files with splittable compression (bzip2)
Optimize file sizes
aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena
Serverless MapReduce
Lambda:
Splitter
S3
Object
DynamoDB:
Mapper Results
Lambda:
Mappers
….
….
Lambda:
Reducer
S3
Results
Pywren
Python library developed by University of California, Berkeley
10 TFLOPS of peak compute power (default of 1000 concurrent functions)
Over 80 GB/sec of read and 60 GB/sec of write performance using S3
http://pywren.io
Pattern 4
Machine Learning
M L F R A M E W O R K S &
I N F R A S T R U C T U R E
The Amazon ML Stack: Broadest & Deepest Set of Capabilities
A I S E R V I C E S
R E K O G N I T I O N
I M A G E
P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D
C O M P R E H E N D
M E D I C A L
L E XR E K O G N I T I O N
V I D E O
Vision Speech Chatbots
A M A Z O N S A G E M A K E R
B U I L D T R A I N
F O R E C A S TT E X T R A C T P E R S O N A L I Z E
D E P L O Y
Pre-built algorithms & notebooks
Data labeling (G R O U N D T R U T H )
One-click model training & tuning
Optimization ( N E O )
One-click deployment & hosting
M L S E R V I C E S
F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e
E C 2 P 3
& P 3 d n
E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C
I N F E R E N C E
Models without training data (REINFORCEMENT LEARNING)
Algorithms & models ( A W S M A R K E T P L A C E )
Language Forecasting Recommendations
NEW NEWNEW
NEW
NEW
NEWNEW
NEW
NEW
1. Upload
2. Submit
image
Image processing with Amazon Rekognition Image
Step Functions3. Store image Lambda
DynamoDB
Elasticsearch
8. Store metadata &
analysis
4. DetectFaces 7. DetectText5. DetectLabels 6. DetectModeration
Media analysis solution
S3:
Web interface
Cognito
Amazon Rekognition Video:
Detect objects, scenes,
faces, & celebrities
Elasticsearch:
Search index
API Gateway:
REST APIs
https://aws.amazon.com/answers/media-entertainment/media-analysis-solution/
AWS Elemental MediaConvert:
Transcode videos
S3:
Media storage
Step Functions:
Orchestrate
analysis
Transcribe Comprehend
Amazon Connect
(Serverless contact center)
Real time and
historical analytics
High-quality
voice capability
Call
recording
Skills-based routing
[Automatic Call Distribution (ACD)]
Intelligent call center chatbot
Amazon
Connect
Customer
Amazon
Lex
Lambda:
Chatbot
Processing
DynamoDB:
Customer
Data
SNS:
SMS Messaging
Customer calls
Connect to
reschedule an
appointment
Connect calls
Lex chatbot
Lex chatbot calls
Lambda function to
get customer
preferences and
fulfil Intents
Lambda function
sends text message
confirmation via SNS
Customer receives
appointment
confirmation text
message
Lambda
function writes
updates to
DynamoDB
Call center analytics
Amazon
Connect
Customers
Agents
Call
recordings
S3: Call
recordings
S3: Call
transcripts
Step Functions TranscribeLambda
S3: Sentiment,
key phrases,
entities
Step Functions
S3 Notifications
for call
transcripts
ComprehendLambda
Athena
QuickSight
Contact trace records (CTRs)
Kinesis Data
Streams
Kinesis Data
Firehose
S3: CTRs
Go Build!
Here to help you build
Alex Casalboni
Technical Evangelist, AWS
@alex_casalboni
@ 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Grazie!

More Related Content

What's hot

Introduction to AWS (Amazon Web Services)
Introduction to AWS (Amazon Web Services)Introduction to AWS (Amazon Web Services)
Introduction to AWS (Amazon Web Services)Albert Suwandhi
 
Getting Started on AWS - AWSome Day 2018
Getting Started on AWS - AWSome Day 2018Getting Started on AWS - AWSome Day 2018
Getting Started on AWS - AWSome Day 2018Amazon Web Services
 
AWSome Day Nashville 2018_Training
AWSome Day Nashville 2018_Training AWSome Day Nashville 2018_Training
AWSome Day Nashville 2018_Training Amazon Web Services
 
Technical Essentials Training: AWS Innovate Ottawa
Technical Essentials Training: AWS Innovate OttawaTechnical Essentials Training: AWS Innovate Ottawa
Technical Essentials Training: AWS Innovate OttawaAmazon Web Services
 
Virtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web ServicesVirtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web ServicesAmazon Web Services
 
Getting Started on AWS - AWSome Day Dallas 2018
Getting Started on AWS - AWSome Day Dallas 2018Getting Started on AWS - AWSome Day Dallas 2018
Getting Started on AWS - AWSome Day Dallas 2018Amazon Web Services
 
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...Amazon Web Services
 
Manage your database in the cloud like a pro with Cloud Volumes Service for A...
Manage your database in the cloud like a pro with Cloud Volumes Service for A...Manage your database in the cloud like a pro with Cloud Volumes Service for A...
Manage your database in the cloud like a pro with Cloud Volumes Service for A...Amazon Web Services
 
Soluzioni per la migrazione e gestione dei dati in Amazon Web Services
Soluzioni per la migrazione e gestione dei dati in Amazon Web ServicesSoluzioni per la migrazione e gestione dei dati in Amazon Web Services
Soluzioni per la migrazione e gestione dei dati in Amazon Web ServicesAmazon Web Services
 
Introduction to the AWS Cloud - AWSome Day 2019 - Toronto
Introduction to the AWS Cloud - AWSome Day 2019 - TorontoIntroduction to the AWS Cloud - AWSome Day 2019 - Toronto
Introduction to the AWS Cloud - AWSome Day 2019 - TorontoAmazon Web Services
 
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference Amazon Web Services
 
AWS SSA Webinar - Cost optimisation on AWS
AWS SSA Webinar - Cost optimisation on AWSAWS SSA Webinar - Cost optimisation on AWS
AWS SSA Webinar - Cost optimisation on AWSCobus Bernard
 
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017Amazon Web Services
 
AWS Initiate Day Manchester 2019 – AWS Cost Optimisation
AWS Initiate Day Manchester 2019 – AWS Cost OptimisationAWS Initiate Day Manchester 2019 – AWS Cost Optimisation
AWS Initiate Day Manchester 2019 – AWS Cost OptimisationAmazon Web Services
 
AWSome Day - Barcelona - 26 Febrero
AWSome Day - Barcelona - 26 FebreroAWSome Day - Barcelona - 26 Febrero
AWSome Day - Barcelona - 26 FebreroCAPSiDE
 
Journey Through the Cloud - What is AWS? Webinar - Jan 2013
Journey Through the Cloud - What is AWS? Webinar - Jan 2013Journey Through the Cloud - What is AWS? Webinar - Jan 2013
Journey Through the Cloud - What is AWS? Webinar - Jan 2013Amazon Web Services
 

What's hot (20)

Cloudschool 2014
Cloudschool 2014Cloudschool 2014
Cloudschool 2014
 
Introduction to AWS (Amazon Web Services)
Introduction to AWS (Amazon Web Services)Introduction to AWS (Amazon Web Services)
Introduction to AWS (Amazon Web Services)
 
Getting Started on AWS - AWSome Day 2018
Getting Started on AWS - AWSome Day 2018Getting Started on AWS - AWSome Day 2018
Getting Started on AWS - AWSome Day 2018
 
AWSome Day Nashville 2018_Training
AWSome Day Nashville 2018_Training AWSome Day Nashville 2018_Training
AWSome Day Nashville 2018_Training
 
Technical Essentials Training: AWS Innovate Ottawa
Technical Essentials Training: AWS Innovate OttawaTechnical Essentials Training: AWS Innovate Ottawa
Technical Essentials Training: AWS Innovate Ottawa
 
Virtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web ServicesVirtual AWSome Day October 2018 - Amazon Web Services
Virtual AWSome Day October 2018 - Amazon Web Services
 
Getting Started on AWS - AWSome Day Dallas 2018
Getting Started on AWS - AWSome Day Dallas 2018Getting Started on AWS - AWSome Day Dallas 2018
Getting Started on AWS - AWSome Day Dallas 2018
 
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
Module 1: AWS Cloud Concepts, VPC, and Security Groups - Virtual AWSome Day J...
 
Manage your database in the cloud like a pro with Cloud Volumes Service for A...
Manage your database in the cloud like a pro with Cloud Volumes Service for A...Manage your database in the cloud like a pro with Cloud Volumes Service for A...
Manage your database in the cloud like a pro with Cloud Volumes Service for A...
 
Soluzioni per la migrazione e gestione dei dati in Amazon Web Services
Soluzioni per la migrazione e gestione dei dati in Amazon Web ServicesSoluzioni per la migrazione e gestione dei dati in Amazon Web Services
Soluzioni per la migrazione e gestione dei dati in Amazon Web Services
 
Introduction to the AWS Cloud - AWSome Day 2019 - Toronto
Introduction to the AWS Cloud - AWSome Day 2019 - TorontoIntroduction to the AWS Cloud - AWSome Day 2019 - Toronto
Introduction to the AWS Cloud - AWSome Day 2019 - Toronto
 
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference
Module 5: AWS Elasticity and Management Tools - AWSome Day Online Conference
 
AWS SSA Webinar - Cost optimisation on AWS
AWS SSA Webinar - Cost optimisation on AWSAWS SSA Webinar - Cost optimisation on AWS
AWS SSA Webinar - Cost optimisation on AWS
 
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
Introduction to AWS and Cloud Computing - Module 1 Part 1 - AWSome Day 2017
 
AWS Initiate Day Manchester 2019 – AWS Cost Optimisation
AWS Initiate Day Manchester 2019 – AWS Cost OptimisationAWS Initiate Day Manchester 2019 – AWS Cost Optimisation
AWS Initiate Day Manchester 2019 – AWS Cost Optimisation
 
SAP Modernization with AWS
SAP Modernization with AWSSAP Modernization with AWS
SAP Modernization with AWS
 
AWS Cloud School Next Steps
AWS Cloud School Next StepsAWS Cloud School Next Steps
AWS Cloud School Next Steps
 
AWSome Day - Barcelona - 26 Febrero
AWSome Day - Barcelona - 26 FebreroAWSome Day - Barcelona - 26 Febrero
AWSome Day - Barcelona - 26 Febrero
 
Journey Through the Cloud - What is AWS? Webinar - Jan 2013
Journey Through the Cloud - What is AWS? Webinar - Jan 2013Journey Through the Cloud - What is AWS? Webinar - Jan 2013
Journey Through the Cloud - What is AWS? Webinar - Jan 2013
 
AWSome Day Nairobi 2019
AWSome Day Nairobi 2019AWSome Day Nairobi 2019
AWSome Day Nairobi 2019
 

Similar to Architetture serverless e pattern avanzati per AWS Lambda

Big data and serverless - AWS UG The Netherlands
Big data and serverless - AWS UG The NetherlandsBig data and serverless - AWS UG The Netherlands
Big data and serverless - AWS UG The NetherlandsMarek Kuczynski
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRAmazon Web Services
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Amazon Web Services
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSAmazon Web Services
 
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...Amazon Web Services
 
Deep Dive: Amazon Elastic MapReduce
Deep Dive: Amazon Elastic MapReduceDeep Dive: Amazon Elastic MapReduce
Deep Dive: Amazon Elastic MapReduceAmazon Web Services
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRAmazon Web Services
 
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduceAmazon Web Services
 
Running Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformRunning Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformEva Tse
 
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data PlatformAmazon Web Services
 
Big Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWSBig Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWSAmazon Web Services
 
AWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
AWS Innovate: Build a Data Lake on AWS- Johnathon MeichtryAWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
AWS Innovate: Build a Data Lake on AWS- Johnathon MeichtryAmazon Web Services Korea
 
Full Stack Analytics on AWS - AWS Summit Cape Town 2017
Full Stack Analytics on AWS - AWS Summit Cape Town 2017 Full Stack Analytics on AWS - AWS Summit Cape Town 2017
Full Stack Analytics on AWS - AWS Summit Cape Town 2017 Amazon Web Services
 
Data analytics master class: predict hotel revenue
Data analytics master class: predict hotel revenueData analytics master class: predict hotel revenue
Data analytics master class: predict hotel revenueKris Peeters
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture PatternsAmazon Web Services
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfAmazon Web Services
 
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Amazon Web Services
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)Amazon Web Services
 
Aws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon ElishaAws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon ElishaHelen Rogers
 

Similar to Architetture serverless e pattern avanzati per AWS Lambda (20)

Big data and serverless - AWS UG The Netherlands
Big data and serverless - AWS UG The NetherlandsBig data and serverless - AWS UG The Netherlands
Big data and serverless - AWS UG The Netherlands
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWS
 
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...
Running Fast, Interactive Queries on Petabyte Datasets using Presto - AWS Jul...
 
Deep Dive: Amazon Elastic MapReduce
Deep Dive: Amazon Elastic MapReduceDeep Dive: Amazon Elastic MapReduce
Deep Dive: Amazon Elastic MapReduce
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
 
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
 
Running Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformRunning Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data Platform
 
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
 
Big Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWSBig Data Architectural Patterns and Best Practices on AWS
Big Data Architectural Patterns and Best Practices on AWS
 
AWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
AWS Innovate: Build a Data Lake on AWS- Johnathon MeichtryAWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
AWS Innovate: Build a Data Lake on AWS- Johnathon Meichtry
 
Full Stack Analytics on AWS - AWS Summit Cape Town 2017
Full Stack Analytics on AWS - AWS Summit Cape Town 2017 Full Stack Analytics on AWS - AWS Summit Cape Town 2017
Full Stack Analytics on AWS - AWS Summit Cape Town 2017
 
Data analytics master class: predict hotel revenue
Data analytics master class: predict hotel revenueData analytics master class: predict hotel revenue
Data analytics master class: predict hotel revenue
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
 
What's New in Amazon Aurora
What's New in Amazon AuroraWhat's New in Amazon Aurora
What's New in Amazon Aurora
 
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
AWS re:Invent 2016: ↑↑↓↓←→←→ BA Lambda Start (SVR305)
 
Aws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon ElishaAws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon Elisha
 

More from 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
 

More from 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
 

Architetture serverless e pattern avanzati per AWS Lambda

  • 1. AWS Online Tech Talks La serie di webinar AWS in Italiano Architetture serverless e pattern avanzati per AWS Lambda Speaker Alex Casalboni Technical Evangelist, AWS Obiettivi § Comprendere le best practice applicative legate a fattori quali performance, testabilità e sicurezza § Approfondire le architetture di riferimento per sistemi di analisi dei dati, real-time streaming, microservizi e intelligenza artificiale § Analizzare i benefici e i dettagli architetturali dei pattern di riferimento principali
  • 2. About me • Software Engineer & Web Developer • Worked in a startup for 4.5 years • ServerlessDays Organizer • AWS customer since 2013
  • 3. Agenda Serverless foundations (quickly, I promise!) Advanced serverless patterns: 1. Web application / API 2. Stream processing 3. Data lakes 4. Machine learning
  • 4. Compute Spectrum AWS Lambda Amazon Kinesis Amazon S3 Amazon API Gateway Amazon SQS Amazon DynamoDB AWS IoT Amazon EMR Amazon ElastiCache Amazon RDS Amazon Redshift Amazon Elasticsearch Managed Serverless Amazon EC2 Microsoft SQL Server “On Amazon EC2” Amazon Cognito Amazon CloudWatch Amazon Athena AWS X-Ray AWS Step Functions Amazon MQ Amazon SageMaker Amazon Neptune AWS Fargate Amazon DocumentDB
  • 5. Serverless means… No server or container management Flexible scaling No idle capacity $ High availability
  • 6. Bootstrap the runtime Start your code Lambda: The execution lifecycle Cold start Warm start Download your code Start new container Time
  • 7. Tune your function’s resources Only a memory control - % of CPU core and network capacity allocated to a function proportionally Is your code CPU, network or memory-bound? If so, it could be cheaper to choose more memory > Memory, > Cores, > Network
  • 8. “AWS Lambda Power Tuning” Data-driven cost & performance optimization for AWS Lambda github.com/alexcasalboni/aws-lambda-power-tuning Don’t guesstimate!
  • 9. Lambda best practices Minimize your package size & use only needed SDK modules Put your dependency (e.g. jar files) in a separate directory Improve dependency injection with smaller and simpler IoC frameworks that load quickly on startup, like Dagger2 Leverage smaller and faster frameworks like jackson-jr for Java data binding Use environment variables to modify operational behavior Secure secrets/tokens/passwords with Parameter Store and AWS Secrets Manager
  • 10. AWS Serverless Application Model (SAM) AWS CloudFormation extension (Macro) to simplify serverless apps New serverless resource types: functions, APIs, and tables Local testing with SAM CLI github.com/awslabs/serverless-application-model
  • 11. Source Build Test Deploy AWS CodeCommit AWS CodeBuild Third Party Tooling AWS CodeDeploy AWS CodePipeline AWS CodeStar AWS code services
  • 12. Pattern 1 Web app / microservice / API
  • 13. Web application (1) DynamoDBLambdaAPI Gateway Browser CloudFront Amazon S3 Cognito
  • 14. Choose the right API endpoint type Edge optimized: reduce latency from anywhere on the Internet AWS Region API Gateway Internet edge location edge location edge location CloudFront Distribution API Gateway Managed
  • 15. Web application (2) DynamoDBLambdaAPI Gateway Browser CloudFront S3 Cognito Lambda@Edge
  • 16. Choose the right API endpoint type Regional AWS us-east-2 API Gateway Internet AWS us-west-2 API Gateway Route 53 Lambda DynamoDB Lambda DynamoDB GlobalTables
  • 17. Regional API Gateway Internet API Gateway Route 53 Lambda DynamoDB Lambda DynamoDB GlobalTables Lambda@Edge CloudFront Choose the right API endpoint type AWS us-east-2 AWS us-west-2
  • 18. Private: expose APIs only inside your VPC AWS Region API Gateway Your VPC AWS Direct Connect On-premises Choose the right API endpoint type
  • 19. DynamoDBLambdaAPI Gateway Browser CloudFront Amazon S3 Cognito Serverless web app security
  • 20. DynamoDBLambdaAPI Gateway Browser CloudFront S3 Cognito Serverless web app security Static Content • Geo-Restrictions • Signed Cookies • Signed URLs • DDOS Protection • Bucket Policies • ACLs AuthZ • Cross Account • Throttling per method • Resource Policies • Usage Plans • Encryption at Rest • VPC Endpoint • Function policies • Env Variables • Parameters/Secrets
  • 23. Streaming with Amazon Kinesis Collect, process, and analyze video and data streams in real time Kinesis Data Firehose SQL Kinesis Data Analytics Kinesis Data Streams Kinesis Video Streams
  • 24. Streaming data ingestion Amazon S3: Buffered files Kinesis Agent Record producers Amazon Redshift: Table loads Amazon Elasticsearch Service: Domain loads Amazon S3: Source record backup Transformed recordsPut Records Kinesis Firehose: Delivery stream AWS Lambda: Transformations & enrichment Amazon DynamoDB: Lookup tables Raw Lookup Transformed
  • 25. Streaming data ingestion (HTTP) HTTP POST/PUT API Gateway Browser Amazon S3: Buffered files Amazon Redshift: Table loads Amazon Elasticsearch Service: Domain loads Amazon S3: Source record backup AWS Lambda: Transformations & enrichment Amazon DynamoDB: Lookup tables Raw Lookup Transformed Transformed records Kinesis Firehose: Delivery stream
  • 26. Streaming data ingestion (at the edge) Amazon S3: Buffered files Amazon Redshift: Table loads Amazon Elasticsearch Service: Domain loads Amazon S3: Source record backup AWS Lambda: Transformations & enrichment Amazon DynamoDB: Lookup tables Raw Lookup Transformed Transformed records Kinesis Firehose: Delivery stream HTTP POST/PUT CloudFront Lambda@Edge Browser
  • 27. Kinesis Best practices Tune Firehose buffer size and buffer interval • Larger objects = fewer Lambda invocations & Amazon S3 PUTs Enable compression to reduce storage costs Enable Parquet format transformation (columnar) Enable Source Record Backup for transformations • Recover from transformation errors
  • 28. Kinesis Data Streams and Lambda # of shards corresponds to concurrent invocations of Lambda function Batch size sets maximum # of records per invocation (min 1, max 10K) Data Stream Processor Function Streaming source Other AWS services
  • 29. Fan-out pattern Trade strict message ordering for higher throughput & lower latency Kinesis Data Streams: Stream Lambda: Dispatcher function Lambda: Processor function Increase throughput, reduce processing latency Streaming source github.com/aws-samples/aws-lambda-fanout
  • 30. Real-time analytics Data Stream Kinesis Data Analytics: Time window aggregation Kinesis Data Firehose: Error stream S3: Error records Record producers Lambda: Alert function DynamoDB SNS: Notifications
  • 31. CREATE OR REPLACE PUMP "STREAM_PUMP" AS INSERT INTO "DESTINATION_SQL_STREAM" SELECT STREAM "device_id", STEP("SOURCE_SQL_STREAM_001".ROWTIME BY INTERVAL '10' MINUTE) as "window_ts", SUM("measurement") as "sample_sum", COUNT(*) AS "sample_count" FROM "SOURCE_SQL_STREAM_001" GROUP BY "device_id", STEP("SOURCE_SQL_STREAM_001".ROWTIME BY INTERVAL '10' MINUTE); Kinesis Data Analytics Aggregation 10-minute tumbling window Kinesis Data Analytics: Time window aggregation Source stream Destination stream(s)
  • 33. Data lake characteristics Collect, store, process, consume, and analyze organizational data Structured, semi-structured, and unstructured data Decoupled compute and storage Fast automated ingestion Schema on-read Complementary to data warehouses
  • 34. Serverless data lake S3 ElasticsearchGlueDynamoDB Catalog & search Cognito API Gateway API/UI Athena QuickSight Redshift Spectrum Analytics & processing LambdaKinesis Streams Kinesis Firehose Direct Connect Ingest AWS IoT KMS CloudTrailIAM Macie Security & auditing
  • 36. Athena – Just SQL (presto) Query duration: 44.66 seconds Data scanned: 169.53GB Cost*: $0.85 * $5/TB or $0.005/GB SELECT gram, year, sum(count) FROM ngram WHERE gram = 'just say no' GROUP BY gram, year ORDER BY year ASC;
  • 37. Athena best practices Partition data s3://my-bucket/my-data/parquet/year=2018/month=11/day=25/ Use columnar formats – Apache Parquet, AVRO, ORC Compress files with splittable compression (bzip2) Optimize file sizes aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena
  • 39. Pywren Python library developed by University of California, Berkeley 10 TFLOPS of peak compute power (default of 1000 concurrent functions) Over 80 GB/sec of read and 60 GB/sec of write performance using S3 http://pywren.io
  • 41. M L F R A M E W O R K S & I N F R A S T R U C T U R E The Amazon ML Stack: Broadest & Deepest Set of Capabilities A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D C O M P R E H E N D M E D I C A L L E XR E K O G N I T I O N V I D E O Vision Speech Chatbots A M A Z O N S A G E M A K E R B U I L D T R A I N F O R E C A S TT E X T R A C T P E R S O N A L I Z E D E P L O Y Pre-built algorithms & notebooks Data labeling (G R O U N D T R U T H ) One-click model training & tuning Optimization ( N E O ) One-click deployment & hosting M L S E R V I C E S F r a m e w o r k s I n t e r f a c e s I n f r a s t r u c t u r e E C 2 P 3 & P 3 d n E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Models without training data (REINFORCEMENT LEARNING) Algorithms & models ( A W S M A R K E T P L A C E ) Language Forecasting Recommendations NEW NEWNEW NEW NEW NEWNEW NEW NEW
  • 42. 1. Upload 2. Submit image Image processing with Amazon Rekognition Image Step Functions3. Store image Lambda DynamoDB Elasticsearch 8. Store metadata & analysis 4. DetectFaces 7. DetectText5. DetectLabels 6. DetectModeration
  • 43. Media analysis solution S3: Web interface Cognito Amazon Rekognition Video: Detect objects, scenes, faces, & celebrities Elasticsearch: Search index API Gateway: REST APIs https://aws.amazon.com/answers/media-entertainment/media-analysis-solution/ AWS Elemental MediaConvert: Transcode videos S3: Media storage Step Functions: Orchestrate analysis Transcribe Comprehend
  • 44. Amazon Connect (Serverless contact center) Real time and historical analytics High-quality voice capability Call recording Skills-based routing [Automatic Call Distribution (ACD)]
  • 45. Intelligent call center chatbot Amazon Connect Customer Amazon Lex Lambda: Chatbot Processing DynamoDB: Customer Data SNS: SMS Messaging Customer calls Connect to reschedule an appointment Connect calls Lex chatbot Lex chatbot calls Lambda function to get customer preferences and fulfil Intents Lambda function sends text message confirmation via SNS Customer receives appointment confirmation text message Lambda function writes updates to DynamoDB
  • 46. Call center analytics Amazon Connect Customers Agents Call recordings S3: Call recordings S3: Call transcripts Step Functions TranscribeLambda S3: Sentiment, key phrases, entities Step Functions S3 Notifications for call transcripts ComprehendLambda Athena QuickSight Contact trace records (CTRs) Kinesis Data Streams Kinesis Data Firehose S3: CTRs
  • 47. Go Build! Here to help you build
  • 48. Alex Casalboni Technical Evangelist, AWS @alex_casalboni @ 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved Grazie!