diff --git a/lib/stream/helper/leos3.js b/lib/stream/helper/leos3.js index ad5df554..9baa39ce 100644 --- a/lib/stream/helper/leos3.js +++ b/lib/stream/helper/leos3.js @@ -16,7 +16,10 @@ module.exports = function(ls, queue, configure, opts, onFlush) { seconds: 10 }, archive: false, - sectionCount: 10 + sectionCount: 10, + s3PutOpts: { + StorageClass: "STANDARD_IA" + } }, opts || {}); let fileCount = 0; @@ -70,7 +73,7 @@ module.exports = function(ls, queue, configure, opts, onFlush) { } logger.info("S3 Location:", newFile); - s3 = ls.toS3(configure.resources.LeoS3 || configure.s3, newFile); + s3 = ls.toS3(configure.resources.LeoS3 || configure.s3, newFile, opts.s3PutOpts); e = { event: queue, start: null, diff --git a/lib/stream/leo-stream.js b/lib/stream/leo-stream.js index 026b323a..c62d49fb 100644 --- a/lib/stream/leo-stream.js +++ b/lib/stream/leo-stream.js @@ -102,10 +102,11 @@ module.exports = function(configure) { toS3GzipChunks: function(event, opts, onFlush) { return leoS3(this, event, configure, opts, onFlush); }, - toS3: (Bucket, File) => { + toS3: (Bucket, File, opts) => { var callback = null; var pass = new PassThrough(); s3.upload({ + ...opts, Bucket: Bucket, Key: File, Body: pass