Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Serverless Architectures

You're reading from   Building Serverless Architectures Unleash the power of AWS Lambdas for your applications

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787129191
Length 242 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Cagatay Gurturk Cagatay Gurturk
Author Profile Icon Cagatay Gurturk
Cagatay Gurturk
Arrow right icon
View More author details
Toc

Creating the first table

In the previous chapter, we created an API authorizer that does not have any underlying data layer. Now we will create two DynamoDB tables, which are User and Token tables. As per their names, these tables will store our user list and access tokens, respectively.

Now let's add this block to our CloudFormation template's Resources section in order to create our UserTable table:

"UserTable": { 
  "Type": "AWS::DynamoDB::Table", 
  "Properties": { 
    "AttributeDefinitions": [ 
      { 
        "AttributeName": "UserId", 
        "AttributeType": "S" 
      } 
    ], 
    "KeySchema": [ 
      { 
        "AttributeName": "UserId", 
        "KeyType": "HASH" 
      } 
    ], 
    "ProvisionedThroughput...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime