question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error creating dynamodb table without StreamEnabled option

See original GitHub issue

Hi, there

I have a problem starting sls offline with dynamodb-local when i setup dynamodb stream. Error:

$ SLS_DEBUG=* $(yarn bin)/sls offline start
[offline] Invalidating cache...
[offline] Loading handler... (/project/src/functions/store)
Dynamodb Local Started, Visit: http://localhost:8000/shell
Serverless: DynamoDB - Error -

  Validation Exception -----------------------------------

     Stream StreamEnabled was null

     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

  Stack Trace --------------------------------------------

ValidationException: Stream StreamEnabled was null
    at Request.extractError (/project/node_modules/aws-sdk/lib/protocol/json.js:48:27)
    at Request.callListeners (/project/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/project/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/project/node_modules/aws-sdk/lib/request.js:673:14)
    at Request.transition (/project/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/project/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /project/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/project/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/project/node_modules/aws-sdk/lib/request.js:675:12)
    at Request.callListeners (/project/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
    at Request.emit (/project/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/project/node_modules/aws-sdk/lib/request.js:673:14)
    at Request.transition (/project/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/project/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /project/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/project/node_modules/aws-sdk/lib/request.js:38:9)
From previous event:
    at ServerlessDynamodbLocal.createTable (/project/node_modules/serverless-dynamodb-local/index.js:195:16)
    at BbPromise.each (/project/node_modules/serverless-dynamodb-local/index.js:122:55)
From previous event:
    at ServerlessDynamodbLocal.migrateHandler (/project/node_modules/serverless-dynamodb-local/index.js:122:26)
    at BbPromise.resolve.then (/project/node_modules/serverless-dynamodb-local/index.js:157:45)
From previous event:
    at ServerlessDynamodbLocal.startHandler (/project/node_modules/serverless-dynamodb-local/index.js:157:10)
    at BbPromise.reduce (/project/node_modules/serverless/lib/classes/PluginManager.js:210:55)
    at runCallback (timers.js:649:20)
    at tryOnImmediate (timers.js:622:5)
    at processImmediate [as _immediateCallback] (timers.js:594:5)
From previous event:
    at PluginManager.invoke (/project/node_modules/serverless/lib/classes/PluginManager.js:210:22)
    at PluginManager.run (/project/node_modules/serverless/lib/classes/PluginManager.js:225:17)
    at Serverless.run (/project/node_modules/serverless/lib/Serverless.js:97:31)
    at serverless.init.then (/project/node_modules/serverless/bin/serverless:23:50)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                 darwin
     Node Version:       7.2.1
     Serverless Version: 1.10.2

My resource specification from serverless.yml:

resources:
  Resources:
    Table:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: ${self:custom.table}
        AttributeDefinitions:
          ...
        StreamSpecification:
          StreamViewType: NEW_AND_OLD_IMAGES

When i configure StreamEnabled: true - it works, but breaks deploy to AWS with error:

  Serverless Error ---------------------------------------
 
     An error occurred while provisioning your stack: Notifications
     - Encountered unsupported property StreamEnabled.

as StreamEnabled options seems to be not supported by CloudFormation doc

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
pianomansamcommented, Aug 8, 2019

I have serverless-dynamodb-local 0.2.38 and am still receiving this issue. It does not appear to be fixed!

One detail to note: It work working fine, but then I installed serverless-appsync-offline and that’s when I started receiving this issue.

0reactions
TomasMortoncommented, Nov 20, 2020

We still don’t have a solution to this?? It’s been 3 years…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating dynamodb table without StreamEnabled ...
Hi, there I have a problem starting sls offline with dynamodb-local when i setup dynamodb stream. Error: $ SLS_DEBUG=* $(yarn bin)/sls ...
Read more >
CreateTable - Amazon DynamoDB - AWS Documentation
The CreateTable operation adds a new table to your account. In an AWS account, table names must be unique within each Region.
Read more >
Error while creating AWS DynamoDB Table using CLI
I am trying to create table in DynamoDB using CLI. I am using below command: aws dynamodb create-table \ --table-name my_table \--attribute- ...
Read more >
aws_dynamodb_table | Resources | hashicorp/aws
The DynamoDB API expects attribute structure (name and type) to be passed along when creating or updating GSI/LSIs or creating the initial table....
Read more >
AWS DynamoDB Streams — Change Data Capture for ...
You can enable both options for a DynamoDB table. In both models, change events are written to streams asynchronously without affecting the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found