sumologic-aws-lambda icon indicating copy to clipboard operation
sumologic-aws-lambda copied to clipboard

Linting CloudFormation templates would make them simpler

Open volphy opened this issue 1 year ago • 1 comments

Have you considered using AWS CloudFormation linter https://github.com/aws-cloudformation/cfn-lint against the CloudFormation templates in this repository:

  • https://github.com/SumoLogic/sumologic-aws-lambda/blob/main/cloudwatchlogs-with-dlq/DLQLambdaCloudFormation.json
  • https://github.com/SumoLogic/sumologic-aws-lambda/blob/main/cloudwatchlogs-with-dlq/DLQLambdaCloudFormationWithSecuredEndpoint.json

in order to improve them?

volphy avatar Apr 05 '23 11:04 volphy

Example warnings (cfn-lint 0.76.2):

$ cfn-lint DLQLambdaCloudFormation.yaml 
W2001 Parameter environment not used.
DLQLambdaCloudFormation.yaml:11:3

W3005 Obsolete DependsOn on resource (SumoCWLogGroup), dependency already enforced by a "Ref" at Resources/SumoCWLogSubscriptionFilter/Properties/LogGroupName/Ref
DLQLambdaCloudFormation.yaml:91:9

W3005 Obsolete DependsOn on resource (SumoCWLogsLambda), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWLogSubscriptionFilter/Properties/DestinationArn/Fn::GetAtt
DLQLambdaCloudFormation.yaml:93:9

W3005 Obsolete DependsOn on resource (SumoCWLambdaExecutionRole), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWLogsLambda/Properties/Role/Fn::GetAtt
DLQLambdaCloudFormation.yaml:241:9

W3005 Obsolete DependsOn on resource (SumoCWDeadLetterQueue), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWLogsLambda/Properties/DeadLetterConfig/TargetArn/Fn::GetAtt
DLQLambdaCloudFormation.yaml:242:9

W3005 Obsolete DependsOn on resource (SumoCWLambdaExecutionRole), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWProcessDLQLambda/Properties/Role/Fn::GetAtt
DLQLambdaCloudFormation.yaml:318:9

W3005 Obsolete DependsOn on resource (SumoCWDeadLetterQueue), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWProcessDLQLambda/Properties/DeadLetterConfig/TargetArn/Fn::GetAtt
DLQLambdaCloudFormation.yaml:319:9

W3005 Obsolete DependsOn on resource (SumoCWDeadLetterQueue), dependency already enforced by a "Fn:GetAtt" at Resources/SumoCWProcessDLQLambda/Properties/Environment/Variables/TASK_QUEUE_URL/Fn::Join/1/5/Fn::GetAtt
DLQLambdaCloudFormation.yaml:319:9

W3005 Obsolete DependsOn on resource (SumoCWEmailSNSTopic), dependency already enforced by a "Ref" at Resources/SumoCWSpilloverAlarm/Properties/AlarmActions/0/Ref
DLQLambdaCloudFormation.yaml:417:9

volphy avatar Apr 06 '23 06:04 volphy