hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.15k forks source link

tests/synthetics: InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda. #23391

Closed johnsonaj closed 2 years ago

johnsonaj commented 2 years ago

Community Note

Description

Synthetics acceptance test fail intermittently because of the time that it takes IAM to propagate.

Debug Output

=== CONT  TestAccSyntheticsCanary_runTracing
    canary_test.go:355: Step 1/4 error: Error running apply: exit status 1

        Error: error waiting for Synthetics Canary (tf-acc-test-cz8uatva) create: unexpected state 'ERROR', wanted target 'READY'. last error: CREATE_FAILED: The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 2dbbee1b-6d0e-4b7c-b13c-2a555872dc64; Proxy: null)

          with aws_synthetics_canary.test,
          on terraform_plugin_test.tf line 110, in resource "aws_synthetics_canary" "test":
         110: resource "aws_synthetics_canary" "test" {

--- FAIL: TestAccSyntheticsCanary_runTracing (253.05s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/synthetics 254.905s
FAIL

Steps to Reproduce

make testacc TESTS=TestAccSyntheticsCanary PKG=synthetics

References

github-actions[bot] commented 2 years ago

This functionality has been released in v4.4.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[bot] commented 2 years ago

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.