-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/cloudformationmaintainer/need-followupstage/needs-investigationRequires a deeper investigationRequires a deeper investigation
Description
Description:
I am trying to implement Dynamodb streams and a trigger for lambda
myFunction:
Type: AWS::Serverless::Function
Properties:
Policies:
- AWSLambdaBasicExecutionRole
- DynamoDBCrudPolicy:
TableName: !Ref TableName
- DynamoDBStreamReadPolicy:
TableName: !Ref TableName
StreamName:
!Select
- 2
- !Split
- "/"
- Fn::ImportValue:
!Sub ${TableName}-streams-arn
CodeUri: bin/
Handler: myFunctions
Events:
dynamodb:
Type: DynamoDB
Properties:
Stream:
Fn::ImportValue: !Sub ${TableName}-streams-arn
StartingPosition: LATEST
BatchSize: 10
The first deployment was successful, however after adding the DynamoDBStreamReadPolicy
and changed StartingPosition
from TRIM_HORIZON
to LATEST
I got the following error:
The event source arn (" arn:aws:dynamodb:.../stream/... ") and function (" myFunction-...") provided mapping already exists. Please update or delete the existing mapping with UUID xxxx-xxxx-xxx-xxx (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: xxxx-xxxxxxx-xxxx-xxx)
Observed result:
Error
Expected result:
Probably error, but at this point I did not find any explanation
PS: as my understanding once the event mapping is created must be replaced or deleted? If yes why it says "Please update or delete"? If now I want to change the mapping configuration do I need to remove it, deploy, add it again and redeploy?
Thanks
alp-garcia, isohrab, alexofob, elembie, Strydom and 46 more
Metadata
Metadata
Assignees
Labels
area/cloudformationmaintainer/need-followupstage/needs-investigationRequires a deeper investigationRequires a deeper investigation