Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aws-eventbridge-sns , aws-events-rule-sns, aws-events-rule-lambda): custom event bus support #362

Merged
merged 16 commits into from
Sep 3, 2021

Conversation

surukonda
Copy link
Contributor

Issue #, if available:

Description of changes:

aws-eventbridge-sns - Custom EventBus support
aws-events-rule-sns - Custom EventBus support
aws-events-rule-lambda - Custom EventBus support
aws-eventbridge-lambda - used semicolon(;) consistently in interface declaration
core/eventbridge-helper.ts - used semicolon(;) consistently in interface declaration

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 05f093f
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: f9d4937
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

test('check eventbus property', () => {
const stack = new cdk.Stack();

const construct: EventbridgeToSns = deployStackWithNewEventBus(stack);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployStackWithNewEventBus() takes no parameters, it always deploys an identical stack. We have 3 tests that deploy this identical stack and check some aspect of it.

Why don't we have 1 test that deploys the stack and then do all the checks in that test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, will update it

@@ -33,6 +33,23 @@ function deployNewFunc(stack: cdk.Stack) {
return new EventsRuleToLambda(stack, 'test-events-rule-lambda', props);
}

function deployNewEventBus(stack: cdk.Stack) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question about multiple tests here (and retroactively to eventbridge-lambda)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update the PR

runtime: lambda.Runtime.NODEJS_12_X,
handler: 'index.handler'
},
existingEventBusInterface: existingEventBus,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this better than

existingEventBusInterface: new events;EventBus(stack, 'existing-event-bus');

that we saw earlier. While they are functionally the same, this one emphasizes that it's using an event bus created independently of the larger construct.

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 255aee8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@biffgaut biffgaut merged commit 47221d9 into awslabs:main Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants