0

We have a front end implemented in ECS. This front end communicates to API Gateways which in turn makes calls to Lambda functions. We are implementing Disaster Recovery Solution for this architecture. This is not complete architecture but enough for this question. So we are pretty sure about DNS failovers, Routing Policies etc and we are good when it comes to implementing DR just for front end. Now we moved to the second part which is API Gateway and Lambda. For API gateway we moved to the conclusion that front end can check for API gateway health if it doesn't receive response in T time and make T+delta t as RTO. If API gateway is not healthy, it will send request to API gateway in other AWS region. We are good till here. But problem is what if lambda is not functional in region A and API gateway is not functional in region B. In that case API gateway of region A should be able to call lambda of region B and it should also be able to call lambda of region A when it is healthy.

What comes in my mind is that in my Terraform code, I can put some logic(obviously in declarative way or some work around way) so that API gateway should make calls only to the healthy lambda and gets itself integrated back to lambda of Region A when lambda of region A is back to healthy state. This can be checked by some continuous health checks. However, it needs some effort.

Although this is a rare scenario of AWS Lambda not working in whole one region but client is an E COM giant and if we mention RTO of T+delta t, it should be within limits. We trust AWS but we also want to be safe in all the scenarios and have minimum RTO and RPO.

Is there any better way for this? Can we somehow integrate multiple lambda to API gateways?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.