terraform-aws-modules / terraform-aws-lambda

Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/lambda/aws
Apache License 2.0
886 stars 657 forks source link

feat: Support maximum concurrency of Lambda with SQS as an event source #402

Closed davidegiunchi closed 1 year ago

davidegiunchi commented 1 year ago

Description

Aws recently introduced maximum concurrency of lambda functions when using sqs as an event source ( https://aws.amazon.com/it/blogs/compute/introducing-maximum-concurrency-of-aws-lambda-functions-when-using-amazon-sqs-as-an-event-source/ ), i've added the support of this feature to this module.
This is my first contribution to this repo, please check the code since i might be wrong.

Motivation and Context

Limiting lambda concurrency with SQS without setting reserved concurrency.

Breaking Changes

If you want to set maximum_concurrency_sqs_scaling you need the aws provider >= 4.51.0, because the support for scaling_config has been introduced in 4.51.0: https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#4510-january-19-2023

How Has This Been Tested?

github-actions[bot] commented 1 year ago

This PR has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this PR will be closed in 10 days

davidegiunchi commented 1 year ago

not stale

DStranger commented 1 year ago

@davidegiunchi this is a welcome change! Curious, what is the status of this PR?

davidegiunchi commented 1 year ago

@DStranger the PR ha already been checked and corrected by Bryant, we are waiting for the PR to be merged (i think by Anton)

jomast commented 1 year ago

are we simply waiting for Bryant's suggestions to be implemented?

jomast commented 1 year ago

is this feature already implemented? https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_event_source_mapping#maximum_concurrency

antonbabenko commented 1 year ago

@davidegiunchi Please fix this PR as Bryant suggested, and I will be able to merge it.

jonathangueedes commented 1 year ago

@davidegiunchi help us with this please.

bryantbiggs commented 1 year ago

let me see if I can push changes - if I can, I can probably get it updated and released - one sec

antonbabenko commented 1 year ago

This PR is included in version 4.13.0 :tada:

github-actions[bot] commented 1 year ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.