[{"data":1,"prerenderedAt":228},["ShallowReactive",2],{"content-svc-dynamodb-guides-using-dynamodbto-build-webapps-03-dynamodb-intro":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":18,"menu":19,"menuType":224,"isCollapseableMenu":22,"nextDocItem":71,"previousDocItem":45,"contributorPaths":225,"contentName":227,"slug":70,"readingTime":67},"\u003Ch1>Amazon DynamoDB 101\u003C\u002Fh1>\n\u003Cp>Amazon DynamoDB is a fast, flexible, serverless NoSQL database service that delivers single-digit millisecond performance at any scale.\u003C\u002Fp>\n\u003Ch2>Data Models\u003C\u002Fh2>\n\u003Cp>DynamoDB supports two main data models: \u003Cstrong>key-value\u003C\u002Fstrong> and \u003Cstrong>wide-column\u003C\u002Fstrong>. These data models are highly efficient for retrieving items.\u003C\u002Fp>\n\u003Cp>The key-value data model allows you to retrieve one item at a time using a primary key. It functions like a massive hash, enabling fast retrieval when the primary key is known.\u003C\u002Fp>\n\u003Cp>For more complex access patterns, you can use the wide-column data model provided by DynamoDB. In this model, the hash is still required, but the value for each hash record is a B-tree. A B-tree is a data structure that enables quick element retrieval and range queries.\u003C\u002Fp>\n\u003Ch2>Main Components\u003C\u002Fh2>\n\u003Cp>DynamoDB organizes data into \u003Cstrong>tables\u003C\u002Fstrong>. You can create or delete a table with a simple API call. Each table contains \u003Cstrong>items\u003C\u002Fstrong>, and each item has \u003Cstrong>attributes\u003C\u002Fstrong>. Every item requires at least one attribute, which is the partition key. Optionally, you can define a sort key, which becomes another required attribute for each item.\u003C\u002Fp>\n\u003Cp>The combination of the partition key and sort key (if defined) forms the \u003Cstrong>primary key\u003C\u002Fstrong>, which must be unique. Each item can also have additional attributes, and the set of attributes can vary from item to item.\u003C\u002Fp>\n\u003Cp>DynamoDB also supports \u003Cstrong>secondary indexes\u003C\u002Fstrong>. While primary keys allow access to data, secondary indexes provide alternative ways to retrieve data efficiently. There are two types of secondary indexes: \u003Cstrong>local secondary indexes\u003C\u002Fstrong> and \u003Cstrong>global secondary indexes\u003C\u002Fstrong>.\u003C\u002Fp>\n\u003Ch2>Operations\u003C\u002Fh2>\n\u003Cp>DynamoDB offers three main types of operations:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Item-based operations\u003C\u002Fstrong>: These operations are performed on individual items in a table.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Queries\u003C\u002Fstrong>: Queries operate on a group of items that share the same partition key in a table or secondary index. This group is referred to as an \u003Cstrong>item collection\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Scans\u003C\u002Fstrong>: Scans retrieve all items in a table, which can be useful when you need to analyze or process the entire dataset.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>Pricing\u003C\u002Fh2>\n\u003Cp>DynamoDB is a cloud-based NoSQL database service that charges customers based on the amount of data stored and the amount of data read and written. The pricing is as follows:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Storage costs\u003C\u002Fstrong>: Based on the amount of data stored per month, measured in GB-month. This includes data and indexes.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Read capacity units (RCUs)\u003C\u002Fstrong>: Charged for data read from DynamoDB. One RCU is charged for each strongly consistent read per second, two for transactional reads, and half for each eventually consistent read per second (up to 4 KB).\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Write capacity units (WCUs)\u003C\u002Fstrong>: Charged for data written to DynamoDB. One WCU is charged for each write per second (up to 1 KB), and two WCUs for each transactional write per second.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>For detailed information on DynamoDB pricing, refer to the \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fdynamodb\u002Fpricing\u002F\">Amazon DynamoDB Pricing\u003C\u002Fa> page.\u003C\u002Fp>\n",{"title":6,"order":7,"youtubeVideoID":8,"resources":9},"Amazon DynamoDB 101",4,"tkj2r7kFcpM",[10,14],{"link":11,"text":12,"type":13},"https:\u002F\u002Faws.amazon.com\u002Fdynamodb\u002F","Amazon DynamoDB service page","service",{"link":15,"type":16,"text":17},"https:\u002F\u002Faws.amazon.com\u002Fdynamodb\u002Fpricing\u002F","pricing","Amazon DynamoDB pricing","# Amazon DynamoDB 101\n\nAmazon DynamoDB is a fast, flexible, serverless NoSQL database service that delivers single-digit millisecond performance at any scale.\n\n## Data Models\n\nDynamoDB supports two main data models: **key-value** and **wide-column**. These data models are highly efficient for retrieving items.\n\nThe key-value data model allows you to retrieve one item at a time using a primary key. It functions like a massive hash, enabling fast retrieval when the primary key is known.\n\nFor more complex access patterns, you can use the wide-column data model provided by DynamoDB. In this model, the hash is still required, but the value for each hash record is a B-tree. A B-tree is a data structure that enables quick element retrieval and range queries.\n\n## Main Components\n\nDynamoDB organizes data into **tables**. You can create or delete a table with a simple API call. Each table contains **items**, and each item has **attributes**. Every item requires at least one attribute, which is the partition key. Optionally, you can define a sort key, which becomes another required attribute for each item.\n\nThe combination of the partition key and sort key (if defined) forms the **primary key**, which must be unique. Each item can also have additional attributes, and the set of attributes can vary from item to item.\n\nDynamoDB also supports **secondary indexes**. While primary keys allow access to data, secondary indexes provide alternative ways to retrieve data efficiently. There are two types of secondary indexes: **local secondary indexes** and **global secondary indexes**.\n\n## Operations\n\nDynamoDB offers three main types of operations:\n\n1. **Item-based operations**: These operations are performed on individual items in a table.\n2. **Queries**: Queries operate on a group of items that share the same partition key in a table or secondary index. This group is referred to as an **item collection**.\n3. **Scans**: Scans retrieve all items in a table, which can be useful when you need to analyze or process the entire dataset.\n\n## Pricing\n\nDynamoDB is a cloud-based NoSQL database service that charges customers based on the amount of data stored and the amount of data read and written. The pricing is as follows:\n\n- **Storage costs**: Based on the amount of data stored per month, measured in GB-month. This includes data and indexes.\n- **Read capacity units (RCUs)**: Charged for data read from DynamoDB. One RCU is charged for each strongly consistent read per second, two for transactional reads, and half for each eventually consistent read per second (up to 4 KB).\n- **Write capacity units (WCUs)**: Charged for data written to DynamoDB. One WCU is charged for each write per second (up to 1 KB), and two WCUs for each transactional write per second.\n\nFor detailed information on DynamoDB pricing, refer to the [Amazon DynamoDB Pricing](https:\u002F\u002Faws.amazon.com\u002Fdynamodb\u002Fpricing\u002F) page.\n",[20,31,60,86,121,178,216],{"title":21,"collapsible":22,"isCollapsed":23,"content":24},"Introduction",false,true,[25],{"title":21,"order":26,"time":27,"path":28,"id":29,"link":30},1,"2 min","introduction","introduction.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002Fintroduction",{"title":32,"collapsible":22,"isCollapsed":23,"content":33},"1. Hosting Your Application with App Runner",[34,45],{"title":35,"order":36,"youtubeVideoID":37,"resources":38,"time":27,"path":42,"id":43,"link":44},"What is AWS App Runner?",2,"z-RywG7Xfk8",[39],{"link":40,"text":41,"type":13},"https:\u002F\u002Faws.amazon.com\u002FApp Runner\u002F","AWS App Runner","01-apprunnerintro","01-apprunnerintro.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F01-apprunnerintro",{"title":46,"order":47,"youtubeVideoID":48,"resources":49,"time":27,"path":57,"id":58,"link":59},"AWS AppRunner Demo",3,"jOwQdXbmHC4",[50,54],{"link":51,"text":52,"type":53},"https:\u002F\u002Fgithub.com\u002Fmavi888\u002Fnodeexpress-backend-app","NodeJS application code","code",{"link":55,"type":53,"text":56},"https:\u002F\u002Fgithub.com\u002Fmavi888\u002Fcdk-migrated-app-infra\u002Ftree\u002Fapprunner","AWS CDK infrastructure code","02-apprunnerdemo","02-apprunnerdemo.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F02-apprunnerdemo",{"title":61,"collapsible":22,"isCollapsed":22,"content":62},"2.Understanding DynamoDB Basics",[63,71],{"title":6,"order":7,"youtubeVideoID":8,"resources":64,"time":67,"path":68,"id":69,"link":70},[65,66],{"link":11,"text":12,"type":13},{"link":15,"type":16,"text":17},"3 min","03-dynamodb-intro","03-dynamodb-intro.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F03-dynamodb-intro",{"title":72,"order":73,"youtubeVideoID":74,"resources":75,"time":27,"path":83,"id":84,"link":85},"Amazon DynamoDB under the hood",5,"ZhXqNcbR4n0",[76,80],{"link":77,"text":78,"type":79},"https:\u002F\u002Fwww.usenix.org\u002Fconference\u002Fatc22\u002Fpresentation\u002Felhemali","Amazon DynamoDB: A Scalable, Predictably Performant, and Fully Managed NoSQL Database Service","article",{"link":81,"type":79,"text":82},"https:\u002F\u002Fwww.theregister.com\u002F2022\u002F11\u002F14\u002Fmeet_the_database_that_supports\u002F","Meet the database that supports Amazon.com","04-dynamodb-underthehood","04-dynamodb-underthehood.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F04-dynamodb-underthehood",{"title":87,"collapsible":22,"isCollapsed":23,"content":88},"3.Designing Your DynamoDB Table",[89,100,112],{"title":90,"order":91,"youtubeVideoID":92,"resources":93,"time":67,"path":97,"id":98,"link":99},"Is DynamoDB the right database for you?",6,"TpeP3Cmz5PE",[94],{"link":95,"text":96,"type":79},"https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdatabase\u002Fhow-to-determine-if-amazon-dynamodb-is-appropriate-for-your-needs-and-then-plan-your-migration\u002F","How to determine if Amazon DynamoDB is appropriate for your needs, and then plan your migration","05-dynamo-rightforyou","05-dynamo-rightforyou.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F05-dynamo-rightforyou",{"title":101,"order":102,"youtubeVideoID":103,"resources":104,"time":27,"path":109,"id":110,"link":111},"Introduction to Single Table Design",7,"lWCch8GEK4E",[105],{"link":106,"text":107,"type":108},"https:\u002F\u002Fyoutu.be\u002FQ6-qWdsa8a4","7 Common DynamoDB Patterns for Modeling and Building an App with Alex De Brie","video","06-dynamodb-singletable","06-dynamodb-singletable.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F06-dynamodb-singletable",{"title":113,"order":114,"youtubeVideoID":115,"resources":116,"time":27,"path":118,"id":119,"link":120},"Design a DynamoDB table with Single Table Design",8,"JLZOI8patlw",[117],{"link":106,"text":107,"type":108},"07-dynamodb-singletable-modeling","07-dynamodb-singletable-modeling.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F07-dynamodb-singletable-modeling",{"title":122,"collapsible":22,"isCollapsed":23,"content":123},"4.Implementing DynamoDB in Your Application",[124,135,145,164],{"title":125,"order":126,"youtubeVideoID":127,"resources":128,"time":27,"path":132,"id":133,"link":134},"Provision Amazon DynamoDB table and indexes with AWS CDK",9,"4o1KzB2AAk4",[129],{"link":130,"text":131,"type":53},"https:\u002F\u002Fgithub.com\u002Fmavi888\u002Fcdk-migrated-app-infra\u002Ftree\u002FdynamoDB\u002Flib","AWS CDK code","08-dynamo-cdkinfra","08-dynamo-cdkinfra.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F08-dynamo-cdkinfra",{"title":136,"order":137,"youtubeVideoID":138,"resources":139,"time":67,"path":142,"id":143,"link":144},"Code your application",10,"9ftDmRMEfDM",[140],{"link":51,"text":141,"type":53},"Get the code","09-dynamodb-app","09-dynamodb-app.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F09-dynamodb-app",{"title":146,"order":147,"youtubeVideoID":148,"resources":149,"time":67,"path":161,"id":162,"link":163},"How to Migrate Data to DynamoDB?",11,"qEQqL3KiOOc",[150,154,158],{"link":151,"text":152,"type":153},"https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002Fdeveloperguide\u002FS3DataImport.HowItWorks.html","DynamoDB data import from Amazon S3: how it works","docs",{"link":155,"text":156,"type":157},"https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdatabase\u002Fperforming-a-live-migration-from-a-mongodb-cluster-to-amazon-dynamodb\u002F","Performing a Live Migration from a MongoDB Cluster to Amazon DynamoDB","blog",{"link":159,"type":108,"text":160},"https:\u002F\u002Fyoutu.be\u002F_6ym3IRrRxo","🆕 Step functions Distributed map - Run 10k parallel serverless executions!","10-dynamodb-migrate","10-dynamodb-migrate.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F10-dynamodb-migrate",{"title":165,"order":166,"youtubeVideoID":37,"resources":167,"time":27,"path":175,"id":176,"link":177},"Deploy and Load Test",12,[168,169,172],{"link":130,"text":141,"type":53},{"link":170,"type":108,"text":171},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=B0pDPSQcAf4","Load test your serverless applications | Run Artillery in a Lambda function",{"link":173,"type":108,"text":174},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=0VNKHIcQ5wk","Building Amazon CloudWatch dashboards with AWS CDK","11-dynamodb-test","11-dynamodb-test.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F11-dynamodb-test",{"title":179,"collapsible":22,"isCollapsed":23,"content":180},"5.Adding Event-Driven Characteristics",[181,189,203],{"title":182,"order":183,"youtubeVideoID":184,"time":185,"path":186,"id":187,"link":188},"DynamoDB Streams",13,"M0GJzjsw5So","1 min","12-dynamo-streams","12-dynamo-streams.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F12-dynamo-streams",{"title":190,"order":191,"youtubeVideoID":192,"resources":193,"time":185,"path":200,"id":201,"link":202},"Acting on Stream Events",14,"RL0l2Wz3deQ",[194,197],{"link":195,"text":196,"type":53},"https:\u002F\u002Fgithub.com\u002Fmavi888\u002Fcdk-migrated-app-infra","Code Repository",{"link":198,"type":108,"text":199},"https:\u002F\u002Fyoutu.be\u002F8Yv_V4havbc","Unlock the Power of EventBridge Pipes: Integrate Across Platforms with Ease!","13-dynamodb-ebpipes","13-dynamodb-ebpipes.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F13-dynamodb-ebpipes",{"title":204,"order":205,"youtubeVideoID":206,"resources":207,"time":185,"path":213,"id":214,"link":215},"Filtering Subscription Messages",15,"36iMOJQUAuE",[208,211,212],{"link":209,"text":210,"type":157},"https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fintroducing-payload-based-message-filtering-for-amazon-sns\u002F","Introducing payload-based message filtering for Amazon SNS",{"link":195,"text":196,"type":53},{"link":198,"type":108,"text":199},"14-dynamodb-sns","14-dynamodb-sns.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002F14-dynamodb-sns",{"title":217,"collapsible":22,"isCollapsed":23,"content":218},"Conclusion",[219],{"title":217,"order":220,"time":185,"path":221,"id":222,"link":223},16,"conclusion","conclusion.md","\u002Fcontent\u002Fservice\u002Fdynamodb\u002Fguides\u002Fusing-dynamodbto-build-webapps\u002Fconclusion","LIST",[226],"content\u002Fcontributors\u002Fmarcia-villalba.json","Using DynamoDB to build WebApps",1792578866883]