Skip to content

Commit 53852df

Browse files
committed
Read secrets from aws use2 region
1 parent 8530d46 commit 53852df

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

generate_jwt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { STSClient, GetCallerIdentityCommand } from "@aws-sdk/client-sts";
77
import { randomUUID } from "crypto";
88

99
export const getSecretValue = async (secretId) => {
10-
const smClient = new SecretsManagerClient();
10+
const smClient = new SecretsManagerClient({region: "us-east-2"});
1111
const data = await smClient.send(
1212
new GetSecretValueCommand({ SecretId: secretId }),
1313
);

src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ Otherwise, email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) for sup
292292
region: genericConfig.AwsOhioRegion,
293293
});
294294
app.secretsManagerClient = new SecretsManagerClient({
295-
region: genericConfig.AwsRegion,
295+
region: genericConfig.AwsOhioRegion,
296296
});
297297
app.refreshSecretConfig = async () => {
298298
app.log.debug(

src/api/routes/iam.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
6060
const credentials = await getRoleCredentials(roleArns.Entra);
6161
const clients = {
6262
smClient: new SecretsManagerClient({
63-
region: genericConfig.AwsRegion,
63+
region: genericConfig.AwsOhioRegion,
6464
credentials,
6565
}),
6666
dynamoClient: new DynamoDBClient({

src/api/routes/organizations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const organizationsPlugin: FastifyPluginAsync = async (fastify, _options) => {
8686
const credentials = await getRoleCredentials(roleArns.Entra);
8787
const clients = {
8888
smClient: new SecretsManagerClient({
89-
region: genericConfig.AwsRegion,
89+
region: genericConfig.AwsOhioRegion,
9090
credentials,
9191
}),
9292
dynamoClient: new DynamoDBClient({

src/api/routes/syncIdentity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const syncIdentityPlugin: FastifyPluginAsync = async (fastify, _options) => {
2929
const credentials = await getRoleCredentials(roleArns.Entra);
3030
const clients = {
3131
smClient: new SecretsManagerClient({
32-
region: genericConfig.AwsRegion,
32+
region: genericConfig.AwsOhioRegion,
3333
credentials,
3434
}),
3535
dynamoClient: new DynamoDBClient({

src/api/routes/v2/membership.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const membershipV2Plugin: FastifyPluginAsync = async (fastify, _options) => {
4141
const credentials = await getRoleCredentials(roleArns.Entra);
4242
const clients = {
4343
smClient: new SecretsManagerClient({
44-
region: genericConfig.AwsRegion,
44+
region: genericConfig.AwsOhioRegion,
4545
credentials,
4646
}),
4747
dynamoClient: new DynamoDBClient({

src/api/sqs/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getAuthorizedClients = async (
1717
const credentials = await getRoleCredentials(roleArns.Entra);
1818
const clients = {
1919
smClient: new SecretsManagerClient({
20-
region: genericConfig.AwsRegion,
20+
region: genericConfig.AwsOhioRegion,
2121
credentials,
2222
}),
2323
dynamoClient: new DynamoDBClient({

tests/e2e/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getSecretValue = async (
88
secretId: string,
99
): Promise<Record<string, string | number | boolean> | null> => {
1010
const smClient = new SecretsManagerClient({
11-
region: process.env.AWS_REGION ?? "us-east-1",
11+
region: process.env.AWS_REGION ?? "us-east-2",
1212
});
1313
const data = await smClient.send(
1414
new GetSecretValueCommand({ SecretId: secretId }),

tests/live/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const getSecretValue = async (
99
secretId: string,
1010
): Promise<Record<string, string | number | boolean> | null> => {
1111
const smClient = new SecretsManagerClient({
12-
region: process.env.AWS_REGION || "us-east-1",
12+
region: process.env.AWS_REGION || "us-east-2",
1313
});
1414
const data = await smClient.send(
1515
new GetSecretValueCommand({ SecretId: secretId }),

0 commit comments

Comments
 (0)