Skip to content

Commit dace2b7

Browse files
committed
Force SES to use us-east-1
Until we can get verified in us-east-2
1 parent 568f509 commit dace2b7

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/api/sqs/handlers/emailMembershipPassHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const emailMembershipPassHandler: SQSHandlerFunction<
1515
AvailableSQSFunctions.EmailMembershipPass
1616
> = async (payload, metadata, logger) => {
1717
const { email, firstName } = payload;
18-
const commonConfig = { region: genericConfig.AwsRegion };
18+
const commonConfig = { region: genericConfig.SesRegion };
1919
const clients = await getAuthorizedClients(logger, commonConfig);
2020
const entraIdToken = await getEntraIdToken({
2121
clients: { ...clients },

src/api/sqs/handlers/emailNotifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const emailNotificationsHandler: SQSHandlerFunction<
6565
},
6666
},
6767
});
68-
const sesClient = new SESClient({ region: genericConfig.AwsRegion });
68+
const sesClient = new SESClient({ region: genericConfig.SesRegion });
6969
const response = await sesClient.send(command);
7070
logger.info("Sent!");
7171
await createAuditLogEntry({

src/api/sqs/handlers/sendSaleEmailHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const sendSaleEmailHandler: SQSHandlerFunction<
1717
logger.info("Constructing email...");
1818
const emailCommand = generateSalesEmail(payload, senderEmail, qrCode.buffer);
1919
logger.info("Constructing email...");
20-
const sesClient = new SESClient({ region: genericConfig.AwsRegion });
20+
const sesClient = new SESClient({ region: genericConfig.SesRegion });
2121
const response = await sesClient.send(emailCommand);
2222
logger.info("Sent!");
2323
return response;

src/common/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export type GenericConfigType = {
4444
EntraSecretName: string;
4545
UpcomingEventThresholdSeconds: number;
4646
AwsRegion: string;
47+
SesRegion: string; // TODO: we're only verified for SES in us-east-1, get verified in us-east-2
4748
EntraTenantId: string;
4849
MerchStorePurchasesTableName: string;
4950
TicketPurchasesTableName: string;
@@ -89,6 +90,7 @@ const genericConfig: GenericConfigType = {
8990
EntraReadOnlySecretName: "infra-core-api-ro-entra",
9091
UpcomingEventThresholdSeconds: 1800, // 30 mins
9192
AwsRegion: "us-east-2",
93+
SesRegion: "us-east-1",
9294
EntraTenantId: "c8d9148f-9a59-4db3-827d-42ea0c2b6e2e",
9395
MerchStorePurchasesTableName: "infra-merchstore-purchase-history",
9496
MerchStoreMetadataTableName: "infra-merchstore-metadata",

0 commit comments

Comments
 (0)