Created
June 3, 2025 16:20
-
-
Save lioneltchami/618561a75a133f73a0f4e79075469d49 to your computer and use it in GitHub Desktop.
π Example for ECS Fargate App Using ALB Latency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "awscc_applicationsignals_service_level_objective" "fargate_latency_slo" { | |
name = "ecs-fargate-latency-slo" | |
description = "Latency SLO for ECS Fargate service behind ALB" | |
sli = { | |
comparison_operator = "LessThan" | |
metric_threshold = 500 # 500ms latency threshold | |
sli_metric = { | |
metric_data_queries = [{ | |
id = "latency" | |
metric_stat = { | |
metric = { | |
namespace = "AWS/ApplicationELB" | |
metric_name = "TargetResponseTime" | |
dimensions = [ | |
{ | |
name = "LoadBalancer" | |
value = "app/my-alb-name/abc123" # update to match your ALB | |
} | |
] | |
} | |
period = 300 | |
stat = "p95" | |
} | |
}] | |
} | |
} | |
goal = { | |
attainment_goal = 99.0 | |
interval = { | |
rolling_interval = { | |
duration = 7 | |
duration_unit = "DAY" | |
} | |
} | |
} | |
burn_rate_configurations = [ | |
{ | |
look_back_window_minutes = 60 | |
}, | |
{ | |
look_back_window_minutes = 1440 | |
} | |
] | |
tags = [ | |
{ | |
key = "Environment" | |
value = "Production" | |
}, | |
{ | |
key = "AppName" | |
value = "MyFargateService" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment