Serverless-offline: Does offline support streaming events from a dynamodb table to a lambda function ?

Created on 14 Jul 2018  路  5Comments  路  Source: dherault/serverless-offline

Hi,

I configured a dynamodb table stream to be read by a lamdba function like this:

download: 
    handler: download.handle
    events:
      - stream:
          type: dynamodb
          arn:
            Fn::GetAtt:
              - myTable
              - StreamArn
          enabled: true

and the table like this:

myTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: myTable
        AttributeDefinitions:
          - AttributeName: location
            AttributeType: S
        KeySchema:
          - AttributeName: location
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        StreamSpecification:
          StreamViewType: NEW_AND_OLD_IMAGES

I run serverless-offline with the following plugins:

plugins:
  - serverless-s3-local
  - serverless-dynamodb-local
  - serverless-offline

However my lamdba function does not seem to be triggered.

Is this supported by offline or do I do sth wrong?

Most helpful comment

_serverless-offline-dynamodb-streams_ didn't work for me in anyway. Tried the example provided in the repo (with aws cli, as explained, can create the tables, insert items, list the items but handler didn't get trigger when inserting items). Tried also binding Dynamo and Streams to Localstack, and the same, handler didn't trigger.

All 5 comments

Not supported sorry

You can use a plugin, e.g. serverless-offline-dynamodb-streams.

_serverless-offline-dynamodb-streams_ didn't work for me in anyway. Tried the example provided in the repo (with aws cli, as explained, can create the tables, insert items, list the items but handler didn't get trigger when inserting items). Tried also binding Dynamo and Streams to Localstack, and the same, handler didn't trigger.

Same for me, handler is never triggered. Is there any solution?

Still not working after all this time.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JimLynchCodes picture JimLynchCodes  路  4Comments

dnalborczyk picture dnalborczyk  路  3Comments

ozbillwang picture ozbillwang  路  4Comments

davidroman0O picture davidroman0O  路  4Comments

ghost picture ghost  路  4Comments