-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
resource/aws_synthetics_canary: Implement Retries for IAM Eventual Consistency Error #18101
Comments
Submitted fix for this here: #18404 |
…istency error on creation Reference: #18101 Previously: ``` === CONT TestAccAWSSyntheticsCanary_basic resource_aws_synthetics_canary_test.go:82: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-s9t49btk) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 8e3169db-124d-4c5a-ac0e-d9f382cf737f; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_basic (16.37s) === CONT TestAccAWSSyntheticsCanary_runtimeVersion resource_aws_synthetics_canary_test.go:156: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-nenvizbg) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: ffcb7edb-c77e-43f2-8a0a-1183e92f0f8c; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runtimeVersion (16.85s) === CONT TestAccAWSSyntheticsCanary_startCanary_codeChanges resource_aws_synthetics_canary_test.go:239: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-7c9erovn) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 1c4bacd4-3134-4df3-8e82-2538e155b524; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_startCanary_codeChanges (16.92s) === CONT TestAccAWSSyntheticsCanary_startCanary resource_aws_synthetics_canary_test.go:190: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-gzn0ksyz) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: afa63236-ac58-4cec-9c93-67192216f734; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_startCanary (17.91s) === CONT TestAccAWSSyntheticsCanary_s3 resource_aws_synthetics_canary_test.go:281: Step 1/2 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-rhjz4908) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: ea96e8db-b243-499e-b6e9-54e5d30c7604; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_s3 (16.68s) === CONT TestAccAWSSyntheticsCanary_runConfig resource_aws_synthetics_canary_test.go:326: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-qy4r4rep) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: aee1cc0e-6f2d-4f8d-8720-91aa25333dcc; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runConfig (15.30s) === CONT TestAccAWSSyntheticsCanary_runConfigTracing resource_aws_synthetics_canary_test.go:373: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-44kmj0af) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 653d7e28-e3a6-4d5d-8da0-818cb7debb9a; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runConfigTracing (14.80s) === CONT TestAccAWSSyntheticsCanary_vpc resource_aws_synthetics_canary_test.go:416: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-278kyhh1) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 9e377590-2ea9-42db-8340-f181964fd388; Proxy: null) on terraform_plugin_test.tf line 150, in resource "aws_synthetics_canary" "test": 150: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_vpc (15.25s) === CONT TestAccAWSSyntheticsCanary_tags resource_aws_synthetics_canary_test.go:466: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-8thffpcs) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 60d2ea31-fdcb-4c4e-85ec-eecda075d58c; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_tags (15.32s) === CONT TestAccAWSSyntheticsCanary_disappears resource_aws_synthetics_canary_test.go:513: Step 1/1 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-yelzrxeu) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 398f9321-06ea-4019-ba08-37594ec32f04; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_disappears (15.34s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSSyntheticsCanary_basic (105.78s) --- PASS: TestAccAWSSyntheticsCanary_disappears (59.55s) --- PASS: TestAccAWSSyntheticsCanary_runConfig (114.95s) --- PASS: TestAccAWSSyntheticsCanary_runConfigTracing (94.08s) --- PASS: TestAccAWSSyntheticsCanary_runtimeVersion (89.12s) --- PASS: TestAccAWSSyntheticsCanary_s3 (72.90s) --- PASS: TestAccAWSSyntheticsCanary_startCanary (124.81s) --- PASS: TestAccAWSSyntheticsCanary_startCanary_codeChanges (111.66s) --- PASS: TestAccAWSSyntheticsCanary_tags (115.10s) --- PASS: TestAccAWSSyntheticsCanary_vpc (678.91s) ```
…istency error on creation (#18404) * resource/aws_synthetics_canary: Handle asynchronous IAM eventual consistency error on creation Reference: #18101 Previously: ``` === CONT TestAccAWSSyntheticsCanary_basic resource_aws_synthetics_canary_test.go:82: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-s9t49btk) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 8e3169db-124d-4c5a-ac0e-d9f382cf737f; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_basic (16.37s) === CONT TestAccAWSSyntheticsCanary_runtimeVersion resource_aws_synthetics_canary_test.go:156: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-nenvizbg) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: ffcb7edb-c77e-43f2-8a0a-1183e92f0f8c; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runtimeVersion (16.85s) === CONT TestAccAWSSyntheticsCanary_startCanary_codeChanges resource_aws_synthetics_canary_test.go:239: Step 1/3 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-7c9erovn) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 1c4bacd4-3134-4df3-8e82-2538e155b524; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_startCanary_codeChanges (16.92s) === CONT TestAccAWSSyntheticsCanary_startCanary resource_aws_synthetics_canary_test.go:190: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-gzn0ksyz) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: afa63236-ac58-4cec-9c93-67192216f734; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_startCanary (17.91s) === CONT TestAccAWSSyntheticsCanary_s3 resource_aws_synthetics_canary_test.go:281: Step 1/2 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-rhjz4908) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: ea96e8db-b243-499e-b6e9-54e5d30c7604; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_s3 (16.68s) === CONT TestAccAWSSyntheticsCanary_runConfig resource_aws_synthetics_canary_test.go:326: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-qy4r4rep) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: aee1cc0e-6f2d-4f8d-8720-91aa25333dcc; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runConfig (15.30s) === CONT TestAccAWSSyntheticsCanary_runConfigTracing resource_aws_synthetics_canary_test.go:373: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-44kmj0af) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 653d7e28-e3a6-4d5d-8da0-818cb7debb9a; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_runConfigTracing (14.80s) === CONT TestAccAWSSyntheticsCanary_vpc resource_aws_synthetics_canary_test.go:416: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-278kyhh1) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 9e377590-2ea9-42db-8340-f181964fd388; Proxy: null) on terraform_plugin_test.tf line 150, in resource "aws_synthetics_canary" "test": 150: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_vpc (15.25s) === CONT TestAccAWSSyntheticsCanary_tags resource_aws_synthetics_canary_test.go:466: Step 1/4 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-8thffpcs) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 60d2ea31-fdcb-4c4e-85ec-eecda075d58c; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_tags (15.32s) === CONT TestAccAWSSyntheticsCanary_disappears resource_aws_synthetics_canary_test.go:513: Step 1/1 error: Error running apply: exit status 1 Error: error waiting for Synthetics Canary (tf-acc-test-yelzrxeu) creation: : The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 398f9321-06ea-4019-ba08-37594ec32f04; Proxy: null) on terraform_plugin_test.tf line 92, in resource "aws_synthetics_canary" "test": 92: resource "aws_synthetics_canary" "test" { --- FAIL: TestAccAWSSyntheticsCanary_disappears (15.34s) ``` Output from acceptance testing: ``` --- PASS: TestAccAWSSyntheticsCanary_basic (105.78s) --- PASS: TestAccAWSSyntheticsCanary_disappears (59.55s) --- PASS: TestAccAWSSyntheticsCanary_runConfig (114.95s) --- PASS: TestAccAWSSyntheticsCanary_runConfigTracing (94.08s) --- PASS: TestAccAWSSyntheticsCanary_runtimeVersion (89.12s) --- PASS: TestAccAWSSyntheticsCanary_s3 (72.90s) --- PASS: TestAccAWSSyntheticsCanary_startCanary (124.81s) --- PASS: TestAccAWSSyntheticsCanary_startCanary_codeChanges (111.66s) --- PASS: TestAccAWSSyntheticsCanary_tags (115.10s) --- PASS: TestAccAWSSyntheticsCanary_vpc (678.91s) ``` * Update CHANGELOG for #18404
This has been released in version 3.35.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 for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Description
Similar to the
aws_lambda_function
resource, theaws_synthetics_canary
resource can receive delayed eventual consistency errors after the initial creation operation returns as successful, but waiting for its completion. From acceptance testing over the weekend:Typically we can just wrap the problematic operation, but in this case, it will need to wrap both the problematic operation and the waiter as well, to ensure that the logic retries both.
Affected Resources
References
The text was updated successfully, but these errors were encountered: