SlideShare a Scribd company logo
1 of 55
Download to read offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
Optimizing Serverless Application
Data Tiers with Amazon DynamoDB
S r i n i U p p a l a p a t i – V i c e P r e s i d e n t ,
C o n s u m e r B a n k E n g i n e e r i n g , C a p i t a l O n e
E d i n Z u l i c h – N o S Q L S o l u t i o n s A r c h i t e c t , A W S
N o v e m b e r 2 7 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• DynamoDB in serverless applications
• A bit about Amazon DynamoDB
• Example: transactions and queries with microservices
• Example: high volume time series data
• Serverless at CapitalOne
• Breaking down the monolith
• Transaction Hub journey
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Serverless Platform
AWS Lambda Amazon API Gateway Amazon S3 Amazon DynamoDB
Amazon SNS & SQS AWS Step Functions
Amazon Kinesis
Amazon Athena
Tooling
https://aws.amazon.com/serverless/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Serverless Platform
AWS Lambda Amazon API Gateway Amazon S3 Amazon DynamoDB
Amazon SNS & SQS AWS Step Functions
Amazon Kinesis
Amazon Athena
Tooling
https://aws.amazon.com/serverless/
 No server management
 Flexible scaling
 High availability
 No idle capacity
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is DynamoDB?
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What is DynamoDB?
- Fully managed NoSQL database service
- Designed for OLTP use cases where you know access patterns
- Designed to be used as an operational database that provides:
- Extreme scale – now with Auto Scaling
- Performance – single digit ms latency at any scale
- High availability and reliability – zero downtime
- Global availability – available in all AWS regions
- Serverless experience – no servers and clusters to manage
- Integration with AWS Lambda and other AWS services
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DynamoDB: Common Use Cases
Market orders
Tokenization
(PHI, credit cards)
Chat messages
User profiles
IoT sensor data
& device status
File metadata
Social media feeds
Shopping cart
Sessions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Reference Architecture (Processing Paths)
AWS
Lambda
Amazon
DynamoDB
Amazon API
Gateway
Amazon
DynamoDB
Stream
AWS
Lambda
Amazon S3
Amazon ES
Amazon
Athena
Amazon
DynamoDB
Query sideOLTP/Command side
Building blocks for serverless microservices
1. API Gateway + Lambda + DynamoDB: core building block
2. DynamoDB Streams + AWS Lambda: building block for reliable event delivery
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DynamoDB Streams and AWS Lambda
Partition A
Partition B
Partition C
 Stream of item changes
 Exactly once, guaranteed
delivery
 Strictly ordered by key
 Durable, scalable
 Fully-managed
 24 hour data retention
 Sub-second latency
 Event source for AWS
Lambda
DynamoDB Streams
1
2
3
Updates GetRecords
DynamoDB
Table
DynamoDB Stream
Shards
AWS Lambda
Function
DynamoDB Streams + AWS Lambda = reliable “at least once” event delivery
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
But It’s NoSQL! I need SQL…
A deep dive on how we were using our existing databases
revealed that they were frequently not used for their
relational capabilities. About 70 percent of operations
were of the key-value kind, where only a primary key was
used and a single row would be returned.
Werner Vogels
CTO, Amazon,
On database usage patterns at Amazon
”
“
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example: Transactions and Queries with
DynamoDB and Microservices
- An e-commerce app
- Relational versus non-relational data model
- Transactions in a distributed microservices architecture
- Enabling querying in a distributed microservices
architecture
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example: E-commerce App Using
Microservices
shopping cart
service
product catalog
service
account service
AWS
Lambda
API
Gateway
Amazon
DynamoDBDB1 DB2 DB3
Serverless microservices
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Shopping Cart Data Model
CART
CartId: 1,
LastUpdate: t3
CART_ITEM
ItemId:2, Qty: 1,
CartId: 1
Relational database
CART
CartID:2,
LastUpdate: t3,
Items: [
{ID: 2, Qty: 1},
{ID: 5, Qty: 2}]
Non-relational
database
Normalized schema De-normalized: aggregates
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Updating Cart Using OCC
CART
CartID:2,
LastUpdate: t3,
CartItems: [
{ID: 2, Qty: 1},
{ID: 5, Qty: 2}]
 Use conditions to implement optimistic concurrency
control ensuring data consistency
 GetItem call can be eventually consistent
