SlideShare a Scribd company logo
Intro
Amazon Dynamo DB
2
▪ Amazon DynamoDB is a fully managed NoSQL
database service that allows to create database
tables that can store and retrieve any amount of
data.
▪ It automatically manages the data traffic of tables
over multiple servers and maintains performance.
▪ It also relieves the customers from the burden of
operating and scaling a distributed database.
▪ Hence, hardware provisioning, setup,
configuration, replication, software patching,
cluster scaling, etc. is managed by Amazon.
Benefits of AWS Dynamo DB
3
▪ Scalable − Amazon DynamoDB is designed to scale.There is no need
to worry about predefined limits to the amount of data each table can
store. Any amount of data can be stored and retrieved. DynamoDB
will spread automatically with the amount of data stored as the table
grows.
▪ Fast − Amazon DynamoDB provides high throughput at very low
latency. As datasets grow, latencies remain stable due to the
distributed nature of DynamoDB's data placement and request
routing algorithms.
▪ Durable and highly available − Amazon DynamoDB replicates data
over at least 3 different data centers’ results.The system operates
and serves data even under various failure conditions.
▪ Flexible: Amazon DynamoDB allows creation of dynamic tables, i.e.
the table can have any number of attributes, including multi-valued
attributes.
▪ Cost-effective: Payment is for what we use without any minimum
charges. Its pricing structure is simple and easy to calculate.
Create DynamoDB Table
4
▪ Step 1: Create a NoSQLTable
▪ In this step, you will use the DynamoDB console to create a
table.
– In the DynamoDB console, choose Create table.
Create DynamoDB Table
5
– We will use a music library as our use case for this tutorial. In theTable
name box, type Music.
Create DynamoDB Table
6
– The partition key is used to spread data across partitions for scalability.
It’s important to choose an attribute with a wide range of values and that
is likely to have evenly distributed access patterns.Type Artist in
the Partition key box.
Create DynamoDB Table
7
– Because each artist may write many songs, you can enable easy sorting
with a sort key. Select the Add sort key check box.Type songTitle in
the Add sort key box.
Create DynamoDB Table
8
– Next, you will enable DynamoDB auto scaling for your table.
– DynamoDB auto scaling will change the read and write capacity of your
table based on request volume. Using anAWS Identity and Access
Management (AWS IAM) role called DynamoDBAutoscaleRole,
DynamoDB will manage the auto scaling process on your behalf.
DynamoDB creates this role for you the first time you enable auto scaling
in an account.
– Instruct DynamoDB to create the role by clearing the Use default
settings check box.
Create DynamoDB Table
9
– Scroll down the screen past Secondary indexes, Provisioned capacity,
andAuto Scaling to the Create button.We won't change these settings for
the tutorial.
– In the Auto Scaling section, notice that DynamoDB will create
the DynamoDBAutoscaleRole role for you.
– Now choose Create.
– When the Music table is ready to use, it appears in the table list with
a check box .
– Congratulations!You have created a NoSQL table using the DynamoDB
console.
Managing Indexes
10
▪ Indexes give you access to alternate query patterns, and can
speed up queries.This section compares and contrasts index
creation and usage in SQL and DynamoDB.
▪ Whether you are using a relational database or DynamoDB, you
should be judicious with index creation.
▪ Whenever a write occurs on a table, all of the table's indexes
must be updated.
▪ In a write-heavy environment with large tables, this can
consume large amounts of system resources.
▪ In a read-only or read-mostly environment, this is not as much
of a concern—however, you should ensure that the indexes are
actually being used by your application, and not simply taking
up space.
Creating an Index
11
▪ In DynamoDB, you can create and use a secondary index for
similar purposes.
▪ Indexes in DynamoDB are different from their relational
counterparts.When you create a secondary index, you must
specify its key attributes – a partition key and a sort key. After
you create the secondary index, you can Query it or Scan it just
as you would with a table. DynamoDB does not have a query
optimizer, so a secondary index is only used when you Query it
or Scan it.
▪ DynamoDB supports two different kinds of indexes:
– Global secondary indexes –The primary key of the index can be any two
attributes from its table.
– Local secondary indexes –The partition key of the index must be the
same as the partition key of its table. However, the sort key can be any
other attribute.
DynamoDB Query
12
▪ Allow you to find items using only primary key values from
table or secondary index
▪ Benefits:
– Returns the item matching the primary key search
– Much more efficiency because it searches indexes only
– Returns all attributes of an item, or only the ones you want
– Is eventually consistent by default but can request a consistent read
– Can use conditional operators and filters to return precise results
DynamoDB Scan
13
▪ Reads every item in the table and is operationally inefficient
▪ Looks for all items and attributes in a table by default
▪ Benefits;
– Scans can apply filters to the results to refine values
– Can return only specific attributes with
the ProjectionExpression parameter
▪ Negatives:
– The larger the data set in the table the slower performance of
a scan
– The more filters on the scan the slower the performance
– Returns only filtered results
– Only eventually consistent reads are available
DynamoDB Scans – If you must
use them
14
▪ What you should keep in mind:
– You can reduce Page Size of an operation with
the Limit parameter, to limit how much data you try to
retrieve at the same time
– Avoid performing Scans on mission-critical tables
– Program your application logic to retry any requests that
receives a response code saying that you exceeded
provisioned throughput (or increase throughput)
DynamoDB & Provisioned
Throughput
15
DynamoDB & Provisioned
Throughput
16
▪ DynamoDB auto scaling actively manages throughput capacity for
tables and global secondary indexes. With auto scaling, you define a
range (upper and lower limits) for read and write capacity units.
▪ You also define a target utilization percentage within that range.
DynamoDB auto scaling seeks to maintain your target utilization,
even as your application workload increases or decreases.
▪ With DynamoDB auto scaling, a table or a global secondary index
can increase its provisioned read and write capacity to handle
sudden increases in traffic, without request throttling.
▪ When the workload decreases, DynamoDB auto scaling can
decrease the throughput so that you don't pay for unused
provisioned capacity.
DynamoDB & Provisioned
Throughput
17
▪ If you aren't using DynamoDB auto scaling, you have to manually define
your throughput requirements. Provisioned throughput is the maximum
amount of capacity that an application can consume from a table or index.
If your application exceeds your provisioned throughput settings, it is
subject to request throttling.
▪ For example, suppose that you want to read 80 items per second from a
table.The items are 3 KB in size, and you want strongly consistent reads.
For this scenario, each read requires one provisioned read capacity unit.To
determine this, you divide the item size of the operation by 4 KB, and then
round up to the nearest whole number, as in this example:
▪ 3 KB / 4 KB = 0.75, or 1 read capacity unit
▪ For this scenario, you have to set the table's provisioned read throughput to
80 read capacity units:
▪ 1 read capacity unit per item × 80 reads per second = 80 read capacity units
DynamoDB & Provisioned
Throughput
18
▪ Now suppose that you want to write 100 items per second to
your table, and that the items are 512 bytes in size. For this
scenario, each write requires one provisioned write capacity
unit.To determine this, you divide the item size of the
operation by 1 KB, and then round up to the nearest whole
number:
▪ 512 bytes / 1 KB = 0.5, or 1
▪ For this scenario, you would want to set the table's provisioned
write throughput to 100 write capacity units:
▪ 1 write capacity unit per item × 100 writes per second
= 100 write capacity units
Summary
19

