Skip to content

Instantly share code, notes, and snippets.

@lioneltchami
Created June 3, 2025 16:21
Show Gist options
  • Save lioneltchami/a737af84e9d1987dfab04cade98414c6 to your computer and use it in GitHub Desktop.
Save lioneltchami/a737af84e9d1987dfab04cade98414c6 to your computer and use it in GitHub Desktop.
🧭 Metric #1: Application Latency (p95) via ALB. This is the front-door latency seen by the client, using ALB metrics:
resource "awscc_applicationsignals_service_level_objective" "alb_latency_slo" {
name = "alb-latency-slo"
description = "Target response time for ALB in front of ECS Fargate service"
sli = {
comparison_operator = "LessThan"
metric_threshold = 500
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"
}
]
}
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 }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment