I want to trigger a function when my serverless table have an update or a creation I saw this part in the doc
Fn::GetAtt: [MyDynamoDbTable, StreamArn]
But I do not really understand the part
Fn::GetAtt: [MyDynamoDbTable, StreamArn] what is
I also saw some code using existing events but I can not use it as I am having dev and production environment
Fn::GetAtt is an AWS CloudFormation intrinsic function used to get an attribute of a Resource. See AWS Documentation
In this case, It’s retrieving the StreamArn property of the MyDynamoDbTable resource.
StreamArn is the Arn(Amazon Resource Name) of a DynamoDB Stream. A Stream is the method a DynamoDB Table uses to emit events in response to Create/Modify/Delete actions similar to SQL triggers for onInsert/onUpdate/onDelete.
Hope it helps.