Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated SRM processing to Singleton Lambda pattern #448

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,18 @@ export class SequenceRunManagerStack extends Stack {
}

private createProcSqsHandler() {
/**
* For `reservedConcurrentExecutions 1` setting, we are practising Singleton Lambda pattern here.
* See https://umccr.slack.com/archives/C03ABJTSN7J/p1721685789381979 for context.
* SRM processing is low volume event with time delay friendly (so to speak upto some minutes).
* We also make SQS to complimenting delayed queue. See https://github.com/umccr/infrastructure/pull/469
*/
const procSqsFn = this.createPythonFunction('ProcHandler', {
index: 'sequence_run_manager_proc/lambdas/bssh_event.py',
handler: 'sqs_handler',
timeout: Duration.minutes(2),
memorySize: 512,
reservedConcurrentExecutions: 1,
});

this.mainBus.grantPutEventsTo(procSqsFn);
Expand Down