title: adding AWS Lambda as target using AWS SDK for event bridge rule
body: <p>I am using serverless framework and the AWS Node.js SDK for adding scheduled cron expression based rule to default event bus.</p>
  <pre><code> eventBridge.putRule(params, function (err, data) {...
  </code></pre>
  <p>After that I add target to this rule.</p>
  <pre><code>const params = {
      Rule: data.ruleName,
      Targets: [ 
          {
              Arn: process.env.SCHEDULED_EVENT_LAMBDA_ARN, /* required */
              Id: process.env.SCHEDULED_EVENT_LAMBDA_ID, /* required */
              Input: JSON.stringify(someData)
          },
          
      ],
      
  };
  
  eventBridge.putTargets(params, function (err, data) {...
  </code></pre>
  <p>adding target is successful on the dynamically created scheduled cron rule on event bridge but when I navigate to lambda dashboard it does not seems like the triggering layer is updated and eventually the lambda function is not triggered.</p>
  <p>The AWS SDK documentation for event bridge <code>putTargets</code> is mentioning:</p>
  <p><strong><code>For AWS Lambda and Amazon SNS resources, EventBridge relies on resource-based policies</code></strong></p>
  <p>So if the resource policy is the issue(not confirmed) is there any configuration regarding resource policy which I can set in <code>serverless.yml</code> file for a specific function that allows event-bridge service to add layer to deployed targated lambda function.</p>