Getting started with AWS DynamoDB in .NET

  Рет қаралды 22,238

Nick Chapsas

Nick Chapsas

Жыл бұрын

Get $50 free AWS Credit by adding "AWS CREDIT #NICK" in the "Tell us about your project" area: bit.ly/nickaws
Get the source code: github.com/Elfocrash/aws-videos
Check out my courses: dometrain.com
Become a Patreon and get source code access: / nickchapsas
This video is sponsored by AWS
Hello everybody I'm Nick and in this video I will show you how you can get started with AWS DynamoDB in C# and .NET. DynamoDB is one of my favourite databases and I've used it extensively in the past in high scale and high throughput scenarios so I'm here today to show you the path of success when getting started with it.
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: bit.ly/ChapsasGitHub
Follow me on Twitter: bit.ly/ChapsasTwitter
Connect on LinkedIn: bit.ly/ChapsasLinkedIn
Keep coding merch: keepcoding.shop
#aws #dotnet #dynamodb

Пікірлер: 89
@SlackwareNVM
@SlackwareNVM Жыл бұрын
Data modeling would be a valuable topic to cover.
@ColinWhittingham
@ColinWhittingham Жыл бұрын
Agreed, with document DBs you really need to approach the modelling differently
@RodrigodeFreitasPuls
@RodrigodeFreitasPuls Жыл бұрын
Data modelling in DDB can be tricky
@glob3rek
@glob3rek Жыл бұрын
Agreed, would love to see examples of data modeling.
@sirdondaniel
@sirdondaniel 3 ай бұрын
Agreeeeeeeeeeeeeed!!
@xilconic
@xilconic Жыл бұрын
+1 on Data Modelling video. :) Question though: Why did you chose to use the IAmazonDynamoDB for this example, instead of the IDynamoDBContext that seems to better match to repository usecase?
@nickchapsas
@nickchapsas Жыл бұрын
You can get the dynamodb context from the amazondynamodb. I wanted to show the lower level api with which I control more of the code flow
@vitordesouza2304
@vitordesouza2304 Жыл бұрын
Amazing!!! A video about Data Modeling will be really good too
@felipeoriani
@felipeoriani Жыл бұрын
Thanks for Sharing Nick, and yes, I do aggree with the data modeling topic including important aspects of when use DynamoDb vs RDS.
@roddeck3397
@roddeck3397 Жыл бұрын
Data modeling video is a must have, besides of this I would love to see you cover scenarios with a little more complicated models, and if there is effective way to filter the data in no sql databases. It's always easy to start with those kind of databases, but then there are a lot of problems when data complexity grows.
@tntomek
@tntomek Жыл бұрын
Your channel is amazing. It's perfectly in-depth enough to lean and start doing. As requested, more AWS+.NET Architecture videos please.
@alexkazz0
@alexkazz0 Жыл бұрын
Thanks Nick, looking forward to the data modelling video. :)
@shahnawazk
@shahnawazk Жыл бұрын
Nice and very informative, I am looking forward to see data modeling in AWS DynamoDB.
@AndyGardner
@AndyGardner Жыл бұрын
Thanks so much for the video. I'd be very keen to see your suggestions around data modeling, GSIs & GSI overloading & transaction handling. Also conditional puts to handle the risks of updating when you expect to be inserting etc.
@wh33lers
@wh33lers Жыл бұрын
+1 for data modelling. Thanks for sharing
@Flash136
@Flash136 Жыл бұрын
I am always interested in data modeling strategies to implement aggregation. It feels like such an important feature that's just missing in DynamoDB.
@catalan2857
@catalan2857 Жыл бұрын
Hey Nick thanks so much for the awesome content! Could you tell which font you're using?
@alexanderdevteammate8100
@alexanderdevteammate8100 Жыл бұрын
Thanks for this content! I’m actually switching to AWS stack right now, was useful :) P.S. dates in api calls at the beginning was not similar on post/create and get :)
@diego_samano
@diego_samano Жыл бұрын
Awesome video. I agree with Data Modelling video.
@sengkoksong3172
@sengkoksong3172 Жыл бұрын
It is great that you can have a data modelling tutorial or more deeper knowledge on how can we migrate from current traditional relation db to no sql from your experince
@ThaveeshaKannangara
@ThaveeshaKannangara Жыл бұрын
Thanks man. Learned a lot 😊👍
@piotrc966
@piotrc966 Жыл бұрын
Data modeling video? Yes!
@TaureanKing83
@TaureanKing83 Жыл бұрын
+1 on the Data Modeling vid!
@nishudar
@nishudar Жыл бұрын
Yes please make the second part
@marcinkabza2640
@marcinkabza2640 Жыл бұрын
+1 on Data Modelling Thanks for this tutorial! I would like to see video about how to work with Dynamo locally using Docker and the best way to handle migrations (schema changes)
@tiagocandeias3969
@tiagocandeias3969 Жыл бұрын
Thank you for the amazing content. +1 on data modelling video , also if not asking too much include indexes :D Thanks
@wellingtonmartinsalves6078
@wellingtonmartinsalves6078 Жыл бұрын
+1 Data Modelling video Great contend
@TimmyBraun
@TimmyBraun Жыл бұрын
Thanks for the great content you provide! I know you've mentioned the software you use for drawing, but do you just use regular mouse to draw everything? Or do you have some type of stylus? I can't believe how a mouse can draw shapes and arrows so nicely so quick.
@MysticZA
@MysticZA Жыл бұрын
From what I heard him say I think he is using a Microsoft Surface tablet/laptop with stylus
@TimmyBraun
@TimmyBraun Жыл бұрын
@@MysticZA ah I see. That would make sense. Thanks!
@mnjongen
@mnjongen Жыл бұрын
Very useful video that came at the perfect time for me. I have a question tho: Why do you store the id 3 times, wouldn't it be better to store it once as the pk?
@anthonyhobbs5491
@anthonyhobbs5491 Жыл бұрын
A modelling video would be good. Following a single table approach unlocks a lot of the power of dynamo.
@patrykklimas4398
@patrykklimas4398 Жыл бұрын
Very nice video Nick. What about querying the db using filters like date of birth between etc. Is there any effective way to do that or we are only limited to simply CRUD?
@nickchapsas
@nickchapsas Жыл бұрын
You can do all sorts of querying as long as it is within a single partition
@mrcarlpaton
@mrcarlpaton Жыл бұрын
Thanks Nick! Love your content. How would you without scanning yield results based on the date of birth? I'm working on a free project at the moment and I'm scanning when searching by date, wondering if you have some suggestions. Cheers brother 👍
@TheGamerHad
@TheGamerHad Жыл бұрын
Definitely interested in data modeling
@DemonicDaron
@DemonicDaron Жыл бұрын
+1 on Data Modelling video
@harrypooni9338
@harrypooni9338 Жыл бұрын
Great video, a follow up topic could be to cover persisting aggregate root objects with value objects.
@nickchapsas
@nickchapsas Жыл бұрын
Or materialised views. There are several ways to go about it. I really wanna focus more on such practices but unfortunately these types of videos don’t perform well so I might do it in a course
@Naudran
@Naudran 6 ай бұрын
I know this is a year later, but any idea in which video the connection using an IAM role is? I've scanned through a few but is difficult to find 7x ~20 min videos :)
@filipecatarcione3471
@filipecatarcione3471 Жыл бұрын
Data modeling would be a great topic to cover as well as using GetAll() methods when it comes to NoSQL.
@user-us4ht1sg2w
@user-us4ht1sg2w Жыл бұрын
+1 on data modelling
@fritzfahrmann4730
@fritzfahrmann4730 Жыл бұрын
is there a link to his follow up on data modeling?
@putinstea
@putinstea Жыл бұрын
I wanted follow along your video, but the source code you linked to doens't is different. It does not contain a CustomerController.cs. What's up with that?
@BrandonMercer
@BrandonMercer Жыл бұрын
Data modelling video please and thank you sir!
@dayv2005
@dayv2005 Жыл бұрын
Great video. Wondering how child relationships would work in this context? Since you would just build them directly into you table, how does transaction scope work when updating a child vs other child simultaneously? Coming from an RDMS past, this concept is hard for me to understand the modeling aspect as well as the scope without using a table scan or a separate table.
@nickchapsas
@nickchapsas Жыл бұрын
DynamoDB supports both in-table and even cross table transactions but in general you take a completely different approach with relationships. They can be part of the same document but it’s generally better (depending on the type of relationship) to have it as a separate object but this is all very usecase to usecase basis. Data modelling for such databases is awesome
@zokocx
@zokocx Жыл бұрын
Data Modeling video would complete the whole puzzle.
@DavisZemitis
@DavisZemitis Жыл бұрын
Amazing tutorial, though I would love to see something about the GSI's as well, or how You could query data by something else than ID, lets say I'm storing data by email, and I would love to get it by additional ID (same like yours just other way around, lets say I would love to retrieve data not just by ID, but by name), one I could do scanning and return all data, but then I feel that creating new GSI for this occasion would be more efficient and that is a bit more complex, right?
@Zainjerr
@Zainjerr Жыл бұрын
Yes yes Data Modelling! please
@RuneAntonsen
@RuneAntonsen Жыл бұрын
Modeling yes!
@chanwengkin3122
@chanwengkin3122 Жыл бұрын
lowerCamelCase = true at the class Level will set all attribute without JasonProperty. You may also use "DynamoDBProperty" annotation. But Nick is trying show more on low level api for more control
@coren99
@coren99 Жыл бұрын
+1 Data Modelling
@tonginbox
@tonginbox Жыл бұрын
could you please share your data model for dynamodb?
@reikooters
@reikooters Жыл бұрын
Can you show us the GetAll alternative? What you've shown is good if you know the ID of the record you want, but in a real world application, you don't know the ID and you need a way to list the data, as well as search/sort/filter the results - even if you're only returning the results to the user with 25 records per page or etc - along with a way to navigate through the pages of results. Also things like, when a user tries to create a new customer, how to check if an existing customer with the specified email address already exists in the database and reject the request.
@pedrofreitaslima
@pedrofreitaslima Жыл бұрын
This video is so good, but i guess you should learn about create models table using the AWS annotations.
@nickchapsas
@nickchapsas Жыл бұрын
I am very much against that programming model. Your code should not be what drives the infrastructure.
@pedrofreitaslima
@pedrofreitaslima Жыл бұрын
@@nickchapsas Why ? because where I work we used it, I thought it was a good practice
@FarukLuki111
@FarukLuki111 Жыл бұрын
Please provide an own video on "Data modeling"
@TheDARTart
@TheDARTart Жыл бұрын
data modeling plz siir
@FrancisManojFernando
@FrancisManojFernando 3 ай бұрын
Table creating missed ?
@wittttttt
@wittttttt Жыл бұрын
Why did you create "pk" and didn't use "id" instead? Also, shouldn't "sk" be "id" as well?
@nickchapsas
@nickchapsas Жыл бұрын
Because the pk can be a different value for different types sharing the same table and it won'y always be the id
@needledrag
@needledrag Жыл бұрын
Data modelling vid ++
@ColinWhittingham
@ColinWhittingham Жыл бұрын
As you say, people really shouldn't be doing scan/getAll against a DB like Dynamo. I've also found the sorting and filtering is very weird (almost unusable to to a limit + filter). Does this mean we just flat out shouldn't use Dynamo (or similar) for the typical web page table which has paging, sort and filtering?
@nickchapsas
@nickchapsas Жыл бұрын
Sorting, filtering and paging is totally fine as long as it is kept within a single partition. That’s where the challenge is. It also where the data modelling magic happens. The moment you go cross partition, that’s where you lose the game. Paging is also recommended with a continuation token mechanism instead of a page size and page number one.
@antonmartyniuk
@antonmartyniuk Жыл бұрын
Make a data modeling video please
@crazyfox55
@crazyfox55 Жыл бұрын
Don't you want your partition key to be data that the user will already know? Aka email and the sort key to be something based on groups of data? A data modeling video would clear up my confusion.
@nickchapsas
@nickchapsas Жыл бұрын
It depends on your access pattern. If your access pattern is the email then yeah but you have to keep in mind that the partition key is immutable so if they user wants to change that email address you are screwed. There are ways around it but it’s not always that easy
@crazyfox55
@crazyfox55 Жыл бұрын
@@nickchapsas That's interesting. I guess just create a new user to change the email. Let's say I use date as pk and time as sk how should I avoid collisions should I just add random numbers to the end of the sk? How many random numbers? My query would be a time range.
@nickchapsas
@nickchapsas Жыл бұрын
@@crazyfox55 You can create a new user but then how do you guarantee that the old one is deleted atomically without any data loss in the middle of the process. Dynamo gives you the option of transactions so you'd probably use that but date as the PK doesn't make sense. You need to know the value every time you operate on the pk
@crazyfox55
@crazyfox55 Жыл бұрын
@@nickchapsas yea date would only work for time series data. For example getting all of the orders in July.
@ConnorZ
@ConnorZ Жыл бұрын
You should give RavenDB a try
@nickchapsas
@nickchapsas Жыл бұрын
I have. It’s a fine database but Dynamo/Cosmos are better
@ConnorZ
@ConnorZ Жыл бұрын
@@nickchapsas I personally haven’t used DynamoDB. I can’t see myself ever using it because it’s closed source and doesn’t offer an on premise version.
@neociber24
@neociber24 Жыл бұрын
AWS like you more than Microsoft
@nickchapsas
@nickchapsas Жыл бұрын
I think Microsoft likes me too, it's just that they don't care enough to support content creators through sponsorships.
@shanerogers-nz
@shanerogers-nz Жыл бұрын
interested
@NoSQLKnowHow
@NoSQLKnowHow Жыл бұрын
Great video! If I can be of any help on a data modeling video, hit me up as I work on DynamoDB.
@dennycrane2938
@dennycrane2938 Жыл бұрын
RavenDb way way better for .net
@nickchapsas
@nickchapsas Жыл бұрын
According to who and based on what research/feature set? Since when a database’s viability is based on the language you are using? A database is an abstraction. There is no “X database is better for Y language”. There is only “X database is better for Y usecase according to N reasons”
@dennycrane2938
@dennycrane2938 Жыл бұрын
@@nickchapsas According to me. Citing my hatred for AWS as a source.
@dennycrane2938
@dennycrane2938 Жыл бұрын
@@nickchapsas but joking aside, have you given it a drive? I've used a number of different databases with .net over the last 12 or so years, and I keep coming back to raven. It's written in .NET with .NET in mind, has just about every useful feature from other databases (other than graph which they're taking out of it), and its indexing engine makes queries so incredibly consistent and performant (everything is calculated at indexing time, not query time).
@dennycrane2938
@dennycrane2938 Жыл бұрын
also, in context of an application database. I think it would do very well as an analytical database but I have not used it in that context personally.
@nickchapsas
@nickchapsas Жыл бұрын
@@dennycrane2938 I have given it a drive. In fact I have given it a proper evaluation for usage in a large financial institution. It's fine if you don't have any serious load, but when building for 10-50k requests per second it falls flat, or at least other solutions with better data architecture perform and scale way better. To me it means nothing that it's built in .NET, in fact it could be a red flag. EventStore is built in .NET and we had to move away from it because it wouldn't scale of our usecase. Now we also found out that the engineering of that project wasn't great but at the end of the day it doesn't matter at all. A database needs to be widely usable so there are expert to hire and share knowledge. If a product is built in .NET and it is great for .NET users and that's used as a selling point then it completely lost the game.
@ali_randomNumberHere
@ali_randomNumberHere Жыл бұрын
another aws video and another reminder for iranian users to how depressing our situation is. sad
@maskettaman1488
@maskettaman1488 Жыл бұрын
what does one have to do with the other?
@The00Rex
@The00Rex 6 ай бұрын
I love your videos but this video alongside with this section in your AWS is not helpful the way it is. Basically what it says: 1) Here is the customers table - you shouldn't use it this way, you should usually share tables for different entities, but this is what we will show 2) Here is GetAll method that you can't and shouldn't use, but you don't explain how else would we approach this since it's extremely normal to search for all of the data using paging and no filters. 3) With proper data structure you should not have a lot of the problems, however you do not even give a glimpse on what would it be in, let's say, two entities scenario. I would really appreciate that kind of video. So far I have been able to use your courses and videos to grow my .NET backend dev portfolio with great success, however for this topic I feel like I really learn nothing and I can't use these videos to help me. This is just a critique, I love your work !
Getting started with Queues in .NET using AWS SQS
44:01
Nick Chapsas
Рет қаралды 36 М.
The simplest way to build scheduling in .NET with AWS
23:03
Nick Chapsas
Рет қаралды 29 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 40 МЛН
Children deceived dad #comedy
00:19
yuzvikii_family
Рет қаралды 2,2 МЛН
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 9 МЛН
Don't Use Polly in .NET Directly. Use this instead!
14:58
Nick Chapsas
Рет қаралды 43 М.
The 2 MediatR features people don't know about but should
13:48
Nick Chapsas
Рет қаралды 34 М.
You are mocking the HttpClient the wrong way
13:56
Nick Chapsas
Рет қаралды 48 М.
AWS re:Invent 2023 - Dive deep into Amazon DynamoDB (DAT330)
58:33
Don't throw exceptions in C#. Do this instead
18:13
Nick Chapsas
Рет қаралды 250 М.
Here's what I know about DynamoDB
37:36
Web Dev Cody
Рет қаралды 7 М.
The fastest way to cast objects in C# is not so obvious
11:10
Nick Chapsas
Рет қаралды 73 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 19 МЛН