aws_lambda_event_source_mapping does not retry when modifying source mapping #22973
Labels
bug
Addresses a defect in current functionality.
eventual-consistency
Pertains to eventual consistency issues.
service/lambda
Issues and PRs that pertain to the lambda service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v1.1.5
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Steps to Reproduce
aws_lambda_function
andaws_iam_role
Expected Behavior
The lambda function + IAM role, policy and attachment are destroyed and recreated, and the existing lambda event source mapping is updated to the new lambda function.
Actual Behavior
Important Factoids
When creating/updating a lambda event source mapping, AWS responds with an error if the lambda function does not have the necessary permissions. When creating a new lambda event source mapping, the AWS provider retries for up to 2 minutes as IAM policy changes can take some time to propagate. However, this retry does not occur when updating an existing lambda event source mapping. Re-running the configuration after a brief time completes successfully.
The text was updated successfully, but these errors were encountered: