Skip to content

Commit

Permalink
added test case of aws::* string in ref which causes scan to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoretenable committed Dec 18, 2023
1 parent 1724a25 commit 14da14b
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 14da14b

Please sign in to comment.