I want to use CloudFormation to create a stack of preexisting Lambda Functions into a State Machine using Step Functions on a schedule (30 mins). I have successfully created the stack for my other methods.
In essence, I need help or guidance on how to create a scheduled event in CloudFormation for Step Functions. Here is what I have been trying:
"NOTDScheduler": {
"Type": "AWS::Events::Rule",
"Properties": {
"Description": "Schedules a NOTD every 30 minutes",
"ScheduleExpression": "rate(30 minutes)",
"State": "ENABLED",
"Targets": [
{
"Arn": "${statemachineARN}",
"statemachineARN": {
"Fn::GetAtt": [
"NOTDStateMachine",
"Arn"
]
},
"Id": "NOTDScheduleTarget"
}
]
},
But I keep getting errors such as
[Error] /Resources/NOTDScheduler/Properties/Targets/0/statemachineARN/Fn::GetAtt: Resource type AWS::StepFunctions::StateMachine does not support attribute {Arn}.
and have no clue how Arn isnt a supported attribute. Is there a workaround?