lib/plugins/aws/customResources/resources/eventBridge/handler.js/create
function create(event, context) {
  const { FunctionName, EventBridgeConfig } = event.ResourceProperties;
  const { Region, AccountId } = getEnvironment(context);

  const lambdaArn = getLambdaArn(Region, AccountId, FunctionName);

  return addPermission({
    functionName: FunctionName,
    region: Region,
    accountId: AccountId,
    eventBus: EventBridgeConfig.EventBus,
    ruleName: EventBridgeConfig.RuleName,
  })
    .then(() =>
      createEventBus({
        region: Region,
        eventBus: EventBridgeConfig.EventBus,
      })
    )
    .then(() =>
      updateRuleConfiguration({
        region: Region,
        ruleName: EventBridgeConfig.RuleName,
        eventBus: EventBridgeConfig.EventBus,
        pattern: EventBridgeConfig.Pattern,
        schedule: EventBridgeConfig.Schedule,
      })
    )
    .then(() =>
      updateTargetConfiguration({
        lambdaArn,
        region: Region,
        ruleName: EventBridgeConfig.RuleName,
        eventBus: EventBridgeConfig.EventBus,
        input: EventBridgeConfig.Input,
        inputPath: EventBridgeConfig.InputPath,
        inputTransformer: EventBridgeConfig.InputTransformer,
      })
    );
}