Skip to content

Commit 963dacf

Browse files
committed
Make DynamoDB clients in us-east-2 environment
1 parent ba547b8 commit 963dacf

File tree

8 files changed

+10
-8
lines changed

8 files changed

+10
-8
lines changed

src/api/functions/auditLog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export async function createAuditLogEntry({
3939
const safeDynamoClient =
4040
dynamoClient ||
4141
new DynamoDBClient({
42-
region: genericConfig.AwsRegion,
42+
region: genericConfig.AwsOhioRegion,
4343
});
4444

4545
const item = buildMarshalledAuditLogItem(entry);

src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Otherwise, email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) for sup
289289
app.nodeCache = new NodeCache({ checkperiod: 30 });
290290
if (initClients) {
291291
app.dynamoClient = new DynamoDBClient({
292-
region: genericConfig.AwsRegion,
292+
region: genericConfig.AwsOhioRegion,
293293
});
294294
app.secretsManagerClient = new SecretsManagerClient({
295295
region: genericConfig.AwsRegion,

src/api/routes/iam.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
6464
credentials,
6565
}),
6666
dynamoClient: new DynamoDBClient({
67-
region: genericConfig.AwsRegion,
67+
region: genericConfig.AwsOhioRegion,
6868
credentials,
6969
}),
7070
redisClient: fastify.redisClient,

src/api/routes/organizations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const organizationsPlugin: FastifyPluginAsync = async (fastify, _options) => {
9090
credentials,
9191
}),
9292
dynamoClient: new DynamoDBClient({
93-
region: genericConfig.AwsRegion,
93+
region: genericConfig.AwsOhioRegion,
9494
credentials,
9595
}),
9696
redisClient: fastify.redisClient,

src/api/routes/syncIdentity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const syncIdentityPlugin: FastifyPluginAsync = async (fastify, _options) => {
3333
credentials,
3434
}),
3535
dynamoClient: new DynamoDBClient({
36-
region: genericConfig.AwsRegion,
36+
region: genericConfig.AwsOhioRegion,
3737
credentials,
3838
}),
3939
redisClient: fastify.redisClient,

src/api/routes/v2/membership.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const membershipV2Plugin: FastifyPluginAsync = async (fastify, _options) => {
4545
credentials,
4646
}),
4747
dynamoClient: new DynamoDBClient({
48-
region: genericConfig.AwsRegion,
48+
region: genericConfig.AwsOhioRegion,
4949
credentials,
5050
}),
5151
redisClient: fastify.redisClient,

src/api/sqs/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const getAuthorizedClients = async (
2121
credentials,
2222
}),
2323
dynamoClient: new DynamoDBClient({
24-
region: genericConfig.AwsRegion,
24+
region: genericConfig.AwsOhioRegion,
2525
credentials,
2626
}),
2727
};

src/common/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export type GenericConfigType = {
6565
SigInfoTableName: string;
6666
EntraHostedDomainName: string;
6767
StoreInventoryTableName: string;
68+
AwsOhioRegion: string;
6869
// TODO: (store) add other tables
6970
};
7071

@@ -88,7 +89,8 @@ const genericConfig: GenericConfigType = {
8889
EntraSecretName: "infra-core-api-entra",
8990
EntraReadOnlySecretName: "infra-core-api-ro-entra",
9091
UpcomingEventThresholdSeconds: 1800, // 30 mins
91-
AwsRegion: process.env.AWS_REGION || "us-east-1",
92+
AwsRegion: "us-east-1",
93+
AwsOhioRegion: "us-east-2",
9294
EntraTenantId: "c8d9148f-9a59-4db3-827d-42ea0c2b6e2e",
9395
MerchStorePurchasesTableName: "infra-merchstore-purchase-history",
9496
MerchStoreMetadataTableName: "infra-merchstore-metadata",

0 commit comments

Comments
 (0)