Skip to content

Commit 28ce8bd

Browse files
authored
feat(infra): notify on api 5XX http responses (#2986)
1 parent 9e6d293 commit 28ce8bd

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

infra/cloudformation/service-common.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,26 @@ Resources:
782782
Type: String
783783
Value: !Ref NagStateMachine
784784

785+
Alb5xxAlarm:
786+
Type: AWS::CloudWatch::Alarm
787+
Condition: LbIsEnabled
788+
Properties:
789+
AlarmName: !Sub "${EnvironmentName}-ALB-Extended-5XX-Errors"
790+
AlarmDescription: ALB is returning 5XX errors
791+
Namespace: AWS/ApplicationELB
792+
MetricName: HTTPCode_Target_5XX_Count
793+
Dimensions:
794+
- Name: LoadBalancer
795+
Value: !GetAtt LoadBalancer.LoadBalancerFullName
796+
Statistic: Sum
797+
Period: 60
798+
EvaluationPeriods: 1
799+
Threshold: 1
800+
ComparisonOperator: GreaterThanOrEqualToThreshold
801+
TreatMissingData: notBreaching
802+
AlarmActions:
803+
- !Ref CloudwatchSNSCriticalTopic
804+
785805
Outputs:
786806
CloudwatchSNSWarningTopic:
787807
Value: !Ref CloudwatchSNSWarningTopic

0 commit comments

Comments
 (0)