is it possible to implement ip rotation via AWS lambda
Given we have a backend service
B which performs HTTP calls to remote service
S which is banning IPs based on some rate limits. As
B handles more and more real users, for this i was previously using number of instances running all the time, and then was load balancing between them. However this is a waste of time and money, those instances are idle most of the time and once a day when traffic peaks they handle it.
In attempt to solve this more cost efficiently i was wondering if aws lambda with a simple http proxy like logic could fix all of this, every time
B is making a http call it could go trough different aws lambda functions which simply perform the http call and respond with the response (which is JSON).
This could potentially have few benefits right off the bat
1. different IPs when making the request, 2. it scales on demand, and does not waste resources when its idle, 3. it hides my backend behind aws wall, target
S service (if malicious will not know where my backend really is)...
I do not know inner workings of aws lambda, could someone with hands on experience comment on this? I understand that my lambda is very light weight and it will be able to handle 1000s of requests per seq, and naturally aws would just spin up one instance, but i could just create N differently named lambdas and do my load balancing between them for example...