Skip to content

Commit e8306e0

Browse files
Limit retries when DLQ is configured (#28)
1 parent 213d6a3 commit e8306e0

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
2222
- name: cfn-lint
2323
run: |
24-
pip install cfn-lint==0.34.0
24+
pip install cfn-lint==0.40.0
2525
cfn-lint -i W3002 -t module.yml && cfn-lint -t test/*.yml
2626
2727
- name: license

module.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,14 @@ Resources:
268268
SubnetIds: !Split [',', {'Fn::ImportValue': !Sub '${VpcModule}-SubnetIdsPrivate'}]
269269
- !Ref 'AWS::NoValue'
270270
Layers: !If [HasLayerArns, !Split [',', !Ref LayerArns], !Ref 'AWS::NoValue']
271+
EventInvokeConfig:
272+
Condition: HasDeadLetterQueueModule
273+
Type: 'AWS::Lambda::EventInvokeConfig'
274+
Properties:
275+
FunctionName: !Ref Function
276+
MaximumEventAgeInSeconds: 60
277+
MaximumRetryAttempts: 2
278+
Qualifier: '$LATEST'
271279
ErrorsTooHighAlarm:
272280
Condition: HasAlertingModule
273281
Type: 'AWS::CloudWatch::Alarm'
@@ -312,7 +320,7 @@ Outputs:
312320
ModuleId:
313321
Value: 'lambda-function'
314322
ModuleVersion:
315-
Value: '2.7.0'
323+
Value: '2.8.0'
316324
StackName:
317325
Value: !Ref 'AWS::StackName'
318326
Arn:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cfn-modules/lambda-function",
3-
"version": "2.7.0",
3+
"version": "2.8.0",
44
"description": "AWS Lambda function with automated IAM policy generation, encryption, log group and alerting",
55
"author": "Michael Wittig <michael@widdix.de>",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)