0

I am trying to setup a full local stack for DDB -> DDB stream -> Lambda.

What I have done are:

  • Setup local DynamoDB
  • Enable DDB Stream. (Tested with list-streams, get-shard, and get-records)
  • Setup Local Lambda with SAM. (Can invoke/start Lambda to process sample event json)

In Lambda template.yaml, i have setup below

      Events:
        DynamoDB1:
          Type: DynamoDB
          Properties:
            Stream: arn:aws:dynamodb:ddblocal:000000000000:table/digital_form/stream/2021-01-10T05:13:58.423
            StartingPosition: LATEST
            BatchSize: 1
            Enabled: true

So the question is, how should I run the lambda so that it can "listening" the record change from DDB stream? Currently SAM only provide Invoke, start-lambda and start-api function which doesn't achieve this.

I have search around internet but unable to found any solution that has been implemented in local environment.

toblerones
  • 21
  • 1
  • 3
  • 1
    As far as I know, at this time SAM doesn't support stream processing locally.. def. a bit of a pain point – Mike Dinescu Jan 13 '21 at 22:47
  • might want to take a look at this project: `https://github.com/localstack/localstack` seems to support a bunch of services including streaming from dynamodbstream to lambda – Mike Dinescu Jan 13 '21 at 23:16
  • Thanks @MikeDinescu . And yes I am also checking Localstack at the moment. – toblerones Jan 14 '21 at 23:03

0 Answers0