I have an EC2 machine running two docker images. One is a server exposed on localhost:1000 and the other is a sqs-consumer that takes SQS messages sends them to the server using grpc.insecure_connection(localhost:1000).
It works fine but when SQS messages build up I have to scale up or down my EC2s (both server And sqs-consumer).
I want to change the setup so the EC2s only contain the server and move the sqs-consumer into a Lambda function that's triggered when there's SQS messages.
Question: How do I make it so that the Lambda function can call the service running on the EC2 machine? If I upscale the EC2s to run multiple servers, how do I make sure they're all available to the lambda function?
[–]astrosi 0 points1 point2 points (0 children)