opentofu/backend/remote-state/s3
Brian Flad ed37d07632
backend/s3: Configure AWS Client MaxRetries and provide enhanced S3 NoSuchBucket error message
The AWS Go SDK automatically provides a default request retryer with exponential backoff that is invoked via setting `MaxRetries` or leaving it `nil` will default to 3. The terraform-aws-provider `config.Client()` sets `MaxRetries` to 0 unless explicitly configured above 0. Previously, we were not overriding this behavior by setting the configuration and therefore not invoking the default request retryer.

The default retryer already handles HTTP error codes above 500, including S3's InternalError response, so the extraneous handling can be removed. This will also start automatically retrying many additional cases, such as temporary networking issues or other retryable AWS service responses.

Changes:
* s3/backend: Add `max_retries` argument
* s3/backend: Enhance S3 NoSuchBucket error to include additional information
2019-01-09 13:01:37 -05:00
..
backend_state.go backend/s3: Configure AWS Client MaxRetries and provide enhanced S3 NoSuchBucket error message 2019-01-09 13:01:37 -05:00
backend_test.go Updates after running make fmt with Go v1.11.1 2018-10-17 14:11:08 -07:00
backend.go backend/s3: Configure AWS Client MaxRetries and provide enhanced S3 NoSuchBucket error message 2019-01-09 13:01:37 -05:00
client_test.go backend/remote-state: Get all the backend tests building again 2018-10-16 19:14:11 -07:00
client.go backend/s3: Configure AWS Client MaxRetries and provide enhanced S3 NoSuchBucket error message 2019-01-09 13:01:37 -05:00