More Related Content

PPTX
Introduction to aws dynamo db
PDF
Deep Dive into DynamoDB
PDF
Amazon DynamoDB Lessen's Learned by Beginner
PPTX
AWS (Amazon Redshift) presentation
PDF
Amazon Dynamo DB for Developers (김일호) - AWS DB Day
PDF
Getting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB Day
DOCX
Dynamo db pros and cons
PPTX
The Rise Of Scanamo: Async Access For DynamoDB In Scala
Introduction to aws dynamo db
Deep Dive into DynamoDB
Amazon DynamoDB Lessen's Learned by Beginner
AWS (Amazon Redshift) presentation
Amazon Dynamo DB for Developers (김일호) - AWS DB Day
Getting Strated with Amazon Dynamo DB (Jim Scharf) - AWS DB Day
Dynamo db pros and cons
The Rise Of Scanamo: Async Access For DynamoDB In Scala

Similar to Dynamo db (20)

PPTX
MongoDB Database With Docker.pptx MongoDB Database With Docker.pptx
PPTX
DynamoDB Database Integration.pptx it's dynamodb databse related stufs
PPTX
NOSQL introduction for big data analytics
PDF
Amazon DynamoDB
PPTX
AWS database services
ODP
The Rise of Scanamo: Async Access for DynamoDB in Scala
PDF
Amazon RedShift - Ianni Vamvadelis
PPTX
Databases on aws part 1
PDF
Db2 performance tuning for dummies
PDF
GCP Data Engineer cheatsheet
PPTX
Sap abap
PPTX
GIDS 2016 Understanding and Building No SQLs
PDF
Amazon DynamoDB by Aswin
PDF
Gcp data engineer
PDF
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
PPTX
Compare DynamoDB vs. MongoDB
PPTX
Dynamo vs Mongo
PPTX
week 5 cloud security computing northumbria foudation
PPTX
Maximizing performance via tuning and optimization
PPTX
Maximizing performance via tuning and optimization
MongoDB Database With Docker.pptx MongoDB Database With Docker.pptx
DynamoDB Database Integration.pptx it's dynamodb databse related stufs
NOSQL introduction for big data analytics
Amazon DynamoDB
AWS database services
The Rise of Scanamo: Async Access for DynamoDB in Scala
Amazon RedShift - Ianni Vamvadelis
Databases on aws part 1
Db2 performance tuning for dummies
GCP Data Engineer cheatsheet
Sap abap
GIDS 2016 Understanding and Building No SQLs
Amazon DynamoDB by Aswin
Gcp data engineer
DB2 LUW V11.1 CERTIFICATION TRAINING PART #1
Compare DynamoDB vs. MongoDB
Dynamo vs Mongo
week 5 cloud security computing northumbria foudation
Maximizing performance via tuning and optimization
Maximizing performance via tuning and optimization
Ad

