Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from guardian/nt/add-retry
Browse files Browse the repository at this point in the history
Lambda automatically retries
  • Loading branch information
NovemberTang authored Jan 20, 2023
2 parents e742691 + b6b9f11 commit 1f8a8d7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions cdk/lib/__snapshots__/snyk-tag-monitor.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ exports[`The SnykTagMonitor stack matches the snapshot 1`] = `
},
"Type": "AWS::CloudWatch::Alarm",
},
"snyktagmonitorEventInvokeConfig5F4D7B41": {
"Properties": {
"FunctionName": {
"Ref": "snyktagmonitor01C2294D",
},
"MaximumRetryAttempts": 1,
"Qualifier": "$LATEST",
},
"Type": "AWS::Lambda::EventInvokeConfig",
},
"snyktagmonitorServiceRole8EBA8B3B": {
"Properties": {
"AssumeRolePolicyDocument": {
Expand Down
3 changes: 2 additions & 1 deletion cdk/lib/snyk-tag-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export class SnykTagMonitor extends GuStack {
environment: {
SNS_TOPIC_ARN: topic.topicArn,
},
timeout: Duration.minutes(5)
timeout: Duration.minutes(5),
retryAttempts: 1
};

const lambda = new GuScheduledLambda(this, app, lambdaProps);
Expand Down

0 comments on commit 1f8a8d7

Please sign in to comment.