2 Answers
- Newest
- Most votes
- Most comments
1
Hello, based on your description, I think KEDA may be helpful to you.
Here are some links I found that describe how to use KEDA to integrate SQS and scale it in EKS Pod:
- https://aws.amazon.com/cn/blogs/containers/scalable-and-cost-effective-event-driven-workloads-with-keda-and-karpenter-on-amazon-eks/
- https://github.com/aws-samples/event-driven-autoscaling-using-podidentity-and-keda/tree/main
- https://github.com/aws-samples/amazon-eks-scaling-with-keda-and-karpenter
- https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/event-driven-auto-scaling-with-eks-pod-identity-and-keda.html
answered 10 months ago
0
Converting AWS Lambda functions to EKS pods requires careful consideration of several aspects:
- For trigger points like EventBridge and SQS:
- You can implement controllers or operators in Kubernetes that listen to AWS events
- Use AWS Event Source for Kubernetes to connect event sources to your pods
- Implement a sidecar pattern where a container in your pod connects to AWS services and forwards events to your application container
- For SQS polling and timeouts:
- Implement a consumer application in your pod that polls SQS queues
- Configure appropriate visibility timeouts in your application code
- Use backoff strategies for polling to avoid excessive API calls
- Implement proper error handling and dead-letter queues
- For scaling:
- Use Horizontal Pod Autoscaler (HPA) to scale based on CPU/memory metrics
- Consider implementing custom metrics adapters to scale based on queue length
- Use Vertical Pod Autoscaler to optimize CPU and memory allocation
- For event-driven workloads, KEDA (Kubernetes Event-driven Autoscaling) can help scale based on event sources
When migrating from Lambda to EKS, consider these best practices:
- Start with a hybrid approach, gradually shifting traffic from Lambda to EKS
- Use TargetGroupBinding from AWS Load Balancer Controller if you need to maintain existing endpoints
- Containerize your Lambda code, ensuring it's properly adapted for continuous running rather than function invocation
- Consider using AWS Fargate for serverless container execution if you want to maintain a serverless operational model
- Implement proper health checks and readiness probes for your pods
- Set up appropriate monitoring and logging for your containerized applications
For controlled migration, you can:
- Deploy your containerized application on EKS
- Test thoroughly before shifting production traffic
- Implement a gradual traffic shift strategy
- Maintain the ability to roll back if issues arise
Sources
Effortless application modernization: migrate to Amazon EKS with existing NLB setup | Containers
Get started with AWS Fargate for your cluster - Amazon EKS
Place Kubernetes Pods on Amazon EKS by using node affinity, taints, and tolerations - AWS Prescriptive Guidance
answered 10 months ago
Relevant content
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

Thanks @WangQinYang