From 61fa1e994ade87c8377ec630c49182dcbbabdae5 Mon Sep 17 00:00:00 2001 From: Becky Gilbert Date: Fri, 4 Oct 2024 17:28:44 -0700 Subject: [PATCH] change AWS env var names to avoid conflicting with EFP RecordRTC names --- packages/data/src/environment.d.ts | 8 ++++---- packages/data/src/lookitS3.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/data/src/environment.d.ts b/packages/data/src/environment.d.ts index 05d26ee3..ced33c27 100644 --- a/packages/data/src/environment.d.ts +++ b/packages/data/src/environment.d.ts @@ -1,10 +1,10 @@ declare global { namespace NodeJS { interface ProcessEnv { - S3_REGION: string; - S3_ACCESS_KEY_ID: string; - S3_SECRET_ACCESS_KEY: string; - S3_BUCKET: string; + JSPSYCH_S3_REGION: string; + JSPSYCH_S3_ACCESS_KEY_ID: string; + JSPSYCH_S3_SECRET_ACCESS_KEY: string; + JSPSYCH_S3_BUCKET: string; } } } diff --git a/packages/data/src/lookitS3.ts b/packages/data/src/lookitS3.ts index a1a0bcf3..cfb7c6ce 100644 --- a/packages/data/src/lookitS3.ts +++ b/packages/data/src/lookitS3.ts @@ -15,7 +15,7 @@ class LookitS3 { private s3: S3Client; private uploadId: string = ""; private key: string; - private bucket: string = process.env.S3_BUCKET; + private bucket: string = process.env.JSPSYCH_S3_BUCKET; private complete: boolean = false; public static readonly minUploadSize: number = 5 * 1024 * 1024; @@ -30,10 +30,10 @@ class LookitS3 { this.key = key; try { this.s3 = new S3Client({ - region: process.env.S3_REGION, + region: process.env.JSPSYCH_S3_REGION, credentials: { - accessKeyId: process.env.S3_ACCESS_KEY_ID, - secretAccessKey: process.env.S3_SECRET_ACCESS_KEY, + accessKeyId: process.env.JSPSYCH_S3_ACCESS_KEY_ID, + secretAccessKey: process.env.JSPSYCH_S3_SECRET_ACCESS_KEY, }, }); } catch (e) {