Skip to content

Commit

Permalink
don't set container metadata outside of container (#2327)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWoodward authored Aug 13, 2024
1 parent 32e253c commit 6099231
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion script/prerender/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ function prefixReleasePath(filepath: string) {

const getS3Client = once(async() => {
console.log('Fetching container credentials');
const credentials = await fromContainerMetadata();

const credentials = process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
? await fromContainerMetadata()
: undefined;

console.log('Initializing S3 client');
return new S3Client({ credentials, region: BUCKET_REGION });
Expand Down

0 comments on commit 6099231

Please sign in to comment.