GithubHelp home page GithubHelp logo

dynamodbguide.com's Introduction

Logo

A walkthrough of the ins & outs of Amazon's hosted NoSQL database.

Shout-outs

This project was inspired by Craig Kerstien's PostgresGuide.com, which was very helpful to me when I was learning to program.

The site is built with Gatsby, a static site generator that uses React. I used the gatsby-starter-docs template created by Eric Windmill, which was a huge help because I'm terrible at HTML & CSS.

dynamodbguide.com's People

Contributors

alexdebrie avatar corollari avatar dimiro1 avatar itizarsa avatar jamim avatar jonasheylen avatar kandros avatar krvajal avatar nowamasa avatar pjlangley avatar preshetin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dynamodbguide.com's Issues

Different Type of Items in Same Table - Best Practices Question

Hi Alex,

I was at your talk in the AWS New York Summit few days ago... there you mentioned that most application will use only one table, and your example in the summit made a really good case for it... but now I found this website and I feel a bit confused! Could you clarify a bit?

Attributes, second paragraph: [...]This isn't usually a best practice, but the flexible model of DynamoDB allows it if desired.

Thanks, and by the way, excellent presentation.

Creating the Global Secondary throws an ValidationException

When we running the following command, we get back this from AWS

An error occurred (ValidationException) when calling the UpdateTable operation: Invalid KeySchema: Some index key attribute have no

The solution is either to remove OrderId in the key schema, I'm not sure if we need that because the guide doesn't mention it.

The other solution is to change the --attribute-definitions, so it becomes

 --attribute-definitions '[
      {
          "AttributeName": "ReturnDate",
          "AttributeType": "S"
      },
     {
          "AttributeName": "OrderId",
          "AttributeType": "S"
      }
    ]

This is the current command in the guide.

$ aws dynamodb update-table \
    --table-name UserOrdersTable \
    --attribute-definitions '[
      {
          "AttributeName": "ReturnDate",
          "AttributeType": "S"
      }
    ]' \
    --global-secondary-index-updates '[
        {
            "Create": {
                "IndexName": "ReturnDateOrderIdIndex",
                "KeySchema": [
                    {
                        "AttributeName": "ReturnDate",
                        "KeyType": "HASH"
                    },
                    {
                        "AttributeName": "OrderId",
                        "KeyType": "RANGE"
                    }
                ],
                "Projection": {
                    "ProjectionType": "ALL"
                },
                "ProvisionedThroughput": {
                    "ReadCapacityUnits": 1,
                    "WriteCapacityUnits": 1
                }
            }
        }
    ]' \
    $LOCAL

Love this guide btw, it's been amazing to follow!

Chapter "operations" is lacking contents

OPERATIONS
5.1  Provisioning tables
5.2  Security
5.3  Backups & Restores
5.4  Autoscaling
5.5  Global Tables

What do you envision these to have?

  • Provisioning tables: RCU/WCU? A warning to design the schema well up front before creating? ๐Ÿ˜†
  • Security: IAM policy to access a table?
  • Backups & Restores: how the whole process works?
  • Autoscaling: ???
  • Global tables: latency concerns, eventual consistency, replication, last write wins

Suggestion on topics: DAX, rate limiting

Actually, I have three suggestions for your website :)

  1. Add a search bar
  2. Cover DAX: item cache, query cache
  3. Cover rate limiting, e.g. DAX rate limits you when CPU usage is too high and you have to add more nodes up to a limit of 11

Thanks!

Command for creating table no longer works.

Reference Link : https://www.dynamodbguide.com/inserting-retrieving-items

The create table cli command no longer works:

 aws dynamodb create-table \
  --table-name UsersTable \
  --attribute-definitions '[
    {
        "AttributeName": "Username",
        "AttributeType": "S"
    }
  ]' \
  --key-schema '[
    {
        "AttributeName": "Username",
        "KeyType": "HASH"
    }
  ]' \
  --provisioned-throughput '{
    "ReadCapacityUnits": 1,
    "WriteCapacityUnits": 1
  }' \
  $LOCAL

Whereas, this worked:

aws dynamodb create-table  
    --table-name UsersTable 
    --attribute-definitions AttributeName=Username, AttributeType=S  
    --key-schema AttributeName=Username,KeyType=HASH  
    --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1

Can someone please have a look at this?

Thanks.

Edit: Sorry, my bad. Turns out it does not work in windows terminal only. Works in linux shells. ๐Ÿ‘

Which part of a string

In https://www.dynamodbguide.com/querying we use an expression on the OrderId key which is formatted as a datestamp and random generated number to retrieve a number of items in a specific time period.

aws dynamodb query \
    --table-name UserOrdersTable \
    --key-condition-expression "Username = :username AND OrderId BETWEEN :startdate AND :enddate" \
    --expression-attribute-values '{
        ":username": { "S": "daffyduck" },
        ":startdate": { "S": "20170101" },
        ":enddate": { "S": "20180101" }
    }' \
    $LOCAL

An OrderId would look like this "20170609-25875", then how does Dynamodb knows that only the first part should be considerated in the comparison not also the random number part? I am sort in the dark here.

And does BETWEEN sort of convert the string to number to do the comparison?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.