Skip to content

Commit 3c2fec8

Browse files
committed
fix: list buckets attached wrong region
1 parent d976e6c commit 3c2fec8

File tree

1 file changed

+1
-20
lines changed
  • packages/core/src/shared/clients

1 file changed

+1
-20
lines changed

packages/core/src/shared/clients/s3.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class S3Client extends ClientWrapper<S3ClientSDK> {
416416
getLogger().debug('ListBuckets called')
417417

418418
const toDefaultBucket = (b: Bucket & { Name: string; BucketRegion: string }) =>
419-
toBucket(b.Name, this.regionCode, this.partitionId)
419+
toBucket(b.Name, b.BucketRegion, this.partitionId)
420420
const buckets = await this.listValidBuckets(paginateBuckets).flatten().map(toDefaultBucket).promise()
421421
const response = { buckets }
422422
getLogger().debug('ListBuckets returned response: %O', response)
@@ -645,25 +645,6 @@ export class S3Client extends ClientWrapper<S3ClientSDK> {
645645
}
646646
}
647647

648-
/**
649-
* @deprecated This should be refactored the same way as {@link toFile}
650-
*/
651-
// export class DefaultBucket {
652-
// public readonly name: string
653-
// public readonly region: string
654-
// public readonly arn: string
655-
656-
// public constructor({ partitionId, region, name }: { partitionId: string; region: string; name: string }) {
657-
// this.name = name
658-
// this.region = region
659-
// this.arn = buildArn({ partitionId, bucketName: name })
660-
// }
661-
662-
// public [inspect.custom](): string {
663-
// return `Bucket (name=${this.name}, region=${this.region}, arn=${this.arn})`
664-
// }
665-
// }
666-
667648
/**
668649
* @deprecated This should be refactored the same way as {@link toFile}
669650
*/

0 commit comments

Comments
 (0)