5 ms·
This is a great idea. I setup something similar for my brother's website contact form (host the site on S3 and then use lambda to shoot him an email when someon
by dtnewman 10y ago
This is a great idea. I setup something similar for my brother's website contact form (host the site on S3 and then use lambda to shoot him an email when someone submits their data on the contact form). The costs for running his website are just a few cents a month (above the $0.50/month charge for hosting on Route 53).
For those who work in Python, there is a project called Zappa (https://github.com/Miserlou/Zappa https://github.com/Miserlou/Zappa) that allows you to take an existing project in a framework such as Flask and "host" the whole thing with lambda. The project is still young, but I imagine this sort of thing could be very useful to people doing a hobby project that don't want to pay for full-time hosting, but want their site to be available full-time. Hopefully, we get to a point soon where this sort of framework is ready for production use, though I don't know that it's there yet.
- cdnsteve 10y agoWow Zappa looks great, thanks for sharing.
- Aaronontheweb 10y agoNot to be an empty-calorie comment, but genuinely thanks for sharing that. Found it to be very helpful!
- dtnewman 10y agoGlad you found it useful. The great thing about Lambda, I think, is the cost, which is so cheap as to be effectively free for a lot of uses (according to https://aws.amazon.com/lambda/pricing/ https://aws.amazon.com/lambda/pricing/, the first million requests each month are free). So if you could design a web service to be deployable on lambda (via zappa or whatever framework), you can effectively host a website for close to no cost assuming you don't have a lot of traffic. On the other hand, you lose some of the control that comes with having your service run on a EC2 instance. For example, I like being able to SSH in to the server to troubleshoot things when they go wrong. But for a hobby project that I put together in a few hours, I might not care enough to pay for the EC2 instance.
- MustardTiger 10y agoDon't you need to use the API gateway on top of lambda? The pricing there seems like it doesn't go low enough for a lot of uses (1 million requests for $3.50 is fine, but if I only have 10,000 requests a month I am paying 100x what I need to). Or am I interpreting the pricing wrong and that 1 million requests could take 2 years to happen? Amazon pricing is way too confusing.
- lostcolony 10y ago'The Amazon API Gateway free tier includes one million API calls received per month for up to 12 months. If you exceed this number of calls per month, you will be charged the API Gateway rates.' Same as lambda. So together, first million requests are free. After a year, you'll pay ~$4 a month it looks like, for lambda (40 cents for the first million if you stay under 100 ms per and 128 megs RAM; 20 cents for the function, and 20 cents for the processing), API gateway ($3.50 for the first million calls), S3 storage (a gig is 3 cents), and traffic (I'm assuming small amounts of traffic, obviously). $4.50 if using Route 53, and $5.50 ($12 per year, paid up front, but I'm averaging it out) if you get your domain through AWS. That's not bad for site hosting + comments. I do wish they'd enable the Amazon Certificate Manager to be used on the API Gateway though.
- copperx 10y agoCorrect me if I'm wrong, but do you really think $3.50 is too high for hosting a website?
- vertex-four 10y agoIf you can write your site in PHP, nearlyfreespeech.net will host it for a total of 3 cents a day including mySQL, or roughly 90 cents a month. Lambda is more flexible, but not as cheap.
- MustardTiger 10y agoFor hosting a few dozen API requests a month? Yes, massively too high. Compare to the rest of it, that $3.50 is more than everything else involved combined. For that price you can just run wordpress on a VPS.
- Mizza 10y agoI wrote Zappa, thanks for sharing it here! :D The project is maturing rapidly and has picked up some (soft) support from some major tech companies, which is neat. I have been working on another major new feature that should be announced with a demo hopefully next week.