I am using AWS Clouwatch Event Rule to invoke a python lambda function based on Cron Schedule which is working fine.Now can I pass parameter into this lambda function from cloudwatch even rule using AWS Cloudformation? Could you please guide? Please see below my cfn template :
Step1 : parameter.Schedule=cron(0 21 ? * * *)
Step 2: "Schedule": {
"Description": "Schedule for the Lambda function (cron or rate)",
"Type": "String"
},
Step 3: "funcInvokeRule": {
"Type": "AWS::Events::Rule",
"Properties": {
"ScheduleExpression": {"Ref": "Schedule"},
"Targets": [{
"Id": "funcScheduler",
"Arn": {"Fn::GetAtt": ["Function","Arn"]}
}]
}
},