Skip to content

Commit

Permalink
Merge pull request #54 from tenable/fixjoinawscolon
Browse files Browse the repository at this point in the history
Added test case of aws::* string in ref which causes scan to fail
  • Loading branch information
tlikhar authored Dec 18, 2023
2 parents 1724a25 + 14da14b commit 3feb0bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cft/sqs/policy/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,24 @@ Resources:
- "SQS:ReceiveMessage"
Effect: "Allow"
Principal: "*"

AlarmNumMessagesExceedsThreshold:
Type: AWS::CloudWatch::Alarm
DependsOn: SQSQueueProduct
Properties:
AlarmName: !Join [ "-", [ "sqs", !Ref QueueName, "num-exceeded" ] ]
AlarmDescription: 'CloudWatch Alarm'
AlarmActions:
- !Join [ ":", [ "arn:aws:sns", !Ref AWS::Region, !Ref AWS::AccountId , "Direct-Customer-Alerts" ] ]
Namespace: AWS/SQS
MetricName: ApproximateNumberOfMessages
Dimensions:
- Name: "QueueName"
Value: !Ref QueueName
ComparisonOperator: GreaterThanOrEqualToThreshold
EvaluationPeriods: 2
Period: 300
Statistic: SampleCount
Threshold: !Ref AlarmNumMessageReceivedThreshold # Desired threshold of approx. number of messages received


0 comments on commit 3feb0bf

Please sign in to comment.