Terraform: Error configuring the backend “s3”: RequestError: send request failed caused by: Post https://sts.amazonaws.com/: EOF

I recently got this when doing a terragrunt init(i.e. basically a terraform init):

Initializing the backend…

Error configuring the backend “s3”: RequestError: send request failed
caused by: Post https://sts.amazonaws.com/: EOF

Please update the configuration in your Terraform files to fix this error.
If you’d like to update the configuration interactively without storing
the values in your configuration, run “terraform init”.

Could be related to this?

https://github.com/hashicorp/terraform/issues/10779

Running it a second time was successful.

Here’s what happened when I repeated it 10 times:

1x

Error loading state: RequestError: send request failed
caused by: Get https://<s3 bucket name>.s3-us-west-2.amazonaws.com/?prefix=env%3A%2F: net/http: TLS handshake timeout

1x

Error loading state: RequestError: send request failed
caused by: Get https://<s3 bucket name>.s3-us-west-2.amazonaws.com/?prefix=env%3A%2F: EOF

8x

Terraform has been successfully initialized!

 

Curiously, I then ran it 100 times with no Errors.

 

Leave a Reply

Your email address will not be published. Required fields are marked *