More from Parag Patil (16)

PPTX
Aws overview part 1(iam and storage services)
PPTX
Aws overview part 2(compute services)
PPTX
Aws object storage and cdn(s3, glacier and cloud front) part 1
PPTX
Billing & pricing
PPTX
Databases overview & concepts
PPTX
Spring boot-application
PPTX
Databases on aws part 2
PPTX
Aws object storage and cdn(s3, glacier and cloud front) part 2
PPTX
Security
PPTX
Development tools
PPTX
Cloud concepts-and-technologies
PPTX
Aws overview part 3(databases, dns and management services)
PPTX
Word press site
PPTX
Aws object storage and cdn(s3, glacier and cloud front) part 3
PPTX
Elastic beanstalk
PPTX
Identity access management (iam)
Aws overview part 1(iam and storage services)
Aws overview part 2(compute services)
Aws object storage and cdn(s3, glacier and cloud front) part 1
Billing & pricing
Databases overview & concepts
Spring boot-application
Databases on aws part 2
Aws object storage and cdn(s3, glacier and cloud front) part 2
Security
Development tools
Cloud concepts-and-technologies
Aws overview part 3(databases, dns and management services)
Word press site
Aws object storage and cdn(s3, glacier and cloud front) part 3
Elastic beanstalk
Identity access management (iam)
Ad

Recently uploaded (20)

PPTX
Photography 101 basics class presentation
PPT
From India to the World How We Export Eco-Friendly Holi Colours Globally.ppt
PPTX
Expert Tree Pruning & Maintenance Services in Sydney
PDF
Summer Cleaning Checklist Refresh Your Home for the Warmer Months.pdf
PPTX
Why Outsourcing Debt Collection Saves Time and Money.pptx
PDF
Secure Your World with Acme Enterprises PDF Sharing.pdf
PDF
Xinzex: A Complete Web Development Guide for Beginners
PDF
Risk Assessment Survey of the Esarbica 2025.pdf
PPTX
Enhancing Wastewater Treatment Efficiency with GO2™ Water Treatment Chlorine ...
PPTX
The Rise of Work-from-Home Internships.pptx
PDF
Threat Intelligence Services in Abu Dhabi
PDF
promote digital marketing services .pdf
PDF
The Rise of ICOs in Environmental and Sustainability Projects (2).pdf
PDF
SPECIAL CRIME INVEST COMbjubgjkknnjj.pdf
PDF
Recruitment Services in Bangalore.pdf OSG
PDF
Resealing and Protecting Outdoor Wood Features Before Summer Peaks.pdf
PPTX
Ealeba Youth Structure Five Core Programs & Projects Executives
PDF
Best Private Bba Colleges | Galgotias University
PDF
Optimize Freight, Fleet, and Fulfillment with Scalable Logistics Solutions.pdf
PDF
Green minimalist professional Business Proposal Presentation.pdf
Photography 101 basics class presentation
From India to the World How We Export Eco-Friendly Holi Colours Globally.ppt
Expert Tree Pruning & Maintenance Services in Sydney
Summer Cleaning Checklist Refresh Your Home for the Warmer Months.pdf
Why Outsourcing Debt Collection Saves Time and Money.pptx
Secure Your World with Acme Enterprises PDF Sharing.pdf
Xinzex: A Complete Web Development Guide for Beginners
Risk Assessment Survey of the Esarbica 2025.pdf
Enhancing Wastewater Treatment Efficiency with GO2™ Water Treatment Chlorine ...
The Rise of Work-from-Home Internships.pptx
Threat Intelligence Services in Abu Dhabi
promote digital marketing services .pdf
The Rise of ICOs in Environmental and Sustainability Projects (2).pdf
SPECIAL CRIME INVEST COMbjubgjkknnjj.pdf
Recruitment Services in Bangalore.pdf OSG
Resealing and Protecting Outdoor Wood Features Before Summer Peaks.pdf
Ealeba Youth Structure Five Core Programs & Projects Executives
Best Private Bba Colleges | Galgotias University
Optimize Freight, Fleet, and Fulfillment with Scalable Logistics Solutions.pdf
Green minimalist professional Business Proposal Presentation.pdf

