Interview Prep/Kubernetes/Autoscaling, Capacity & Cost

How do you scale a workload based on SQS queue depth on EKS?

IntermediateProductionAutoscaling, Capacity & Cost
Answer

Use KEDA's aws-sqs-queue scaler with a ScaledObject, authenticating through Pod Identity or IRSA. Target messages per replica from measured throughput, set minReplicaCount (0 if latency allows), cooldownPeriod, and maxReplicaCount bounded by downstream capacity so a backlog does not overwhelm the database.

triggers:
- type: aws-sqs-queue
  metadata: { queueURL: https://sqs.ap-south-1.amazonaws.com/123456789012/jobs, queueLength: "20", awsRegion: ap-south-1 }
All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Autoscaling, Capacity & Cost