What is the cheapest way in AWS to return an HTTP 200 to a client?

0

I was having a discussion with some fellow developers today and this came up. Sometimes before retiring an api you may need to return an HTTP 2xx to a client to avoid errors for a short period of time.

I was thinking possibly an HTTP Lambda might be the cheapest but I'd love some feedback.

profile picture
已提問 1 年前檢視次數 231 次
2 個答案
2

If you're using API Gateway then you can create a mock endpoint that returns 200 without executing anything else. You only pay for the requests that you make and you may be eligible for the free tier: https://aws.amazon.com/api-gateway/pricing/

profile pictureAWS
專家
已回答 1 年前
0

It depends. If the APIs has crazy throughput Lambda may not be cheap after all. If access is infrequent then yes.

Another idea could be to use S3, where you would host a dummy HTML page that would return 200. Depending if it has a Cloudfront distribution in front of, it may be a hack but definitely cheap too.

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南