1. Get the cart: GetItem
{ "TableName": “Cart”,
"Key": {“CartId”: {“N”: “2”}}
}
2. Update the cart: conditional PutItem (or UpdateItem)
{ "TableName": “Cart”,
"Item": {
“CartID”: {“N”: “2”},
“LastUpdate”: {“N”:”t4”},
“CartItems”: {…}
},
"ConditionExpression": “LastUpdate = :v1”,
"ExpressionAttributeValues": {":v1": {“N”: “t3”}}
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transactions that Span Microservices
shopping cart
service
product catalog
service
account service
cart table product table account table
TX:
1. checkout
2. inventory
update
1. checkout
2. inventory
update
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transaction: Cart Checkout
cart
{CheckOut: true, {product1,…}}
AWS Lambda
DynamoDB Stream
product
{pid: ”product1”, qty: 34}
Pattern: Saga using DynamoDB Streams and Lambda
Shopping cart service Product catalog service
CartService.commit API{CheckOut: false,
Items:{}}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transaction: Cart Checkout Failure
cart AWS Lambda
DynamoDB Stream
product
{pid: ”product1”, qty: 0}
Shopping cart service Product catalog service
CartService.rollback API{CheckOut: false}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cart Table Update Scenarios Using OCC
1. Add/remove item:
1. get cart => tread = LastUpdate
2. update cart
add/remove IF (LastUpdate = tread AND CheckOut = false)
2. Checkout begin:
1. get cart => tread = LastUpdate
2. update cart
SET CheckOut = true IF (LastUpdate = tread AND CheckOut = false)
3. Checkout commit:
1. get cart => tread = LastUpdate
2. update cart
SET items={}, CheckOut = false IF (LastUpdate = tread AND CheckOut = true)
4. Checkout rollback:
1. get cart => tread = LastUpdate
2. update cart
SET CheckOut = false IF (LastUpdate = tread AND CheckOut = true)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Another Building Block for Transactions:
Step Functions
• Define steps as a state machine
• Each step is implemented as a
Lambda function
• Lambda functions have to be
idempotent
• This approach can be combined with
the DynamoDB Streams based
approach
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transactions with Microservices: Takeaways
• Requirements:
1. Service atomically updates database and publishes events
2. Events delivered at least once
• DynamoDB Streams + AWS Lambda approach satisfies both
• Denormalized schema (aggregates)
• Building blocks: DynamoDB Streams + AWS Lambda; Step Functions
• Asynchronous and eventually consistent
• Each service publishes its rollback method
• Lambda functions have to be idempotent
• Increased total transaction latency
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Querying in Microservices Architectures
• Challenges
• Data is segregated in different microservices’ databases
• Operational view of data does not satisfy querying needs
• Solution
• Separate the operational and querying views
• Polyglot persistence: use the right database for the job
• Command Query Responsibility Segregation (CQRS)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Enabling Querying with Microservices
AWS
Lambda
Amazon
DynamoDB
Amazon API
Gateway
Amazon
DynamoDB
Stream
AWS
Lambda
Amazon S3
Amazon ES
Amazon
Athena
Amazon
DynamoDB
Query sideOLTP/Command side
 Reliable downstream delivery of events
via DynamoDB Streams and Lambda
 Independently scalable Command and
Query side
Command Query Responsibility Segregation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Querying with Microservices
AWS Lambda
DynamoDB Stream
Different materialized views exposed as microservices
Query service 2
Amazon ES
Query service 1
Query service 3
Amazon
Redshift
Amazon
DynamoDB
Command side Query side
Amazon
DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple Subscribers: Fan-Out
AWS LambdaDynamoDB Stream
AWS LambdaDynamoDB Stream
Amazon Kinesis
Stream
AWS Lambda based
Amazon Kinesis based
(or a message queue)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Querying with Microservices: Takeaways
• CQRS provides separation of concerns
• CRUD operations and queries separated from each other
• Each optimized for its responsibility
• Each side is independently scalable
• Each view can be exposed as a microservice
• Eventual consistency and longer latency
• Added complexity
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Example: High Volume Time Series Data
What we need:
1. High volume ingest
• 100,000 data points per second
2. Fast access for X days/months
• By sensor ID + time range
• Under 10 ms
Time Series Data Example
sensor_data
SensorId: 123
Timestamp: 1492641900
Temp: 172
AWS Lambda
Amazon Kinesis
Stream
• Sensor data (temp) from 1000’s of
sensors
• Store for fast access (<10 ms)
• Access by sensor ID + time range
• Store for 30 days
DynamoDB
SensorId: 123
Timestamp: 1492641900
MyTTL: 1492736400
Expiry
Kinesis, DynamoDB partition key: Sensor ID
DynamoDB sort key: Timestamp
Solution Architecture
Sensors
AWS
Lambda
Amazon
S3 hosted
site
Amazon
DynamoDB
Amazon
Kinesis
Amazon
CloudWatch
Amazon
Cognito
Amazon S3
AWS
Lambda
Amazon
Kinesis
Firehose
Amazon
DynamoDB
Streams
High-volume time-series data
Fast access by sensor and time
Data access pattern:
sensor ID + time range
Cost Considerations
Data rate: 100,000 data points per second
Data storage: 1 month’s worth = ~2.5 TB
Estimated cost:
Lambda: $2K – $5K per month
Kinesis: 100,000 records -> 100 shards -> ~$5K per month
DynamoDB: 100,000 WCU’s -> $50K per month
Where is the problem?
• DynamoDB Write Capacity Unit (WCU) is 1 KB
• Our scenario:
• Storing data points ~50 B in size
• Write capacity utilization per write: 50/1024 * 100% = 4.88%
Solution: DeviceId: 123
Timestamp: 1492641900
Temp: 172
MyTTL: 1492736400
AWS Lambda
Kinesis Stream
Group multiple data points into a single
item – save on writes to DynamoDB
Use Lambda batch size to control
DynamoDB item size
Batch-write to DynamoDB
Use DynamoDB TTL to manage data
lifetime
Optional: use compression
sensor_data
DynamoDB
Queue-based load leveling
using AWS Lambda
id: 123
dt: 1492641900
MyTTL: 1492736400 TTL Expiry
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Using TTL to Age Out Cold Data
RCUs = 500
WCUs = 10000
HotdataCold
data
Lambda function detects items deleted by
TTL in the stream and writes them to S3.
sensor_data_table
sensor_Id
(Partition key)
timestamp
(sort key)
my_TTL
1489188093
…. Attribute N
DynamoDB
table
S3
AWS Lambda
Kinesis Firehose
An epoch timestamp item attribute denotes
when an item can be deleted. TTL triggered
deletion does not consume provisioned
capacity.
Time-To-Live
Cost, Revised
Data rate: 100,000 data points per second
Data storage: 1 month’s worth = ~2.5 TB
Lambda: $2K – $5K per month
Kinesis: 100,000 records -> 100 shards -> ~$5K per month
DynamoDB: 100,000 WCU’s -> $50K per month
• Bin data points: 10 per item saves 10x in cost
• 10,000 WCU’s -> $5K per month (10x less…)
• Diff. over 1 year: $600K vs. $60K
We can save a lot by storing multiple data points in a single record
(DynamoDB item)
Scaling Considerations
Adding more sensors:
- Kinesis: you need to add more shards
- Lambda: scales automatically based on Kinesis shards
- DynamoDB: scales automatically for space and throughput
- Auto Scaling increases and decreases provisioned capacity as needed
- For large spikes, provision capacity explicitly
- Time-to-live (TTL) automatically deletes expired data without consuming
provisioned capacity
Adding more events per sensor:
- Lambda function creates “denser” DynamoDB items
- More data points stored in each DynamoDB item
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring
Kinesis
IncomingBytes (stream/shard)
IncomingRecords (stream/shard)
GetRecords.IteratorAgeMilliseconds
ReadProvisionedThroughputExceeded
WriteProvisionedThroughputExceeded
DynamoDB
SuccessfulRequestLatency
Throttling events/errors
Consumed/provisioned capacity
UserErrors
SystemErrors
Lambda
Invocations
Errors
Duration
Throttles
IteratorAge
Time Series Data: Takeaways
DynamoDB:
- Know your data
- Structure
- Access patterns
- Know the cost model
- Writes are the most expensive resource
- Attribute names are counted in the item size
- Optimization:
- Binning—store multiple data points in a single item
- Compression
- TTL to delete cold data
- Queue-based load leveling for uneven workload patterns
Lambda:
- Reuse database connections
- Test for optimal batch size, memory/CPU, and execution time
Monitor!
Optimize
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Serving Transactions Serverless
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
About Capital One Bank
• One of the 10 largest banks
in the US based on deposits.
• Serving approximately 45
million customer accounts
across all products
• Online everywhere, with
branches or cafes in many
major cities
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The retail bank
has historically
been served by
one large
mainframe
About Capital One Bank
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We made significant investments in
our mobile experience…
” Best big bank for mobile banking.
”’Industry Star’ & ‘Best
Payment/Banking’ at the 8th annual
Mobile Excellence Awards
- nerdwallet
- January 2016
About Capital One Bank
And we’ve seen a large-
and-growing amount of
mobile traffic…
Mobile Monthly Unique Visitors
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our product
team is busy
coming up with
ways to use
transaction data
to help
customers…
About Capital One Bank
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
All of this drove up server requests,
and thus increasing speed and
reliability problems
” Phone app is not up to par,
laggy most of the time. It is very
difficult to manage the app
”The site has either been slow or
non-responsive
” It was my first time and it was a
little slow for me
About Capital One Bank
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What did we have to solve?
• Select an architecture that could solve our needs
• Creating a one-time copy of all our transactions data in the cloud (18+
months)
• Handling results of batch processing (both overnight and throughout
the day)
• Staying completely in sync with real time transactions as they happen
• Creating a new API in the cloud to expose the transactional data in the
cloud
• Building a secure and resilient cloud infrastructure
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What did we decide to do?
• Build a small team of engineers
• Make them responsible to solve the scalability/reliability problems,
with a lean towards serverless event driven architecture
• Hold that team accountable for everything
- Speed
- Data quality
- Data security
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Our CQRS Implementation
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transactions Hub—Logical Architecture
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services We Used
• Amazon S3
– Used to store the file feeds coming in from the Core Systems, also
used for archiving these files for now.
• Amazon SNS
– notification to humans
– notification to Lambdas to signal file arrival
• Lambda
– Event based architecture where compute resources are created only
when needed
– Orchestration layer for batch jobs (DAILY, MEMO, and HISTORICAL)
• Amazon CloudWatch rule
– used to check for batch work
• Amazon RDS
– Used to persist the state of batch jobs
• EC2/ASG/ELB
– Used to run spring-batch jobs, spring-boot containers for
MQ Listener and APIs.
• DynamoDB
– Used to store the transaction data
• CloudWatch
– Used to collect application logs, server logs, application
metrics, etc.
• IAM/KMS
– Used to manage encryption keys
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• Avg. Response time: 54.53 ms
• Total requests sent - 568956
• 10% of total requests
had 77 ms response time
• 5% of total requests had 96
ms response time
• Only 1% of total requests
had 345 ms response time
• Avg. TPS - ~ 145.85
New Solution Is Much Faster
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Full Suite of Business Monitoring
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transactions Hub Batch—Serverless
DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Transaction Hub—Expanding Ecosystem
Statements
Generating email alerts for millions of customers using serverless Lambda Functions
Business APIs as Lambda Functions
Making statements available for our customers across channels via Lambda Functions
Second Look
Leveraging DynamoDB streams to alert customers for certain transactions
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Statements: Serverless Email Delivery
DynamoDB DynamoDB
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Statements API as Lambda
DynamoDB DynamoDB
AWS Lambda AWS Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Second Look
• We have enabled streams on our DynamoDB transactions table
• AWS Lambda detects the new records as it polls the stream and executes the Lambda function
• From this lambda function we invoke the lambda functions for a feature called second look
• Second Look Lambda function alerts the customer for certain type of Transactions
• We are evaluating approximately 10 million transactions per day to check if we need to send alerts
DynamoDB
Streams
Stream Lambda Second Look
Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Lessons Learned and Best Practices
• Know your data
• Always test at scale
• Know your access patterns upfront
• Know your indexes
• VPC endpoint
• Encryption
• Container reuse for Lambda
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
Check out:
DAT304 – DynamoDB – What’s new
Wed, 3:15pm, Veronese 2405We appreciate your feedback!

More Related Content

What's hot

FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...
FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...
FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...Amazon Web Services
 
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...Amazon Web Services
 
An Overview of Best Practices for Large Scale Migrations
An Overview of Best Practices for Large Scale MigrationsAn Overview of Best Practices for Large Scale Migrations
An Overview of Best Practices for Large Scale MigrationsAmazon Web Services
 
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...Amazon Web Services
 
GPSBUS202_Driving Customer Value with Big Data Analytics
GPSBUS202_Driving Customer Value with Big Data AnalyticsGPSBUS202_Driving Customer Value with Big Data Analytics
GPSBUS202_Driving Customer Value with Big Data AnalyticsAmazon Web Services
 
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...Amazon Web Services
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersAmazon Web Services
 
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...Amazon Web Services
 
AWS Database and Analytics State of the Union
AWS Database and Analytics State of the UnionAWS Database and Analytics State of the Union
AWS Database and Analytics State of the UnionAmazon Web Services
 
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdfAMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdfAmazon Web Services
 
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...Amazon Web Services
 
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdf
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdfAMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdf
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdfAmazon Web Services
 
Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Amazon Web Services
 
ABD202_Best Practices for Building Serverless Big Data Applications
ABD202_Best Practices for Building Serverless Big Data ApplicationsABD202_Best Practices for Building Serverless Big Data Applications
ABD202_Best Practices for Building Serverless Big Data ApplicationsAmazon Web Services
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersAmazon Web Services
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersAmazon Web Services
 
Analyzing Streaming Data in Real-time with Amazon Kinesis
Analyzing Streaming Data in Real-time with Amazon KinesisAnalyzing Streaming Data in Real-time with Amazon Kinesis
Analyzing Streaming Data in Real-time with Amazon KinesisAmazon Web Services
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSAmazon Web Services
 
From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsFrom Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsAmazon Web Services
 

What's hot (20)

FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...
FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...
FSV307-Capital Markets Discovery How FINRA Runs Trade Analytics and Surveilla...
 
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
STG314-Case Study Learn How HERE Uses JFrog Artifactory w Amazon EFS Support ...
 
An Overview of Best Practices for Large Scale Migrations
An Overview of Best Practices for Large Scale MigrationsAn Overview of Best Practices for Large Scale Migrations
An Overview of Best Practices for Large Scale Migrations
 
GPSTEC307_Too Many Tools
GPSTEC307_Too Many ToolsGPSTEC307_Too Many Tools
GPSTEC307_Too Many Tools
 
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
GPSBUS221_Breaking Barriers Move Enterprise SAP Customers to SAP HANA on AWS ...
 
GPSBUS202_Driving Customer Value with Big Data Analytics
GPSBUS202_Driving Customer Value with Big Data AnalyticsGPSBUS202_Driving Customer Value with Big Data Analytics
GPSBUS202_Driving Customer Value with Big Data Analytics
 
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
CMP216_Use Amazon EC2 Spot Instances to Deploy a Deep Learning Framework on A...
 
Scaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million UsersScaling Up to Your First 10 Million Users
Scaling Up to Your First 10 Million Users
 
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...
LFS301-SAGE Bionetworks, Digital Mammography DREAM Challenge and How AWS Enab...
 
AWS Database and Analytics State of the Union
AWS Database and Analytics State of the UnionAWS Database and Analytics State of the Union
AWS Database and Analytics State of the Union
 
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdfAMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
AMF302-Alexa Wheres My Car A Test Drive of the AWS Connected Car Reference.pdf
 
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
RET301-Build Single Customer View across Multiple Retail Channels using AWS S...
 
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdf
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdfAMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdf
AMF303-Deep Dive into the Connected Vehicle Reference Architecture.pdf
 
Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)Migrating Your Databases to AWS – Tools and Services (Level 100)
Migrating Your Databases to AWS – Tools and Services (Level 100)
 
