-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support DLQ configuration for Lambda CDK Construct #660
Comments
Good point about SNS <=> Lambda. Since we built the SNS L2 we have evolved our approach/guidelines for L2s a little and I think the correct way to model this relationship is using another module In the meantime, you can start with SQS. I think that's the most common use case anyway.
Our main design tenet is to optimize for the common use case with minimum amount of configuration. So I think it should be possible to just "flip a switch" and enable DLQ with sensible defaults (something like However, we always make sure to expose the surface area for customizations, so perhaps we can also include In such cases ("enable + options"), I would recommend to automatically "enable" if the user supplies only "options", so just specifying |
PR #663 |
Can we have sns now? should I open a new issue to track that? Thanks :) |
Yes, please do open a new issue. |
I think the only way to feasibly do this is by moving the SNS subscriptions into an |
@rix0rrr I am not sure I fully understand the problem |
Because of class Topic {
public subscribeLambda(fn: lambda.IFunction) { }
} We have To be able to have: interface FunctionProps {
deadLetterQueueTopic: sns.ITopic;
} We need to have We can't have both, because circular reference. I suppose we could also have Downside: it does reduce the catchiness of our "hello world" sample somewhat. But it's better long-term, and consistent with the rest of the packages. Choices choices :( |
Yap, I agree. The |
AWS Lambda has support for DLQ as defined in https://docs.aws.amazon.com/lambda/latest/dg/dlq.html
This is defined in CFN via https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig
This issue is to add the feature to the Lambda CDK Construct. Some discussion points before implementing the feature:
The text was updated successfully, but these errors were encountered: