@@ -77,7 +77,7 @@ class BlockStoreS3 extends BlockStoreBase {
77
77
async init ( ) {
78
78
try {
79
79
if ( this . cloud_info . aws_sts_arn ) {
80
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
80
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
81
81
}
82
82
const res = await this . s3cloud . getObject ( {
83
83
Bucket : this . cloud_info . target_bucket ,
@@ -104,7 +104,7 @@ class BlockStoreS3 extends BlockStoreBase {
104
104
105
105
async _read_block_md ( block_md ) {
106
106
if ( this . cloud_info . aws_sts_arn ) {
107
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
107
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
108
108
}
109
109
const res = await this . s3cloud . headObject ( {
110
110
Bucket : this . cloud_info . target_bucket ,
@@ -162,7 +162,7 @@ class BlockStoreS3 extends BlockStoreBase {
162
162
async _read_block ( block_md ) {
163
163
try {
164
164
if ( this . cloud_info . aws_sts_arn ) {
165
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
165
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
166
166
}
167
167
const res = await this . s3cloud . getObject ( {
168
168
Bucket : this . cloud_info . target_bucket ,
@@ -189,7 +189,7 @@ class BlockStoreS3 extends BlockStoreBase {
189
189
const encoded_md = this . disable_metadata ? '' : this . _encode_block_md ( block_md ) ;
190
190
dbg . log3 ( 'writing block id to cloud:' , block_key ) ;
191
191
if ( this . cloud_info . aws_sts_arn ) {
192
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
192
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
193
193
}
194
194
await this . s3cloud . putObject ( {
195
195
Bucket : this . cloud_info . target_bucket ,
@@ -236,7 +236,7 @@ class BlockStoreS3 extends BlockStoreBase {
236
236
async _write_usage_internal ( ) {
237
237
const usage_data = this . _encode_block_md ( this . _usage ) ;
238
238
if ( this . cloud_info . aws_sts_arn ) {
239
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
239
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
240
240
}
241
241
const res = await this . s3cloud . putObject ( {
242
242
Bucket : this . cloud_info . target_bucket ,
@@ -259,7 +259,7 @@ class BlockStoreS3 extends BlockStoreBase {
259
259
const endpoint = this . cloud_info . endpoint ;
260
260
if ( cloud_utils . is_aws_endpoint ( endpoint ) ) {
261
261
if ( this . cloud_info . aws_sts_arn ) {
262
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
262
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
263
263
}
264
264
// in s3 there is no error for non-existing object
265
265
await this . s3cloud . deleteObjectTagging ( {
@@ -303,7 +303,7 @@ class BlockStoreS3 extends BlockStoreBase {
303
303
let key_marker ;
304
304
let version_marker ;
305
305
if ( this . cloud_info . aws_sts_arn ) {
306
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
306
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
307
307
}
308
308
while ( is_truncated ) {
309
309
const res = await this . s3cloud . listObjectVersions ( {
@@ -339,7 +339,7 @@ class BlockStoreS3 extends BlockStoreBase {
339
339
let version_marker ;
340
340
dbg . log0 ( `cleaning up all objects with prefix ${ this . base_path } ` ) ;
341
341
if ( this . cloud_info . aws_sts_arn ) {
342
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
342
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
343
343
}
344
344
while ( ! done ) {
345
345
const list_res = await this . s3cloud . listObjectVersions ( {
@@ -381,7 +381,7 @@ class BlockStoreS3 extends BlockStoreBase {
381
381
// Todo: Assuming that all requested blocks were deleted, which a bit naive
382
382
try {
383
383
if ( this . cloud_info . aws_sts_arn ) {
384
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
384
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
385
385
}
386
386
const usage = await this . _get_blocks_usage ( block_ids ) ;
387
387
deleted_storage . size -= usage . size ;
@@ -419,7 +419,7 @@ class BlockStoreS3 extends BlockStoreBase {
419
419
await P . map_with_concurrency ( 10 , block_ids , async block_id => {
420
420
try {
421
421
if ( this . cloud_info . aws_sts_arn ) {
422
- this . s3cloud = await cloud_utils . createSTSS3Client ( this . cloud_info , this . additionalS3Params ) ;
422
+ this . s3cloud = await cloud_utils . createSTSS3SDKv3Client ( this . cloud_info , this . additionalS3Params ) ;
423
423
}
424
424
const res = await this . s3cloud . headObject ( {
425
425
Bucket : this . cloud_info . target_bucket ,
0 commit comments