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

fix: Add resource dependency on aws_lambda_function_event_invoke_config to avoid ResourceConflictException #424

Closed agfunderburg10 closed 1 year ago

agfunderburg10 commented 1 year ago

Description

Updated creation of aws_lambda_function_event_invoke_config resources so that there is a dependency. This is to force synchronous processing.

Motivation and Context

Fixes open issue https://github.com/terraform-aws-modules/terraform-aws-lambda/issues/419 When these resources are created asynchronously, they can cause a racing condition error: The EventInvokeConfig for function arn:aws:lambda:eu-central-1:<ACCOUNT_ID>:function:tracking-enrichment-stage-search-enriched-to-aurora:$LATEST could not be updated due to a concurrent update operation. By adding a synchronous dependency, this is resolved.

Breaking Changes

It does not break backward compatibility.

How Has This Been Tested?

I also deployed the component fresh. Both scenarios deployed with no issues.

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

github-actions[bot] commented 1 year ago

This PR was automatically closed because of stale in 10 days

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.