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
asked a year ago216 views
2 Answers
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
EXPERT
answered a year ago
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
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions