title: AWS Cloudwatch Event putTargets not adding Lambda event sources
body: <p>I am making a call to aws cloudWatchEvent putRule &amp; PutTarget api through aws sdk to create a cloudWatch Rule and attach a target to it. My Target is a lambda function, the rule gets created, the target gets attached to the rule but when the rule triggers based on its schedule the target lambda function not trigger. So I looked further and found out that the event source under the lambda function is not added which makes it not trigger. If I create the rule and target through AWS console the event source gets created and everything works but not thorugh API. </p>