Skip to content
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.

Commit

Permalink
feat: adding region, sslEnabled and s3ForcePathStyle through env vars (
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchangelX360 committed Dec 10, 2020
1 parent 6b319b2 commit 9a31738
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aws.ts
Expand Up @@ -33,6 +33,9 @@ const aws = {
try {
cache.s3 = cache.s3 || new (require('aws-sdk/clients/s3') as typeof S3)({
...this.creds,
region: process.env.AWS_REGION,
sslEnabled: process.env.AWS_SSL_ENABLED === undefined ? undefined : process.env.AWS_SSL_ENABLED === 'true',
s3ForcePathStyle: process.env.AWS_S3_FORCE_PATH_STYLE === undefined ? undefined : process.env.AWS_S3_FORCE_PATH_STYLE === 'true',
endpoint: process.env.AWS_S3_ENDPOINT,
})
return cache.s3
Expand Down

0 comments on commit 9a31738

Please sign in to comment.