Reputation: 4957
I want to trigger lambda function as soon as new records are inserted into dynamodb
or existing record is updated. For the same, I'm using aws dynamodb
stream features. I trying to do so but it throws me below error.
Cannot access stream arn:aws:dynamodb:us-east-2:144091332251:table/users/stream/2019-06-05T08:00:51.428. Please ensure the role can perform the GetRecords, GetShardIterator, DescribeStream, and ListStreams Actions on your stream in IAM. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: c88c1297-438b-11e1-a338-e57e98788b7c)
Upvotes: 4
Views: 7205
Reputation: 1302
I think your IAM role misses necessary policy to access the streams.
Please follow the further steps if you are still getting the same error-
This policy has the required permissionss that you need to be able to fire streams lambda. See, the JSON doc attached with this policy -
I hope, now it should work.
Hope it helps.
Upvotes: 11