ABD202_Best Practices for Building Serverless Big Data Applications
ABD202_Best Practices for Building Serverless Big Data ApplicationsABD202_Best Practices for Building Serverless Big Data Applications
ABD202_Best Practices for Building Serverless Big Data Applications
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million users
 
Build a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million usersBuild a Website & Mobile App for your first 10 million users
Build a Website & Mobile App for your first 10 million users
 
Analyzing Streaming Data in Real-time with Amazon Kinesis
Analyzing Streaming Data in Real-time with Amazon KinesisAnalyzing Streaming Data in Real-time with Amazon Kinesis
Analyzing Streaming Data in Real-time with Amazon Kinesis
 
Introduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOSIntroduction to GraphQL and AWS Appsync on AWS - iOS
Introduction to GraphQL and AWS Appsync on AWS - iOS
 
From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time AnalyticsFrom Batch to Streaming - How Amazon Flex Uses Real-time Analytics
From Batch to Streaming - How Amazon Flex Uses Real-time Analytics
 

Similar to SRV301-Optimizing Serverless Application Data Tiers with Amazon DynamoDB

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 架構打造快速回應客戶需求的零售情境 (Level: 200)
如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)
如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)Amazon Web Services
 
Serverless Architecture and Best Practices
Serverless Architecture and Best PracticesServerless Architecture and Best Practices
Serverless Architecture and Best PracticesAmazon Web Services
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureJohn Yeung
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018AWS Germany
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWSAdrian Hornsby
 
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Amazon Web Services
 
Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicessaifam
 
