Skip to content

Commit 65513d7

Browse files
resolve to right secrets name
1 parent 422b083 commit 65513d7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import wrap from '@adobe/helix-shared-wrap';
1313
import { helixStatus } from '@adobe/helix-status';
1414
import secrets from '@adobe/helix-shared-secrets';
1515
import dataAccess from '@adobe/spacecat-shared-data-access';
16-
import { resolveSecretsName, sqsEventAdapter } from '@adobe/spacecat-shared-utils';
16+
import { sqsEventAdapter } from '@adobe/spacecat-shared-utils';
1717
import { internalServerError, notFound, ok } from '@adobe/spacecat-shared-http-utils';
1818

1919
import { runAuditStatusProcessor as auditStatusProcessor } from './audit-status-processor/handler.js';
@@ -27,6 +27,11 @@ const HANDLERS = {
2727
dummy: (message) => ok(message),
2828
};
2929

30+
// Custom secret name resolver to use the correct secret path
31+
function getSecretName() {
32+
return '/helix-deploy/spacecat-services/api-service/latest';
33+
}
34+
3035
function getElapsedSeconds(startTime) {
3136
const endTime = process.hrtime(startTime);
3237
const elapsedSeconds = endTime[0] + endTime[1] / 1e9;
@@ -84,5 +89,5 @@ async function run(message, context) {
8489
export const main = wrap(run)
8590
.with(dataAccess)
8691
.with(sqsEventAdapter)
87-
.with(secrets, { name: resolveSecretsName })
92+
.with(secrets, { name: getSecretName })
8893
.with(helixStatus);

0 commit comments

Comments
 (0)