lib/plugins/aws/customResources/resources/eventBridge/lib/permissions.js/addPermission
function addPermission(config) {
  const { functionName, region, accountId, eventBus, ruleName } = config;
  const lambda = new AWS.Lambda({ region });
  const partition = region && /^cn-/.test(region) ? 'aws-cn' : 'aws';
  let SourceArn = `arn:${partition}:events:${region}:${accountId}:rule/${ruleName}`;
  if (eventBus) {
    const eventBusName = getEventBusName(eventBus);
    SourceArn = `arn:${partition}:events:${region}:${accountId}:rule/${eventBusName}/${ruleName}`;
  }
  const params = {
    Action: 'lambda:InvokeFunction',
    FunctionName: functionName,
    Principal: 'events.amazonaws.com',
    StatementId: getStatementId(functionName, ruleName),
    SourceArn,
  };
  return lambda.addPermission(params).promise();
}