Data Design for Microservices - DevDay Austin 2017 Day 2
Data Design for Microservices - DevDay Austin 2017 Day 2Data Design for Microservices - DevDay Austin 2017 Day 2
Data Design for Microservices - DevDay Austin 2017 Day 2Amazon Web Services
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWSDonnie Prakoso
 
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
 
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
 
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...Amazon Web Services
 
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitAmazon Web Services
 
8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloadsAdrian Hornsby
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep DiveAmazon Web Services
 
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Amazon Web Services
 

Similar to SRV301-Optimizing Serverless Application Data Tiers with Amazon DynamoDB (20)

Serverless Developer Experience
Serverless Developer ExperienceServerless Developer Experience
Serverless Developer Experience
 
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 架構打造快速回應客戶需求的零售情境 (Level: 200)
如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)
如何以 serverless 架構打造快速回應客戶需求的零售情境 (Level: 200)
 
Serverless Architecture and Best Practices
Serverless Architecture and Best PracticesServerless Architecture and Best Practices
Serverless Architecture and Best Practices
 
AWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless ArchitectureAWS Application Service Workshop - Serverless Architecture
AWS Application Service Workshop - Serverless Architecture
 
Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018Serverless Developer Experience I AWS Dev Day 2018
Serverless Developer Experience I AWS Dev Day 2018
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Getting started with Serverless on AWS
Getting started with Serverless on AWSGetting started with Serverless on AWS
Getting started with Serverless on AWS
 
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
Leadership Session: Using DevOps, Microservices, and Serverless to Accelerate...
 