Dynamo db

  • 2. Amazon Dynamo DB 2 ▪ Amazon DynamoDB is a fully managed NoSQL database service that allows to create database tables that can store and retrieve any amount of data. ▪ It automatically manages the data traffic of tables over multiple servers and maintains performance. ▪ It also relieves the customers from the burden of operating and scaling a distributed database. ▪ Hence, hardware provisioning, setup, configuration, replication, software patching, cluster scaling, etc. is managed by Amazon.
  • 3. Benefits of AWS Dynamo DB 3 ▪ Scalable − Amazon DynamoDB is designed to scale.There is no need to worry about predefined limits to the amount of data each table can store. Any amount of data can be stored and retrieved. DynamoDB will spread automatically with the amount of data stored as the table grows. ▪ Fast − Amazon DynamoDB provides high throughput at very low latency. As datasets grow, latencies remain stable due to the distributed nature of DynamoDB's data placement and request routing algorithms. ▪ Durable and highly available − Amazon DynamoDB replicates data over at least 3 different data centers’ results.The system operates and serves data even under various failure conditions. ▪ Flexible: Amazon DynamoDB allows creation of dynamic tables, i.e. the table can have any number of attributes, including multi-valued attributes. ▪ Cost-effective: Payment is for what we use without any minimum charges. Its pricing structure is simple and easy to calculate.
  • 4. Create DynamoDB Table 4 ▪ Step 1: Create a NoSQLTable ▪ In this step, you will use the DynamoDB console to create a table. – In the DynamoDB console, choose Create table.
  • 5. Create DynamoDB Table 5 – We will use a music library as our use case for this tutorial. In theTable name box, type Music.
  • 6. Create DynamoDB Table 6 – The partition key is used to spread data across partitions for scalability. It’s important to choose an attribute with a wide range of values and that is likely to have evenly distributed access patterns.Type Artist in the Partition key box.
  • 7. Create DynamoDB Table 7 – Because each artist may write many songs, you can enable easy sorting with a sort key. Select the Add sort key check box.Type songTitle in the Add sort key box.
  • 8. Create DynamoDB Table 8 – Next, you will enable DynamoDB auto scaling for your table. – DynamoDB auto scaling will change the read and write capacity of your table based on request volume. Using anAWS Identity and Access Management (AWS IAM) role called DynamoDBAutoscaleRole, DynamoDB will manage the auto scaling process on your behalf. DynamoDB creates this role for you the first time you enable auto scaling in an account. – Instruct DynamoDB to create the role by clearing the Use default settings check box.
  • 9. Create DynamoDB Table 9 – Scroll down the screen past Secondary indexes, Provisioned capacity, andAuto Scaling to the Create button.We won't change these settings for the tutorial. – In the Auto Scaling section, notice that DynamoDB will create the DynamoDBAutoscaleRole role for you. – Now choose Create. – When the Music table is ready to use, it appears in the table list with a check box . – Congratulations!You have created a NoSQL table using the DynamoDB console.
  • 10. Managing Indexes 10 ▪ Indexes give you access to alternate query patterns, and can speed up queries.This section compares and contrasts index creation and usage in SQL and DynamoDB. ▪ Whether you are using a relational database or DynamoDB, you should be judicious with index creation. ▪ Whenever a write occurs on a table, all of the table's indexes must be updated. ▪ In a write-heavy environment with large tables, this can consume large amounts of system resources. ▪ In a read-only or read-mostly environment, this is not as much of a concern—however, you should ensure that the indexes are actually being used by your application, and not simply taking up space.
  • 11. Creating an Index 11 ▪ In DynamoDB, you can create and use a secondary index for similar purposes. ▪ Indexes in DynamoDB are different from their relational counterparts.When you create a secondary index, you must specify its key attributes – a partition key and a sort key. After you create the secondary index, you can Query it or Scan it just as you would with a table. DynamoDB does not have a query optimizer, so a secondary index is only used when you Query it or Scan it. ▪ DynamoDB supports two different kinds of indexes: – Global secondary indexes –The primary key of the index can be any two attributes from its table. – Local secondary indexes –The partition key of the index must be the same as the partition key of its table. However, the sort key can be any other attribute.
  • 12. DynamoDB Query 12 ▪ Allow you to find items using only primary key values from table or secondary index ▪ Benefits: – Returns the item matching the primary key search – Much more efficiency because it searches indexes only – Returns all attributes of an item, or only the ones you want – Is eventually consistent by default but can request a consistent read – Can use conditional operators and filters to return precise results
  • 13. DynamoDB Scan 13 ▪ Reads every item in the table and is operationally inefficient ▪ Looks for all items and attributes in a table by default ▪ Benefits; – Scans can apply filters to the results to refine values – Can return only specific attributes with the ProjectionExpression parameter ▪ Negatives: – The larger the data set in the table the slower performance of a scan – The more filters on the scan the slower the performance – Returns only filtered results – Only eventually consistent reads are available
  • 14. DynamoDB Scans – If you must use them 14 ▪ What you should keep in mind: – You can reduce Page Size of an operation with the Limit parameter, to limit how much data you try to retrieve at the same time – Avoid performing Scans on mission-critical tables – Program your application logic to retry any requests that receives a response code saying that you exceeded provisioned throughput (or increase throughput)
  • 16. DynamoDB & Provisioned Throughput 16 ▪ DynamoDB auto scaling actively manages throughput capacity for tables and global secondary indexes. With auto scaling, you define a range (upper and lower limits) for read and write capacity units. ▪ You also define a target utilization percentage within that range. DynamoDB auto scaling seeks to maintain your target utilization, even as your application workload increases or decreases. ▪ With DynamoDB auto scaling, a table or a global secondary index can increase its provisioned read and write capacity to handle sudden increases in traffic, without request throttling. ▪ When the workload decreases, DynamoDB auto scaling can decrease the throughput so that you don't pay for unused provisioned capacity.
  • 17. DynamoDB & Provisioned Throughput 17 ▪ If you aren't using DynamoDB auto scaling, you have to manually define your throughput requirements. Provisioned throughput is the maximum amount of capacity that an application can consume from a table or index. If your application exceeds your provisioned throughput settings, it is subject to request throttling. ▪ For example, suppose that you want to read 80 items per second from a table.The items are 3 KB in size, and you want strongly consistent reads. For this scenario, each read requires one provisioned read capacity unit.To determine this, you divide the item size of the operation by 4 KB, and then round up to the nearest whole number, as in this example: ▪ 3 KB / 4 KB = 0.75, or 1 read capacity unit ▪ For this scenario, you have to set the table's provisioned read throughput to 80 read capacity units: ▪ 1 read capacity unit per item × 80 reads per second = 80 read capacity units
  • 18. DynamoDB & Provisioned Throughput 18 ▪ Now suppose that you want to write 100 items per second to your table, and that the items are 512 bytes in size. For this scenario, each write requires one provisioned write capacity unit.To determine this, you divide the item size of the operation by 1 KB, and then round up to the nearest whole number: ▪ 512 bytes / 1 KB = 0.5, or 1 ▪ For this scenario, you would want to set the table's provisioned write throughput to 100 write capacity units: ▪ 1 write capacity unit per item × 100 writes per second = 100 write capacity units

Editor's Notes

  • #5: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/
  • #6: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/
  • #7: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/
  • #8: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/
  • #9: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/
  • #10: https://aws.amazon.com/getting-started/tutorials/create-nosql-table/