Skip to content

Commit 3f44558

Browse files
authored
add config for S3 Storage Class
1 parent d1a9c58 commit 3f44558

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ module.exports = {
66
PGDUMP_PATH: path.join(__dirname, '../bin/postgres-13.3'),
77
// maximum time allowed to connect to postgres before a timeout occurs
88
PGCONNECT_TIMEOUT: 15,
9-
USE_IAM_AUTH: false
9+
USE_IAM_AUTH: false,
10+
S3_STORAGE_CLASS: 'STANDARD'
1011
}

lib/upload-s3.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ async function uploadS3(stream, config, key) {
1212
const result = await s3.upload({
1313
Key: key,
1414
Bucket: config.S3_BUCKET,
15-
Body: stream
15+
Body: stream,
16+
StorageClass: config.S3_STORAGE_CLASS
1617
}).promise()
1718

1819
console.log('Uploaded to', result.Location)

0 commit comments

Comments
 (0)