As we all know Lambda is a serverless service that is handled by AWS.
My current flow is:
client(API) -> API gateway -> lambda
I am wondering what happens when the region where my Lambda is present goes down? Also wondering what happens when the API Gateway region goes down.
How it should be handled? Is it handled by AWS as it is serverless OR should I handle it myself, how would that be?
Both API gateway and lambda are regional services. AWS docs write for lambda:
Thus, in case an entire region goes down, your functions will go down with it. So you have to be pro-active and have their backups, as well the other parts of your application, ready to run in other region.
In terms of API gateway, you can run multiple copies of your API gateway in different regions and use Route53 (which is global service) to manage traffic to them as explained in:
So ultimately, its your responsibility to design your own disaster recovery strategies for your lambda functions and api gateway.