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?
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.
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.