Problem
Users of Terraform AWS provider versions 5.65 and 5.66 may encounter the following error when working with AWS resources:
"exceeded maximum number of attempts, 25,
https response error StatusCode: 0,
RequestID: , request send failed, read: connection reset by peer."
Cause
The problem is related to the GoLang version used in these AWS provider releases. Specifically, versions 5.65 and 5.66 upgraded to GoLang 1.23.0, which appears to be causing connectivity issues.
Solutions:
The AWS SDK version string changed from:
aws-sdk-go-v2/1.30.4 os/linux lang/go#1.22.6 md/GOOS#linux md/GOARCH#amd64 api/acm#1.28.5
…to…
aws-sdk-go-v2/1.30.4 os/linux lang/go#1.23.0 md/GOOS#linux md/GOARCH#amd64 api/acm#1.28.6
This upgrade to GoLang 1.23.0 seems to be the cause of the connection reset issues.
The problem can be resolved by upgrading to AWS Provider version 5.67, which reverts to GoLang 1.22.0. This downgrade appears to eliminate the connection reset errors.
Additional Information
https://github.com/hashicorp/terraform-provider-aws/pull/39256