shellphone.app/integrations/aws-s3.ts

12 lines
369 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({
accessKeyId: serverRuntimeConfig.awsSes.accessKeyId,
secretAccessKey: serverRuntimeConfig.awsSes.secretAccessKey,
});
export const s3 = new S3({ region: serverRuntimeConfig.awsS3.region, credentials });