# Aws-node-rest-api-with-dynamodb with a few db attributes

**URL:** <https://forum.serverless.com/t/aws-node-rest-api-with-dynamodb-with-a-few-db-attributes/3675>\
**Category:** Serverless Framework\
**Created:** [February 2, 2018, 1:54pm UTC](https://forum.serverless.com/t/aws-node-rest-api-with-dynamodb-with-a-few-db-attributes/3675 "2018-02-02T13:54:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skadirov](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skadirov](https://forum.serverless.com/u/skadirov)\
**Post date:** [February 2, 2018, 1:54pm UTC](https://forum.serverless.com/t/aws-node-rest-api-with-dynamodb-with-a-few-db-attributes/3675/1 "2018-02-02T13:54:59Z")

</div>

Hi,  
aws-node-rest-api-with-dynamodb example comes with one attribute. has anyone extended it to include more attributes? I added a new field - intent. but it is not working. Thanks for your help.

```auto
if (typeof data.text !== 'string') {
    console.error('Validation Failed');
    callback(new Error('Couldn\'t create the flowstat item.'));
    return;
  }
  if (typeof data.intent !== 'string') {
    console.error('Validation Failed');
    callback(new Error('Couldn\'t create the flowstat item.'));
    return;
  }

  const params = {
    TableName: process.env.DYNAMODB_TABLE,
    Item: {
      id: uuid.v1(),
      text: data.text,
      intent: data.intent,
      checked: false,
      createdAt: timestamp,
      updatedAt: timestamp,

```

---

<div class="post-metadata">

**Author:** ![rowanu](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rowanu/32/75_2.png) [@rowanu](https://forum.serverless.com/u/rowanu)\
**Post date:** [February 3, 2018, 6:36am UTC](https://forum.serverless.com/t/aws-node-rest-api-with-dynamodb-with-a-few-db-attributes/3675/2 "2018-02-03T06:36:32Z")

</div>

Your code snippet doesn’t look complete, can you include the rest?

Also, you’ll need to give us more information than “it’s not work working”. What happens? Do you get any error messages?

---

<div class="post-metadata">

**Author:** ![skadirov](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@skadirov](https://forum.serverless.com/u/skadirov)\
**Post date:** [February 7, 2018, 10:48pm UTC](https://forum.serverless.com/t/aws-node-rest-api-with-dynamodb-with-a-few-db-attributes/3675/3 "2018-02-07T22:48:18Z")

</div>

Thank you. I eventually got it to work. Not sure though what i was doing wrong. perhaps made a typo  
somewhere…
