From cc9ced91bf023e9d596f1447fe5dd67b0338ac8c Mon Sep 17 00:00:00 2001 From: Krishan Thisera Date: Thu, 5 Oct 2023 11:48:43 +1030 Subject: [PATCH] DO-1543: call unsafeUnwrap to pass the secret key to the env --- packages/prerender-fargate/index.ts | 4 ++-- packages/prerender-fargate/lib/prerender-fargate.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/prerender-fargate/index.ts b/packages/prerender-fargate/index.ts index 52ad1091..c0523747 100644 --- a/packages/prerender-fargate/index.ts +++ b/packages/prerender-fargate/index.ts @@ -1,3 +1,3 @@ -import { PrerenderFargate } from "./lib/prerender-fargate"; +import { PrerenderFargate, PrerenderOptions } from "./lib/prerender-fargate"; -export { PrerenderFargate }; +export { PrerenderFargate, PrerenderOptions }; diff --git a/packages/prerender-fargate/lib/prerender-fargate.ts b/packages/prerender-fargate/lib/prerender-fargate.ts index 07e33b91..acb8113c 100644 --- a/packages/prerender-fargate/lib/prerender-fargate.ts +++ b/packages/prerender-fargate/lib/prerender-fargate.ts @@ -79,7 +79,7 @@ export class PrerenderFargate extends Construct { environment: { S3_BUCKET_NAME: this.bucket.bucketName, AWS_ACCESS_KEY_ID: accessKey.accessKeyId, - AWS_SECRET_ACCESS_KEY: accessKey.secretAccessKey.toString(), + AWS_SECRET_ACCESS_KEY: accessKey.secretAccessKey.unsafeUnwrap(), AWS_REGION: Stack.of(this).region, ENABLE_REDIRECT_CACHE: props.enableRedirectCache || "false", TOKEN_LIST: props.tokenList.toString()