We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f40893b commit dca2ad5Copy full SHA for dca2ad5
src/server/utils/S3.ts
@@ -2,15 +2,13 @@ import type { GetObjectCommandOutput } from '@aws-sdk/client-s3';
2
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3';
3
import { credentials, region } from './aws';
4
5
-const getS3 = (): S3Client =>
6
- new S3Client({
7
- credentials: credentials(),
8
- region,
9
- });
+const s3Client = new S3Client({
+ credentials: credentials(),
+ region,
+});
10
11
export const fetchS3Data = (bucket: string, key: string): Promise<string> => {
12
- const client = getS3();
13
- return client
+ return s3Client
14
.send(
15
new GetObjectCommand({
16
Bucket: bucket,
0 commit comments