I am using Cloudwatch events to trigger Lambda Function.I have almost 60 lambda function . Each lambda function have 12 to 13 Cloudwatch events. MIS_ACTION and CUSTOMER_ID in JSON format are different for each lambda. I want to optimize cloudwatch events.
How can I call multiple lambda using single lambda by passing dynamic JSON on each lambda function?
I am using below JSON to pass in Cloudwatch Rules as:
{
"Records":[
{
"body":"",
"messageAttributes":{
"MIS_ACTION":{
"dataType":"String",
"stringValue":"CONSOLIDATEDALERT"
},
"CUSTOMER_ID":{
"dataType":"String",
"stringValue":"31"
}
}
}
]
}