diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts index 2867ad44f..8023f74a2 100644 --- a/backend/src/integrations/sync.ts +++ b/backend/src/integrations/sync.ts @@ -688,15 +688,17 @@ const syncSecretsAWSParameterStore = async ({ const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters; let awsParameterStoreSecretsObj: { - [key: string]: any; // TODO: fix type + [key: string]: any; } = {}; if (parameterList) { awsParameterStoreSecretsObj = parameterList.reduce( - (obj: any, secret: any) => ({ - ...obj, - [secret.Name.split("/").pop()]: secret - }), + (obj: any, secret: any) => { + return ({ + ...obj, + [secret.Name.substring(integration.path.length)]: secret + }); + }, {} ); }