Jindong  Jung
Jindong Jung

Reputation: 457

Overriding all responses in AWS APIGateway

I have some HTTP API servers, lambda functions behind AWS APIGateway. it's fine. just worked out of the box.

Assume that there is mainternance situation across over all servers, and all HTTP API endpoint MUST returns same response e.g) 500 MAINTERNANCE_IN_PROGRESS ..

How can I do that? is there a feature in AWS APIGateway?

Upvotes: 0

Views: 667

Answers (1)

Dipten
Dipten

Reputation: 1066

AWS APIGateway doesn't provide way to return any response.

But you can connect all API Gateway with one route Lambda which handle all incoming request and based on url condition you can route to actual lambda function for further processing it.

API Gateway -> Route Lambda -> Task perform Lambda 1 

                            -> Task perform Lambda 2

So you need to modify only route Lambda for Maintenance mode.

Upvotes: 1

Related Questions