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

[lambda] support for dead letter targets #2739

Closed
Obirah opened this issue Jun 4, 2019 · 6 comments
Closed

[lambda] support for dead letter targets #2739

Obirah opened this issue Jun 4, 2019 · 6 comments
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved.

Comments

@Obirah
Copy link

Obirah commented Jun 4, 2019

As it was suggested to my colleague @pierreozoux in #660, we are now opening this issue, because we'd love to have support for SNS dead letters in the Function L2 construct.

Right now we are successfully working around this, by overriding the property on the internal L1 resource after the L2 resource has been instantiated:

protected addSnsDeadLetterConfig(topic: Topic): void {
    this.role.addToPolicy(DbcsLambda.createPolicyStatement(topic.topicArn, 'SNS:Publish'));

    (this.function.node.findChild('Resource') as CfnResource).addPropertyOverride('deadLetterConfig', {
        targetArn: topic.topicArn
    });
}

Nonetheless, it would be cool to have to have real support for this on Function. From reading all the comments in #660, I understand that you are going through some hassle with the dependencies between the Lambda and SNS packages.

Would it maybe be feasible to have a very simple approach for starters so that the FunctionProps have a field deadLetterTargetArn that is used if the deadLetterQueueEnabled flag is false?

This way, the Lambda package does not necessarily need to care about the SNS package in the beginning and later one can develop a similar high-level approach for SNS as it already exists for SQS.

I'd also be totally open to contribute code to this, if we find an approach for this problem.

@Obirah Obirah added the feature-request A feature should be added or improved. label Jun 4, 2019
@Obirah Obirah changed the title Add support for SNS dead letters in Lambdas Add support for SNS dead letters in the L2 Lambda Construct Jun 4, 2019
@NGL321 NGL321 added the needs-triage This issue or PR still needs to be triaged. label Jun 17, 2019
@SomayaB SomayaB added the @aws-cdk/aws-sns Related to Amazon Simple Notification Service label Oct 2, 2019
@SomayaB
Copy link
Contributor

SomayaB commented Oct 2, 2019

Hi @Obirah, thanks for submitting! We will update this issue when there is any progress.

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Oct 2, 2019
@nmussy
Copy link
Contributor

nmussy commented Oct 30, 2019

Hey everyone, sorry I didn't see this issue earlier, this was a pretty low-hanging fruit. A duplicate was just opened recently, #4758. I've opened a PR to close both.

@SomayaB You might want to change the package tag to package/lambda

@SomayaB SomayaB added in-progress This issue is being actively worked on. @aws-cdk/aws-lambda Related to AWS Lambda labels Oct 30, 2019
@SomayaB SomayaB assigned nija-at and unassigned eladb Oct 30, 2019
@MaartenThoelen
Copy link

Hi,

Is there any update on this feature?

Thanks!

@SomayaB
Copy link
Contributor

SomayaB commented Nov 15, 2019

Hi @MaartenThoelen, there is a PR in progress, thanks @nmussy! You can follow the PR process here #4763

@nija-at nija-at changed the title Add support for SNS dead letters in the L2 Lambda Construct [lambda] support for dead letter targets Nov 28, 2019
@nija-at nija-at removed the @aws-cdk/aws-sns Related to Amazon Simple Notification Service label Nov 28, 2019
@nija-at nija-at removed the in-progress This issue is being actively worked on. label Feb 6, 2020
@nija-at
Copy link
Contributor

nija-at commented Feb 6, 2020

@Obirah & other requesters - Lambda now supports DestinationConfig.

Does this satisfy your use case for a dead letter queue? If not, could you detail how you would benefit from the DeadLetterConfig?

@nija-at nija-at added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 6, 2020
@SomayaB SomayaB added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Feb 17, 2020
@SomayaB
Copy link
Contributor

SomayaB commented Feb 21, 2020

Closing this issue since there hasn't been a response in a while. Feel free to reopen.

@SomayaB SomayaB closed this as completed Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda closing-soon This issue will automatically close in 4 days unless further comments are made. feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants