From 029481477d1670d0125b6771db0d834fb531b7e0 Mon Sep 17 00:00:00 2001 From: Florent Poinsaut Date: Wed, 23 Jul 2025 09:54:29 +0200 Subject: [PATCH] Add Storage Class option --- README.md | 8 ++++++++ index.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f66a098..ba5c85d 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,14 @@ Allows you to prefix your keys if you want all of your snapshots to live in a sp default: none +#### S3_STORAGE_CLASS + +Set the S3 storage class + +`export S3_STORAGE_CLASS=STANDARD` + +default: REDUCED_REDUNDANCY + ## License The MIT License (MIT) diff --git a/index.js b/index.js index 6038d8b..0a98589 100644 --- a/index.js +++ b/index.js @@ -39,7 +39,7 @@ module.exports = { s3.putObject({ Key: key, ContentType: 'text/html;charset=UTF-8', - StorageClass: 'REDUCED_REDUNDANCY', + StorageClass: process.env.S3_STORAGE_CLASS || 'REDUCED_REDUNDANCY', Body: req.prerender.content }, function(err, result) {