Getting started with AWS DynamoDB in .NET

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • 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/Elf...
    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/ChapsasG...
    Follow me on Twitter: bit.ly/ChapsasT...
    Connect on LinkedIn: bit.ly/ChapsasL...
    Keep coding merch: keepcoding.shop
    #aws #dotnet #dynamodb

Комментарии • 88

  • @SlackwareNVM
    @SlackwareNVM 2 года назад +100

    Data modeling would be a valuable topic to cover.

    • @ColinWhittingham
      @ColinWhittingham 2 года назад +3

      Agreed, with document DBs you really need to approach the modelling differently

    • @RodrigodeFreitasPuls
      @RodrigodeFreitasPuls 2 года назад

      Data modelling in DDB can be tricky

    • @glob3rek
      @glob3rek 2 года назад

      Agreed, would love to see examples of data modeling.

    • @sirdondaniel
      @sirdondaniel 6 месяцев назад

      Agreeeeeeeeeeeeeed!!

  • @xilconic
    @xilconic 2 года назад +65

    +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  2 года назад +11

      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 2 года назад +10

    Amazing!!! A video about Data Modeling will be really good too

  • @felipeoriani
    @felipeoriani 2 года назад +12

    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 2 года назад +8

    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.

  • @TheDARTart
    @TheDARTart 2 года назад +4

    data modeling plz siir

  • @Flash136
    @Flash136 2 года назад +4

    I am always interested in data modeling strategies to implement aggregation. It feels like such an important feature that's just missing in DynamoDB.

  • @The00Rex
    @The00Rex 9 месяцев назад

    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 !

  • @alexanderdevteammate8100
    @alexanderdevteammate8100 2 года назад +1

    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 :)

  • @Naudran
    @Naudran 10 месяцев назад

    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 :)

  • @alexkazz0
    @alexkazz0 2 года назад +1

    Thanks Nick, looking forward to the data modelling video. :)

  • @zokocx
    @zokocx 2 года назад +1

    Data Modeling video would complete the whole puzzle.

  • @dennycrane2938
    @dennycrane2938 2 года назад +2

    RavenDb way way better for .net

    • @nickchapsas
      @nickchapsas  2 года назад

      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 2 года назад

      @@nickchapsas According to me. Citing my hatred for AWS as a source.

    • @dennycrane2938
      @dennycrane2938 2 года назад

      @@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 2 года назад

      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  2 года назад

      @@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.

  • @BrandonMercer
    @BrandonMercer 2 года назад

    Data modelling video please and thank you sir!

  • @tonginbox
    @tonginbox Год назад

    could you please share your data model for dynamodb?

  • @TheGamerHad
    @TheGamerHad Год назад

    Definitely interested in data modeling

  • @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

  • @FarukLuki111
    @FarukLuki111 2 года назад

    Please provide an own video on "Data modeling"

  • @fritzfahrmann4730
    @fritzfahrmann4730 Год назад

    is there a link to his follow up on data modeling?

  • @FrancisManojFernando
    @FrancisManojFernando 7 месяцев назад

    Table creating missed ?

  • @reikooters
    @reikooters 2 года назад

    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.

  • @antonmartyniuk
    @antonmartyniuk 2 года назад

    Make a data modeling video please

  • @Zainjerr
    @Zainjerr 2 года назад

    Yes yes Data Modelling! please

  • @needledrag
    @needledrag 2 года назад

    Data modelling vid ++

  • @chanwengkin3122
    @chanwengkin3122 2 года назад

    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

  • @DemonicDaron
    @DemonicDaron Год назад

    +1 on Data Modelling video

  • @coren99
    @coren99 2 года назад

    +1 Data Modelling

  • @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.

  • @AndriiKononenko-q3f
    @AndriiKononenko-q3f 2 года назад

    +1 on data modelling

  • @NoSQLKnowHow
    @NoSQLKnowHow 2 года назад

    Great video! If I can be of any help on a data modeling video, hit me up as I work on DynamoDB.

  • @mrcarlpaton
    @mrcarlpaton 2 года назад

    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 👍

  • @putinstea
    @putinstea 2 года назад

    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?

  • @marcinkabza2640
    @marcinkabza2640 2 года назад

    +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)

  • @AndyGardner
    @AndyGardner 2 года назад

    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.

  • @filipecatarcione3471
    @filipecatarcione3471 2 года назад

    Data modeling would be a great topic to cover as well as using GetAll() methods when it comes to NoSQL.

  • @tiagocandeias3969
    @tiagocandeias3969 2 года назад

    Thank you for the amazing content.
    +1 on data modelling video , also if not asking too much include indexes :D
    Thanks

  • @shanerogers-nz
    @shanerogers-nz 2 года назад

    interested

  • @shahnawazk
    @shahnawazk 2 года назад

    Nice and very informative, I am looking forward to see data modeling in AWS DynamoDB.

  • @catalan2857
    @catalan2857 2 года назад

    Hey Nick thanks so much for the awesome content! Could you tell which font you're using?

  • @mnjongen
    @mnjongen 2 года назад

    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 2 года назад

    A modelling video would be good. Following a single table approach unlocks a lot of the power of dynamo.

  • @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

  • @wh33lers
    @wh33lers 2 года назад

    +1 for data modelling. Thanks for sharing

  • @sengkoksong3172
    @sengkoksong3172 2 года назад

    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

  • @diego_samano
    @diego_samano 2 года назад

    Awesome video. I agree with Data Modelling video.

  • @ConnorZ
    @ConnorZ 2 года назад

    You should give RavenDB a try

    • @nickchapsas
      @nickchapsas  2 года назад

      I have. It’s a fine database but Dynamo/Cosmos are better

    • @ConnorZ
      @ConnorZ 2 года назад +1

      @@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.

  • @ColinWhittingham
    @ColinWhittingham 2 года назад

    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  2 года назад +1

      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.

  • @dayv2005
    @dayv2005 2 года назад

    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  2 года назад +1

      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

  • @patrykklimas4398
    @patrykklimas4398 2 года назад

    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  2 года назад +1

      You can do all sorts of querying as long as it is within a single partition

  • @wellingtonmartinsalves6078
    @wellingtonmartinsalves6078 2 года назад

    +1 Data Modelling video
    Great contend

  • @piotrc966
    @piotrc966 2 года назад

    Data modeling video? Yes!

  • @nishudar
    @nishudar 2 года назад

    Yes please make the second part

  • @ThaveeshaKannangara
    @ThaveeshaKannangara 2 года назад

    Thanks man. Learned a lot 😊👍

  • @TaureanKing83
    @TaureanKing83 2 года назад

    +1 on the Data Modeling vid!

  • @harrypooni9338
    @harrypooni9338 2 года назад

    Great video, a follow up topic could be to cover persisting aggregate root objects with value objects.

    • @nickchapsas
      @nickchapsas  2 года назад +2

      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

  • @RuneAntonsen
    @RuneAntonsen 2 года назад

    Modeling yes!

  • @TimmyBraun
    @TimmyBraun 2 года назад

    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 2 года назад

      From what I heard him say I think he is using a Microsoft Surface tablet/laptop with stylus

    • @TimmyBraun
      @TimmyBraun 2 года назад

      @@MysticZA ah I see. That would make sense. Thanks!

  • @neociber24
    @neociber24 2 года назад

    AWS like you more than Microsoft

    • @nickchapsas
      @nickchapsas  2 года назад +1

      I think Microsoft likes me too, it's just that they don't care enough to support content creators through sponsorships.

  • @crazyfox55
    @crazyfox55 2 года назад

    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  2 года назад +1

      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 2 года назад

      @@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  2 года назад

      @@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 2 года назад

      @@nickchapsas yea date would only work for time series data. For example getting all of the orders in July.

  • @ali_randomNumberHere
    @ali_randomNumberHere 2 года назад

    another aws video and another reminder for iranian users to how depressing our situation is.
    sad

    • @maskettaman1488
      @maskettaman1488 2 года назад

      what does one have to do with the other?