Building Modern Serverless API's with AWS: DynamoDB, Lambda, and API Gateway(Part 1)
Data Modeling and Access Patterns in DynamoDB
I love creating and writing about the creation of software.
Search for a command to run...
Data Modeling and Access Patterns in DynamoDB
I love creating and writing about the creation of software.
🤩Wow! This is crystal clear!
Thank you very much for sharing! 👌🏿👌🏿👌🏿
A Technical / Non Technical overview of the dynamoDb for Beginners
Design the primary key for the DynamoDB table and enable the core access patterns
Watch the complete Video on Youtube https://www.youtube.com/watch?v=kKX-8L_R2XM Prerequisites Before proceeding make sure you have these dependencies Docker Python 3.11 and above AWS CLI Full access to a foundation model. For this workshop, we'll...

Introduction In a previous workshop, Building event-driven applications with AWS sam and python we built an e-commerce ordering service using AWS SAM, API Gateway, Lambda and Python. Here's the solutions architecture. In that workshop, whenever a ne...

Github Repository https://github.com/EducloudHQ/introduction_to_gen_ai Skill up with serverless on Educloud https://www.educloud.academy/content/da99ad07-7efa-41e7-ba50-b18e6b89e10d This post is an introductory lesson to building AI-enhanced serverle...

Introduction Serverless computing is a cloud-based approach to application development that eliminates the need for provisioning and managing servers. Instead, developers focus on writing code that is triggered by events such as HTTP requests or data...

https://github.com/trey-rosius/sam_stepfunctions Hey!!! How you doing? In this post, we’ll look at how to build a workflow, using SAM as IaC, Appsync, and python. Prerequisites Install AWS Cli (https://docs.aws.amazon.com/cli/latest/userguide/cli-c...

In this post, we will be looking at building an API for a social media application, backed by DynamoDB. When using DynamoDB, it is important to consider how you will access your data (your access patterns) before you model your data. Before we proceed, please make sure you have all these installed and configured on your computer

In a relational database system, you'll immediately know that you need a table for each entity. So that's 3 tables. And data would definitely be saved like so
You see that in the post table, userId is a foreign key.It represents the user who made the post. Same thing with the comments table, where postId and userId are foreign keys representing the user who made the comment and the post where the comment was made.
A relational database is built for flexibility and can be a great fit for analytical applications. In relational data modeling, you start with your entities first.
When you have a normalized relational model, you can satisfy any query pattern you need in your application.
With the above illustration, we can use joins to grab say, all comments for a single post.Or All posts for a particular user and a lot more. But as our application gets bigger, so do our joins get more complex and expensive to run.
Data retrieval becomes slower too.
NoSQL (nonrelational) databases are designed for speed and scale—not flexibility. Though the performance of your relational database may degrade as you scale up, horizontally scaling databases such as DynamoDB provides consistent performance at any scale. Some DynamoDB users have tables that are larger than 100 TB, and the read and write performance of their tables is the same as when the tables were smaller than 1 GB in size.
Modeling entities in a NoSQL database such as DynamoDB requires a shift in thinking.
Don't try to Normalize your table. That's relational database modeling thinking, which is an anti-pattern if applied to NoSQL.Data duplication in NoSQL databases is very essential.
Your DynamoDB table will often include different types of data in a single table. In our case, we’ll have Users, Posts, and Comments entities in a single table. In a relational database, this would be modeled as three separate tables.
Let's look at the access patterns for each of our entities
So we have
Happy Coding ❤️