I have two CloudFormation stacks, one for dynamodb the other is for a lambda. The lambda works as dynamodb stream target so it needs to know the DynamoDB table stream ARN. So I exported the arn from dynamodb stack and referenced it in lambda stack.
It works well. However, it doesn't allow me to turn down dynamodb stack because there is a reference in the lambda stack. Is there a way for me to allow deleting the dynamodb stack even when there is a reference? I don't care whether the lambda works or not. There are some cases I need to turn the db table and create a new one.
Below is my severless configuration for adding dynamodb stream arn on lambda:
myHandler:
handler: src/lambdas.myHandler
name: myHandler
events:
- stream:
type: dynamodb
arn:
Fn::ImportValue: '${self:provider.dynamodbStackName}-tableStreamArn'