Skip to content

Commit

Permalink
[MC-1591] fix: increase Lambda timeout and JWT exp (#239)
Browse files Browse the repository at this point in the history
fix unit test
  • Loading branch information
mmiermans authored Nov 13, 2024
1 parent 1d0f1c4 commit 768c849
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class CorpusSchedulerSQSLambda extends Construct {
lambda: {
runtime: LAMBDA_RUNTIMES.NODEJS20,
handler: 'index.handler',
timeout: 360,
timeout: 600, // Also update generateJwt expiration time when changing this.
memorySizeInMb: 512,
reservedConcurrencyLimit: 1,
environment: {
Expand Down
2 changes: 1 addition & 1 deletion lambdas/corpus-scheduler-lambda/src/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('utils', function () {
let expectedCreateApprovedCorpusItemApiOutput: CreateApprovedCorpusItemApiInput;
let parserItem: UrlMetadata;
const now = new Date('2021-01-01 10:20:30');
const exp = new Date('2021-01-01 10:25:30');
const exp = new Date('2021-01-01 10:30:30');

const emitter = getEmitter();
const tracker = getTracker(emitter, config.snowplow.appId);
Expand Down
2 changes: 1 addition & 1 deletion lambdas/corpus-scheduler-lambda/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function generateJwt(privateKey: any) {
iss: config.jwt.iss,
aud: config.jwt.aud,
iat: now,
exp: now + 60 * 5, //expires in 5 mins
exp: now + 60 * 10, //expires in 10 mins.
name: config.jwt.name,
identities: [{ userId: config.jwt.userId }],
// this group gives us full access in corpus API
Expand Down

0 comments on commit 768c849

Please sign in to comment.