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

aws_lambda_event_source_mapping: add support for event filtering #21921

Closed
roberth-k opened this issue Nov 26, 2021 · 4 comments · Fixed by #21937
Closed

aws_lambda_event_source_mapping: add support for event filtering #21921

roberth-k opened this issue Nov 26, 2021 · 4 comments · Fixed by #21937
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service.
Milestone

Comments

@roberth-k
Copy link
Contributor

roberth-k commented Nov 26, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Add support for the recently announced event filtering feature of Lambda event source mappings.

New or Affected Resource(s)

  • aws_lambda_event_source_mapping

Potential Terraform Configuration

According to https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax, "For filter rules, Lambda supports the same set of syntax and rules as Amazon EventBridge". As the aws_cloudwatch_event_rule resource uses a string to represent individual patterns despite the JSON syntax, the same choice is made here -- this also aligns with the underlying API.

resource "aws_lambda_event_source_mapping" "example" {
  event_source_arn = aws_sqs_queue.sqs_queue_test.arn
  function_name = aws_lambda_function.example.arn

  filter_criteria {
    filters {
      pattern = "{\"a\" : [1, 2]}"
    }
  }
}

References

@roberth-k roberth-k added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 26, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/lambda Issues and PRs that pertain to the lambda service. labels Nov 26, 2021
@roberth-k
Copy link
Contributor Author

I'll pick this up.

@roberth-k
Copy link
Contributor Author

Implemented in #21937.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 2, 2021
@github-actions github-actions bot added this to the v3.69.0 milestone Dec 2, 2021
@github-actions
Copy link

This functionality has been released in v3.69.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants