Skip to content

Instantly share code, notes, and snippets.

View lioneltchami's full-sized avatar
🏠
Working from home

Lionel Tchami lioneltchami

🏠
Working from home
View GitHub Profile
@lioneltchami
lioneltchami / latency.tf
Created June 3, 2025 16:30
🧼 Metric #5: Custom App-Level Latency (e.g., /health route) If your app emits latency metrics via CloudWatch Embedded Metric Format (EMF):
resource "awscc_applicationsignals_service_level_objective" "custom_app_latency" {
name = "custom-app-latency-slo"
description = "Track app-reported latency (e.g., /health or critical path)"
sli = {
comparison_operator = "LessThan"
metric_threshold = 200 # 200ms
sli_metric = {
metric_data_queries = [{
@lioneltchami
lioneltchami / restart_rate.tf
Created June 3, 2025 16:30
🧠 Metric #4: Task Restart Rate (Failure Monitoring) Use TaskStoppedCount metric to detect frequent task restarts:
resource "awscc_applicationsignals_service_level_objective" "task_restart_slo" {
name = "ecs-task-restart-slo"
description = "Monitor ECS task restart frequency"
sli = {
comparison_operator = "LessThan"
metric_threshold = 1.0 # 1 or fewer per 5 min
sli_metric = {
metric_data_queries = [{
@lioneltchami
lioneltchami / util.tf
Created June 3, 2025 16:29
🔧 Metric #3: ECS Task CPU Utilization. Keep task CPU usage under 80% for healthy performance.
resource "awscc_applicationsignals_service_level_objective" "cpu_utilization_slo" {
name = "ecs-cpu-slo"
description = "Keep ECS CPU Utilization below 80%"
sli = {
comparison_operator = "LessThan"
metric_threshold = 80.0
sli_metric = {
metric_data_queries = [{
@lioneltchami
lioneltchami / traces.tf
Created June 3, 2025 16:22
🔁 Metric #2: Application Error Rate via X-Ray Traces. Use X-Ray segment annotations for a custom error rate metric (you would emit this yourself via PutMetricData):
resource "awscc_applicationsignals_service_level_objective" "app_error_rate" {
name = "app-error-rate-slo"
description = "Application error rate derived from X-Ray segments"
sli = {
comparison_operator = "LessThan"
metric_threshold = 1.0 # <1% errors
sli_metric = {
metric_data_queries = [{
@lioneltchami
lioneltchami / p95.tf
Created June 3, 2025 16:21
🧭 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 = [{
@lioneltchami
lioneltchami / alb_latency.tf
Created June 3, 2025 16:20
🏁 Example for ECS Fargate App Using ALB Latency
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 = [{

🌸 A.D.A (Apoti Development Association) Vocational Training

Pre-Training Questionnaire

Helping us know you better so we can serve you best.


SECTION 1: PERSONAL INFORMATION

  • Full Name: _____________________________________________________________

Root Causes of the Cloudflare ↔ Backstage Connectivity Failures

  1. Incorrect DNS Resolution
    • Problem: Cloudflare Tunnel tried to reach backstage.backstage-dev (short DNS) but needed the full Kubernetes internal DNS:
      backstage.backstage-dev.svc.cluster.local
    • Symptom: i/o timeout errors in Cloudflare logs.
    • Fix: Updated Terraform to use the full DNS path:
      service = "http://backstage.backstage-dev.svc.cluster.local:80"

Web Application with Image Upload and Storage

Project Components

  1. VPC Setup

    • Create a new VPC with public and private subnets.
    • Set up an Internet Gateway for the public subnet.
    • Configure appropriate route tables for both subnets.
  2. EC2 Instances

AWS Cloud and DevOps Skills Self-Assessment

Instructions: Rate your proficiency in each skill area using the following scale: 1 - No Knowledge 2 - Basic Understanding 3 - Intermediate Skills 4 - Advanced Proficiency 5 - Expert Level

Cloud Platforms and Services