generated from kwame-mintah/terraform-aws-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudwatch-alarms.tf
64 lines (59 loc) · 2.46 KB
/
cloudwatch-alarms.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#---------------------------------------------------
# CloudWatch Alarms
#---------------------------------------------------
resource "aws_cloudwatch_metric_alarm" "sagemaker_invoke_400_errors" {
alarm_name = "${local.name_prefix}-sagemaker-serverless-endpoint-400-alarm"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 2
threshold = 5
alarm_description = "This metric monitors SageMaker serverless endpoint 400 invocation errors"
datapoints_to_alarm = null
metric_query {
expression = "SELECT SUM(Invocation4XXErrors) FROM SCHEMA(\"AWS/SageMaker\", EndpointName,VariantName) WHERE VariantName = 'mlops'"
id = "invocation4XXerrors"
period = 300
return_data = true
}
insufficient_data_actions = []
tags = merge(
var.tags,
{
yor_name = "sagemaker_invoke_400_errors"
yor_trace = "7850fd06-1597-492a-a826-26bfe739155f"
git_commit = "N/A"
git_file = "cloudwatch-alarms.tf"
git_last_modified_at = "2024-08-17 16:09:05"
git_last_modified_by = "kwame_mintah@hotmail.co.uk"
git_modifiers = "kwame_mintah"
git_org = "kwame-mintah"
git_repo = "terraform-aws-machine-learning-pipeline"
})
}
resource "aws_cloudwatch_metric_alarm" "sagemaker_invoke_500_errors" {
alarm_name = "${local.name_prefix}-sagemaker-serverless-endpoint-500-alarm"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 2
threshold = 5
alarm_description = "This metric monitors SageMaker serverless endpoint 500 invocation errors"
datapoints_to_alarm = null
metric_query {
expression = "SELECT SUM(Invocation5XXErrors) FROM SCHEMA(\"AWS/SageMaker\", EndpointName,VariantName) WHERE VariantName = 'mlops'"
id = "invocation5XXerrors"
period = 300
return_data = true
}
insufficient_data_actions = []
tags = merge(
var.tags,
{
yor_name = "sagemaker_invoke_500_errors"
yor_trace = "51c66cff-68a4-41a1-9630-d628797c8ffc"
git_commit = "N/A"
git_file = "cloudwatch-alarms.tf"
git_last_modified_at = "2024-08-17 16:09:05"
git_last_modified_by = "kwame_mintah@hotmail.co.uk"
git_modifiers = "kwame_mintah"
git_org = "kwame-mintah"
git_repo = "terraform-aws-machine-learning-pipeline"
})
}