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

Adding SNS To lambda DDK stage and SNS factory #249

Closed
wants to merge 6 commits into from

Conversation

anmolsgandhi
Copy link
Collaborator

Feature

Adding SNS lambda stage and SNS factory

Detail

  • SNSToLambda DDK Stage
  • SNS Factory for best practices
  • tests for the above

Relates

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +158 to +170
self._function.add_event_source(
SnsEventSource(
topic=self._topic,
dead_letter_queue=SQSFactory.queue(
self,
id=f"{id}-dlq",
environment_id=environment_id,
)
if dead_letter_queue_enabled
else None,
filter_policy=filter_policy,
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have an SQS queue in between the SNS topic and the Lambda to make the lambda more efficient? Also, have you tested how the redrive logic works with just an SNS queue? Is there an easy way to republish a message from the DLQ into the SNS topic?

Copy link
Contributor

Choose a reason for hiding this comment

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

To the first point, I would just opt for writing an sns event into a stage and having it precede our existing SqsToLambda stage. Agreed that we should test redrive..

Copy link
Contributor

@malachi-constant malachi-constant left a comment

Choose a reason for hiding this comment

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

I'm going to start converting your code to TS ( #250 ) tomorrow and we can move the convo over there once its drafted.

@malachi-constant
Copy link
Contributor

Can we move discussion of this stage over to #252

@malachi-constant
Copy link
Contributor

Closed and continued in #252

@malachi-constant malachi-constant deleted the feature/sns-lambda-stage-sns-factory branch February 9, 2023 18:15
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