Custom Cloudwatch event not working from serverless.yml

Cloudwatch events created from serverless.yml not working.

Input which i gave in serverless.yml file
events:
- cloudwatchEvent:
name: {env:PROJECT_NAME}-{env:notificationFileName}-{env:BRANCH_NAME} event: detail-type: - 'ECS Task State Change' source: - 'aws.ecs' detail: lastStatus: - STOPPED clusterArn: - 'arn:aws:ecs:us-west-2:XXXXXXXX:cluster/XXXXXX-{env:BRANCH_NAME}’
containers:
exitCode:
- 0

Cloudwatch event created as { "detail-type": [ "ECS Task State Change" ], "source": [ "aws.ecs" ], "detail": { "input": { "clusterArn": [ "arn:aws:ecs:us-west-2:207637597923:cluster/TPIDs-Proteomics-dev" ], "containers": { "exitCode": [ "0" ] }, "lastStatus": [ "STOPPED" ] } } }
Expected Output should be ‘Exit code should be 0 without double quotes (")’