diff --git a/resources/services/s3/buckets.go b/resources/services/s3/buckets.go index 9e82073ee..d5c8afc4b 100644 --- a/resources/services/s3/buckets.go +++ b/resources/services/s3/buckets.go @@ -471,7 +471,9 @@ func S3Buckets() *schema.Table { func fetchS3Buckets(ctx context.Context, meta schema.ClientMeta, _ *schema.Resource, res chan<- interface{}) error { svc := meta.(*client.Client).Services().S3 - response, err := svc.ListBuckets(ctx, nil) + response, err := svc.ListBuckets(ctx, nil, func(options *s3.Options) { + options.Region = "us-east-1" + }) if err != nil { return diag.WrapError(err) } diff --git a/resources/services/s3/buckets_mock_test.go b/resources/services/s3/buckets_mock_test.go index 469f8f244..58c9cee5c 100644 --- a/resources/services/s3/buckets_mock_test.go +++ b/resources/services/s3/buckets_mock_test.go @@ -76,7 +76,7 @@ func buildS3Buckets(t *testing.T, ctrl *gomock.Controller) client.Services { t.Fatal(err) } - m.EXPECT().ListBuckets(gomock.Any(), gomock.Any()).Return( + m.EXPECT().ListBuckets(gomock.Any(), gomock.Any(), gomock.Any()).Return( &s3.ListBucketsOutput{ Buckets: []s3Types.Bucket{b}, }, nil)