Serverless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practicesServerless architecture-patterns-and-best-practices
Serverless architecture-patterns-and-best-practices
 
Data Design for Microservices - DevDay Austin 2017 Day 2
Data Design for Microservices - DevDay Austin 2017 Day 2Data Design for Microservices - DevDay Austin 2017 Day 2
Data Design for Microservices - DevDay Austin 2017 Day 2
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with 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...
 
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
 
Introduction to Serverless
Introduction to ServerlessIntroduction to Serverless
Introduction to Serverless
 
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...
RET304_Rapidly Respond to Demanding Retail Customers with the Same Serverless...
 
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS SummitBuild Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
Build Enterprise-Grade Serverless Apps - SRV315 - Atlanta AWS Summit
 
8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads8 ways to leverage AWS Lambda in your Big Data workloads
8 ways to leverage AWS Lambda in your Big Data workloads
 
Serverless Development Deep Dive
Serverless Development Deep DiveServerless Development Deep Dive
Serverless Development Deep Dive
 
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
Serverless Stream Processing Tips & Tricks (ANT358) - AWS re:Invent 2018
 

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
 

SRV301-Optimizing Serverless Application Data Tiers with Amazon DynamoDB

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT Optimizing Serverless Application Data Tiers with Amazon DynamoDB S r i n i U p p a l a p a t i – V i c e P r e s i d e n t , C o n s u m e r B a n k E n g i n e e r i n g , C a p i t a l O n e E d i n Z u l i c h – N o S Q L S o l u t i o n s A r c h i t e c t , A W S N o v e m b e r 2 7 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • DynamoDB in serverless applications • A bit about Amazon DynamoDB • Example: transactions and queries with microservices • Example: high volume time series data • Serverless at CapitalOne • Breaking down the monolith • Transaction Hub journey
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Serverless Platform AWS Lambda Amazon API Gateway Amazon S3 Amazon DynamoDB Amazon SNS & SQS AWS Step Functions Amazon Kinesis Amazon Athena Tooling https://aws.amazon.com/serverless/
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Serverless Platform AWS Lambda Amazon API Gateway Amazon S3 Amazon DynamoDB Amazon SNS & SQS AWS Step Functions Amazon Kinesis Amazon Athena Tooling https://aws.amazon.com/serverless/  No server management  Flexible scaling  High availability  No idle capacity
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is DynamoDB?
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is DynamoDB? - Fully managed NoSQL database service - Designed for OLTP use cases where you know access patterns - Designed to be used as an operational database that provides: - Extreme scale – now with Auto Scaling - Performance – single digit ms latency at any scale - High availability and reliability – zero downtime - Global availability – available in all AWS regions - Serverless experience – no servers and clusters to manage - Integration with AWS Lambda and other AWS services
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DynamoDB: Common Use Cases Market orders Tokenization (PHI, credit cards) Chat messages User profiles IoT sensor data & device status File metadata Social media feeds Shopping cart Sessions
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Reference Architecture (Processing Paths) AWS Lambda Amazon DynamoDB Amazon API Gateway Amazon DynamoDB Stream AWS Lambda Amazon S3 Amazon ES Amazon Athena Amazon DynamoDB Query sideOLTP/Command side Building blocks for serverless microservices 1. API Gateway + Lambda + DynamoDB: core building block 2. DynamoDB Streams + AWS Lambda: building block for reliable event delivery
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. DynamoDB Streams and AWS Lambda Partition A Partition B Partition C  Stream of item changes  Exactly once, guaranteed delivery  Strictly ordered by key  Durable, scalable  Fully-managed  24 hour data retention  Sub-second latency  Event source for AWS Lambda DynamoDB Streams 1 2 3 Updates GetRecords DynamoDB Table DynamoDB Stream Shards AWS Lambda Function DynamoDB Streams + AWS Lambda = reliable “at least once” event delivery
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. But It’s NoSQL! I need SQL… A deep dive on how we were using our existing databases revealed that they were frequently not used for their relational capabilities. About 70 percent of operations were of the key-value kind, where only a primary key was used and a single row would be returned. Werner Vogels CTO, Amazon, On database usage patterns at Amazon ” “
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Example: Transactions and Queries with DynamoDB and Microservices - An e-commerce app - Relational versus non-relational data model - Transactions in a distributed microservices architecture - Enabling querying in a distributed microservices architecture
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Example: E-commerce App Using Microservices shopping cart service product catalog service account service AWS Lambda API Gateway Amazon DynamoDBDB1 DB2 DB3 Serverless microservices
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Shopping Cart Data Model CART CartId: 1, LastUpdate: t3 CART_ITEM ItemId:2, Qty: 1, CartId: 1 Relational database CART CartID:2, LastUpdate: t3, Items: [ {ID: 2, Qty: 1}, {ID: 5, Qty: 2}] Non-relational database Normalized schema De-normalized: aggregates
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Updating Cart Using OCC CART CartID:2, LastUpdate: t3, CartItems: [ {ID: 2, Qty: 1}, {ID: 5, Qty: 2}]  Use conditions to implement optimistic concurrency control ensuring data consistency  GetItem call can be eventually consistent 1. Get the cart: GetItem { "TableName": “Cart”, "Key": {“CartId”: {“N”: “2”}} } 2. Update the cart: conditional PutItem (or UpdateItem) { "TableName": “Cart”, "Item": { “CartID”: {“N”: “2”}, “LastUpdate”: {“N”:”t4”}, “CartItems”: {…} }, "ConditionExpression": “LastUpdate = :v1”, "ExpressionAttributeValues": {":v1": {“N”: “t3”}} }
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transactions that Span Microservices shopping cart service product catalog service account service cart table product table account table TX: 1. checkout 2. inventory update 1. checkout 2. inventory update
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transaction: Cart Checkout cart {CheckOut: true, {product1,…}} AWS Lambda DynamoDB Stream product {pid: ”product1”, qty: 34} Pattern: Saga using DynamoDB Streams and Lambda Shopping cart service Product catalog service CartService.commit API{CheckOut: false, Items:{}}
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transaction: Cart Checkout Failure cart AWS Lambda DynamoDB Stream product {pid: ”product1”, qty: 0} Shopping cart service Product catalog service CartService.rollback API{CheckOut: false}
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Cart Table Update Scenarios Using OCC 1. Add/remove item: 1. get cart => tread = LastUpdate 2. update cart add/remove IF (LastUpdate = tread AND CheckOut = false) 2. Checkout begin: 1. get cart => tread = LastUpdate 2. update cart SET CheckOut = true IF (LastUpdate = tread AND CheckOut = false) 3. Checkout commit: 1. get cart => tread = LastUpdate 2. update cart SET items={}, CheckOut = false IF (LastUpdate = tread AND CheckOut = true) 4. Checkout rollback: 1. get cart => tread = LastUpdate 2. update cart SET CheckOut = false IF (LastUpdate = tread AND CheckOut = true)
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Another Building Block for Transactions: Step Functions • Define steps as a state machine • Each step is implemented as a Lambda function • Lambda functions have to be idempotent • This approach can be combined with the DynamoDB Streams based approach
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transactions with Microservices: Takeaways • Requirements: 1. Service atomically updates database and publishes events 2. Events delivered at least once • DynamoDB Streams + AWS Lambda approach satisfies both • Denormalized schema (aggregates) • Building blocks: DynamoDB Streams + AWS Lambda; Step Functions • Asynchronous and eventually consistent • Each service publishes its rollback method • Lambda functions have to be idempotent • Increased total transaction latency
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Querying in Microservices Architectures • Challenges • Data is segregated in different microservices’ databases • Operational view of data does not satisfy querying needs • Solution • Separate the operational and querying views • Polyglot persistence: use the right database for the job • Command Query Responsibility Segregation (CQRS)
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Enabling Querying with Microservices AWS Lambda Amazon DynamoDB Amazon API Gateway Amazon DynamoDB Stream AWS Lambda Amazon S3 Amazon ES Amazon Athena Amazon DynamoDB Query sideOLTP/Command side  Reliable downstream delivery of events via DynamoDB Streams and Lambda  Independently scalable Command and Query side Command Query Responsibility Segregation
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Querying with Microservices AWS Lambda DynamoDB Stream Different materialized views exposed as microservices Query service 2 Amazon ES Query service 1 Query service 3 Amazon Redshift Amazon DynamoDB Command side Query side Amazon DynamoDB
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple Subscribers: Fan-Out AWS LambdaDynamoDB Stream AWS LambdaDynamoDB Stream Amazon Kinesis Stream AWS Lambda based Amazon Kinesis based (or a message queue)
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Querying with Microservices: Takeaways • CQRS provides separation of concerns • CRUD operations and queries separated from each other • Each optimized for its responsibility • Each side is independently scalable • Each view can be exposed as a microservice • Eventual consistency and longer latency • Added complexity
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Example: High Volume Time Series Data What we need: 1. High volume ingest • 100,000 data points per second 2. Fast access for X days/months • By sensor ID + time range • Under 10 ms
  • 27. Time Series Data Example sensor_data SensorId: 123 Timestamp: 1492641900 Temp: 172 AWS Lambda Amazon Kinesis Stream • Sensor data (temp) from 1000’s of sensors • Store for fast access (<10 ms) • Access by sensor ID + time range • Store for 30 days DynamoDB SensorId: 123 Timestamp: 1492641900 MyTTL: 1492736400 Expiry Kinesis, DynamoDB partition key: Sensor ID DynamoDB sort key: Timestamp
  • 28. Solution Architecture Sensors AWS Lambda Amazon S3 hosted site Amazon DynamoDB Amazon Kinesis Amazon CloudWatch Amazon Cognito Amazon S3 AWS Lambda Amazon Kinesis Firehose Amazon DynamoDB Streams High-volume time-series data Fast access by sensor and time Data access pattern: sensor ID + time range
  • 29. Cost Considerations Data rate: 100,000 data points per second Data storage: 1 month’s worth = ~2.5 TB Estimated cost: Lambda: $2K – $5K per month Kinesis: 100,000 records -> 100 shards -> ~$5K per month DynamoDB: 100,000 WCU’s -> $50K per month Where is the problem? • DynamoDB Write Capacity Unit (WCU) is 1 KB • Our scenario: • Storing data points ~50 B in size • Write capacity utilization per write: 50/1024 * 100% = 4.88%
  • 30. Solution: DeviceId: 123 Timestamp: 1492641900 Temp: 172 MyTTL: 1492736400 AWS Lambda Kinesis Stream Group multiple data points into a single item – save on writes to DynamoDB Use Lambda batch size to control DynamoDB item size Batch-write to DynamoDB Use DynamoDB TTL to manage data lifetime Optional: use compression sensor_data DynamoDB Queue-based load leveling using AWS Lambda id: 123 dt: 1492641900 MyTTL: 1492736400 TTL Expiry
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Using TTL to Age Out Cold Data RCUs = 500 WCUs = 10000 HotdataCold data Lambda function detects items deleted by TTL in the stream and writes them to S3. sensor_data_table sensor_Id (Partition key) timestamp (sort key) my_TTL 1489188093 …. Attribute N DynamoDB table S3 AWS Lambda Kinesis Firehose An epoch timestamp item attribute denotes when an item can be deleted. TTL triggered deletion does not consume provisioned capacity. Time-To-Live
  • 32. Cost, Revised Data rate: 100,000 data points per second Data storage: 1 month’s worth = ~2.5 TB Lambda: $2K – $5K per month Kinesis: 100,000 records -> 100 shards -> ~$5K per month DynamoDB: 100,000 WCU’s -> $50K per month • Bin data points: 10 per item saves 10x in cost • 10,000 WCU’s -> $5K per month (10x less…) • Diff. over 1 year: $600K vs. $60K We can save a lot by storing multiple data points in a single record (DynamoDB item)
  • 33. Scaling Considerations Adding more sensors: - Kinesis: you need to add more shards - Lambda: scales automatically based on Kinesis shards - DynamoDB: scales automatically for space and throughput - Auto Scaling increases and decreases provisioned capacity as needed - For large spikes, provision capacity explicitly - Time-to-live (TTL) automatically deletes expired data without consuming provisioned capacity Adding more events per sensor: - Lambda function creates “denser” DynamoDB items - More data points stored in each DynamoDB item
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring Kinesis IncomingBytes (stream/shard) IncomingRecords (stream/shard) GetRecords.IteratorAgeMilliseconds ReadProvisionedThroughputExceeded WriteProvisionedThroughputExceeded DynamoDB SuccessfulRequestLatency Throttling events/errors Consumed/provisioned capacity UserErrors SystemErrors Lambda Invocations Errors Duration Throttles IteratorAge
  • 35. Time Series Data: Takeaways DynamoDB: - Know your data - Structure - Access patterns - Know the cost model - Writes are the most expensive resource - Attribute names are counted in the item size - Optimization: - Binning—store multiple data points in a single item - Compression - TTL to delete cold data - Queue-based load leveling for uneven workload patterns Lambda: - Reuse database connections - Test for optimal batch size, memory/CPU, and execution time Monitor! Optimize
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Serving Transactions Serverless
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. About Capital One Bank • One of the 10 largest banks in the US based on deposits. • Serving approximately 45 million customer accounts across all products • Online everywhere, with branches or cafes in many major cities
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The retail bank has historically been served by one large mainframe About Capital One Bank
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We made significant investments in our mobile experience… ” Best big bank for mobile banking. ”’Industry Star’ & ‘Best Payment/Banking’ at the 8th annual Mobile Excellence Awards - nerdwallet - January 2016 About Capital One Bank And we’ve seen a large- and-growing amount of mobile traffic… Mobile Monthly Unique Visitors
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our product team is busy coming up with ways to use transaction data to help customers… About Capital One Bank
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. All of this drove up server requests, and thus increasing speed and reliability problems ” Phone app is not up to par, laggy most of the time. It is very difficult to manage the app ”The site has either been slow or non-responsive ” It was my first time and it was a little slow for me About Capital One Bank
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What did we have to solve? • Select an architecture that could solve our needs • Creating a one-time copy of all our transactions data in the cloud (18+ months) • Handling results of batch processing (both overnight and throughout the day) • Staying completely in sync with real time transactions as they happen • Creating a new API in the cloud to expose the transactional data in the cloud • Building a secure and resilient cloud infrastructure
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What did we decide to do? • Build a small team of engineers • Make them responsible to solve the scalability/reliability problems, with a lean towards serverless event driven architecture • Hold that team accountable for everything - Speed - Data quality - Data security
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Our CQRS Implementation
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transactions Hub—Logical Architecture
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Services We Used • Amazon S3 – Used to store the file feeds coming in from the Core Systems, also used for archiving these files for now. • Amazon SNS – notification to humans – notification to Lambdas to signal file arrival • Lambda – Event based architecture where compute resources are created only when needed – Orchestration layer for batch jobs (DAILY, MEMO, and HISTORICAL) • Amazon CloudWatch rule – used to check for batch work • Amazon RDS – Used to persist the state of batch jobs • EC2/ASG/ELB – Used to run spring-batch jobs, spring-boot containers for MQ Listener and APIs. • DynamoDB – Used to store the transaction data • CloudWatch – Used to collect application logs, server logs, application metrics, etc. • IAM/KMS – Used to manage encryption keys
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • Avg. Response time: 54.53 ms • Total requests sent - 568956 • 10% of total requests had 77 ms response time • 5% of total requests had 96 ms response time • Only 1% of total requests had 345 ms response time • Avg. TPS - ~ 145.85 New Solution Is Much Faster
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Full Suite of Business Monitoring
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transactions Hub Batch—Serverless DynamoDB
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Transaction Hub—Expanding Ecosystem Statements Generating email alerts for millions of customers using serverless Lambda Functions Business APIs as Lambda Functions Making statements available for our customers across channels via Lambda Functions Second Look Leveraging DynamoDB streams to alert customers for certain transactions
  • 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Statements: Serverless Email Delivery DynamoDB DynamoDB
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Statements API as Lambda DynamoDB DynamoDB AWS Lambda AWS Lambda
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Second Look • We have enabled streams on our DynamoDB transactions table • AWS Lambda detects the new records as it polls the stream and executes the Lambda function • From this lambda function we invoke the lambda functions for a feature called second look • Second Look Lambda function alerts the customer for certain type of Transactions • We are evaluating approximately 10 million transactions per day to check if we need to send alerts DynamoDB Streams Stream Lambda Second Look Lambda
  • 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Lessons Learned and Best Practices • Know your data • Always test at scale • Know your access patterns upfront • Know your indexes • VPC endpoint • Encryption • Container reuse for Lambda
  • 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! Check out: DAT304 – DynamoDB – What’s new Wed, 3:15pm, Veronese 2405We appreciate your feedback!