Mojimi
Mojimi

Reputation: 3171

How does the hourly price in AWS works when building an API?

We're building a Python-based web application that has a low usage (10 hits per month max), but needs high processing power.

So we thought AWS hourly cost would only charge us for when the API gets pinged, but is it really how it works?

Or we will pretty much have to pay for it 24 hours in order for the API always stay up?

Upvotes: 1

Views: 67

Answers (1)

bwest
bwest

Reputation: 9854

It depends on which solution you use. EC2 instances are billed by the amount of time they run, so if you run a webserver on EC2 you'll pay for idle time. AWS Lambda functions run in response to events (like API Gateway requests) and you are charged by the number of invocations and the duration of the function. See the AWS Lambda pricing. With your low number of invocations per month, I would suggest using Lambda and API Gateway if it meets your requirements for processing power and if your processing time can be less than 15 minutes (Lambda's current max timeout).

Upvotes: 4

Related Questions