concept DynamoDB in category node

appears as: DynamoDB
Serverless Applications with Node.js

This is an excerpt from Manning's book Serverless Applications with Node.js.

  • Changes in the database via DynamoDB—A new pizza order is received.
  • To put it simply, DynamoDB is just a database building block for serverless applications. DynamoDB is to NoSQL databases what AWS Lambda is to computing functions: a fully managed, autoscaled, and relatively cheap cloud database solution.

    Listing 3.1 Create a DynamoDB table using the AWS CLI
    aws dynamodb create-table --table-name pizza-orders \    #1  
      --attribute-definitions AttributeName=orderId,AttributeType=S \    #2  
      --key-schema AttributeName=orderId,KeyType=HASH \    #3  
      --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 \    #4  
      --region eu-central-1 \    #5  
      --query TableDescription.TableArn --output text    #6  
    
      #1   Create a pizza-orders table using the AWS CLI.
      #2   Provide an attribute definition and tell DynamoDB that your primary key is of type string (S).
      #3   Provide a key schema.
      #4   Set the throughput (read and write capacity) for the DynamoDB table.
      #5   Select the region for your DynamoDB table.
      #6   Print back the table’s Amazon Resource Name (ARN) to confirm that everything is set up correctly.