SNSTopic
Type: 'AWS::SNS'......
SNSTopic2
Type: 'AWS::SNS'.......
EventRule:
Type: 'AWS::Events::Rule'
Properties:
Name: !Ref EventRuleName
Description:
State: ENABLED
EventPattern: '
{
}'
Targets:
- Arn:
Ref: !Sub 'SNSTopic${EmailCount}' ## Issue here
Id: LATEST
EmailCount is input parameter like 2 here
I want to pass dynamic target arn SNSTopic or SNSTopic2 based on input parameter.. if I hardcode either SNSTopic/SNSTopic2 it works.. how can I use !Sub or !Join ?