From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Setting up DynamoDB and saving into the table

Setting up DynamoDB and saving into the table - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: Data-Driven Serverless Applications with Kinesis (2019)

Start my 1-month free trial

Setting up DynamoDB and saving into the table

- So, now we want to do the save order in database. So, for doing that, we want to create first a table. So, let's go to our serverless.yml and create a new line of mode vim table. We are going to create a table in the resources, and you just go in the same alignment that orderEventsStream, and you can start typing there. We will type the name of the cloud formation resource that we will call orderTable. As we did with Kinesis, we need to type the type of the cloud formation resource that we are creating. So we are going to type AWS DynamoDB and then we do Table. So, now we are creating a DynamoDB Table, and then we need to pass on properties. The first property that we are going to pass is the table name. And, we are going to call this table ordersTable. Then, we will need to pass some attributes. Dynamo is a schema-less database. So, the only thing we need to define is the key. In this case, we are going to define the order ID as our key. So, we are going to type that. So, the…

Contents