Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use head_bucket vs list_buckets to determine if s3 bucket exists (#357)
Use head_bucket vs list_buckets to determine if s3 bucket exists SUMMARY Some S3 endpoints, notably FIPS ones, only support Virtual Hosted-Style addressing which means operations like ListBuckets / Boto3's list_buckets aren't available. head_bucket is a suitable alternative in this case, and also performs better than list_buckets, especially when many S3 buckets are present I'm not sure which inconsistencies the developer(s) experienced that led to the comment at https://github.com/ansible-collections/amazon.aws/blob/main/plugins/modules/s3_bucket.py#L448 I didn't run into any issues when running this code modified to use list_buckets and it correctly works with both FIPS and non-FIPS S3 endpoints. ISSUE TYPE Bugfix Pull Request COMPONENT NAME amazon.aws.s3_bucket Reviewed-by: Mark Chappell <None> Reviewed-by: Alina Buzachis <None> Reviewed-by: None <None>
- Loading branch information