Skip to content

Commit

Permalink
allow passing in EventBridgeClient to createEventBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
revmischa committed Jan 29, 2024
1 parent f93e645 commit e8fe472
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sst/src/node/event-bus/index.ts
Expand Up @@ -35,8 +35,9 @@ export function createEventBuilder<
metadata?: MetadataSchema;
metadataFn?: MetadataFunction;
validator: Validator;
client?: EventBridgeClient;
}) {
const client = new EventBridgeClient({});
const client = input.client || new EventBridgeClient({});
const validator = input.validator;
const metadataValidator = input.metadata ? validator(input.metadata) : null;
return function event<
Expand Down

0 comments on commit e8fe472

Please sign in to comment.