Snippets/elasticmq/sqs.config.ts

24 lines
641 B
TypeScript

import "dotenv/config";
export interface SqsConfig {
endpoint: string;
region: string;
credentials: {
accessKeyId: string;
secretAccessKey: string;
};
queueName: string;
accountId: string;
}
export const SqsConfig: SqsConfig = {
endpoint: process.env.ENDPOINT ?? "http://localhost:9324",
region: process.env.REGION ?? "elasticmq",
credentials: {
accessKeyId: process.env.ACCESS_KEY_ID ?? "x",
secretAccessKey: process.env.SECRET_ACCESS_KEY ?? "x",
},
queueName: process.env.QUEUE_NAME ?? "messages.fifo",
accountId: process.env.ACCOUNT_ID ?? "accountId",
};