shellphone.app/integrations/aws-s3.ts

12 lines
367 B
TypeScript
Raw Normal View History

2021-10-13 19:42:23 +00:00
import { Credentials, S3 } from "aws-sdk";
import { getConfig } from "blitz";
const { serverRuntimeConfig } = getConfig();
const credentials = new Credentials({
2021-10-24 16:37:41 +00:00
accessKeyId: serverRuntimeConfig.awsS3.accessKeyId,
secretAccessKey: serverRuntimeConfig.awsS3.secretAccessKey,
2021-10-13 19:42:23 +00:00
});
export const s3 = new S3({ region: serverRuntimeConfig.awsS3.region, credentials });