
How we got our AWS bill to around 2% of revenue - grwthckrmstr
https://www.sankalpjonna.com/posts/our-aws-bill-is-2-of-revenue-heres-how-we-did-it
======
PaulKeeble
If you end up in the lightsail world and you are not utilising Amazon's other
services then its probably cheaper to do this with another provider. Someone
like Contabo or Hetzner will get you VMs at substantially less cost with
similar fixed hardware and just give you the box but for a lot less a month.
At these low scales with a completely open source stack Amazon isn't good
value in my opinion. It is as you grow and it provides the scale that it
becomes valuable.

~~~
robertlagrant
This is interesting. Do you have (or know of) a published comparison
somewhere?

~~~
martin_a
What kind of comparison are you expecting?

Go to hetzner.de, create an account, fire up one of their 5€/month VPS and see
if it runs your application well. If it doesn't, upgrade the VPS (or whatever)
till the max or until you decide that AWS or whatnot might be better suited
(or cheaper).

It's nothing personal against you, but those comparisons aren't worth
anything. They are highly specific to the test case, which might very likely
not be like the stuff you are trying to run.

And I've just so often seen people on StackOverflow ask how to fix their AWS
setup to run a simple WordPress site, it's unbelievable.

There's this old saying: "If the only tool you've got is a hammer, everything
looks like a nail."

That pretty much works for GC/AWS/Azure, too.

~~~
sumedh
I think hetzner has servers in Germany and Finland only, not the right choice
for most people here.

~~~
unixhero
Hosting in Finland and Germany is a great choice for a lot of the right
reasons.

------
LogicX
Just to be clear, this would be more appropriately titled How we saved money
moving from AWS to VPS providers.

It comes as little surprise to me that the AWS lightsail offering saved them
money over traditional AWS services, just as they’d save even more using two
dedicated servers with any reasonable provider and being able to have a hot-
failover for everything.

At DNSFilter we’ve gone through the evolution of Heroku -> AWS -> VPSs ->
Dedicated -> and now are setting up our first colo rack.

I did a price comparison recently between Dedicated, AWS, and Colo. Dedicated
is 15% the cost of AWS for our needs, and colo will be 42% the cost of
Dedicated for us.

Now keep in mind we have dedicated DevOps staff and are running at a very
different scale from OP, and such a solution is not for everyone. But I
personally have never understood the folks who love to brag about having spent
much time and effort optimizing AWS to spin up and spin things down, when for
the same cost I could just have a 10x more powerful server sitting there, on
all the time to handle a spike in load, and I can utilize the extra resources
or get things done faster with faster gear at 1/10th the price.

~~~
r1ch
100% agreed. I always cringe when I see some hot new startup going all out on
AWS or other cloud services when a $60/mo dedicated box would have more than
covered their needs. No point spending that money until they actually need to
worry about scaling, and even then, the value of dedicated servers / colo is
so much better if you have the staff to support it. I manage a top 2k site off
of some OVH boxes and our bandwidth alone at any of the major cloud providers
would be many multiples of our monthly bill.

~~~
matt2000
Would you mind sharing any of your experiences with OVH that you’re able to?
I’ve used them before for hobby projects but was always worried about
reliability for anything more serious. Had also heard questionable things
about their networking reliability. Anything related to roughly how many
machines you run, types, problems encountered, etc would be super helpful.
Thanks!

~~~
r1ch
I actually had similar concerns, in my mind OVH was always one of the lesser
regarded providers with cheap hardware and attracted not-so-nice customers
judging by the amount of spam I used to get from their network.

I ended up moving my personal projects to OVH as a trial (and due to some some
gross incompetence by Singlehop). After a few months of everything looking
great, I moved our company's production services and couldn't be happier. I
now consider them one of my tier one options when looking for hosting options.
The hardware on the higher end models is all enterprise grade - Xeon, ECC,
enterprise SSD / NVME drives, etc. You also get full IPMI access with virtual
media, so setting up full disk encryption etc is a breeze. Network has been
very reliable, their DDoS protection in particular is almost magical - I
barely even see the malicious traffic before their network filters it. I only
have a handful of servers, but none of them have experienced any hardware or
major network issues. Currently have servers in their Vint Hill, Beauharnois
and Roubaix datacenters and it all seems to be equally reliable.

The value-add features like FTP backup space haven't been great, speed /
reliability problems but I don't care too much for it anyway, I ended up using
Hetzner for backup storage as they have a ridiculously good $/GB ratio. I
can't speak much for OVH support as I've rarely had to contact them, the few
times I did they resolved the problem satisfactorily. With IPMI access and
being an unmanaged service, you're probably on your own for anything software
related.

~~~
matt2000
Awesome, thanks so much for the info. Glad to hear it's a viable option since
the hardware prices always seemed great and the unlimited bandwidth would be
key for certain applications too.

------
rumanator
> An EC2 instance with 2 virtual cores, 4GB RAM and a storage of 80GB costs
> roughly 37$ a month and a Lightsail instance with the exact same
> configuration costs 20$ a month which is almost half the cost!

The author completely failed to do his homework. An a1.large instance is only
37$ if it's an on-demand instance. You pay a high premium to be able to pull
the switch in the exact minute you cease to need one.

If he's willing to go with AWS lightsail with it's monthly plan, the same
a1.medium instance type is about 11.75$/month as a reserved instance, and can
be had for about 131$/year as well.

~~~
kijin
The Lightsail instance comes with 4TB/mo of free transfer. Even using a small
fraction of that transfer on EC2 will cost you more than the instance itself.

Also, creating an instance on Lightsail isn't exactly a monthly commitment.
You are free to delete your instance at any time and only pay for the hours
you used. It's a lot more flexible than the multi-year commitment you need to
make in order to get the best pricing out of EC2.

~~~
byefruit
Yea and 4TB is $360 which dwarfs everything else.

~~~
PhantomGremlin
Okay, I don't get this at all!????

If I want to move 400 TB per month out of Amazon, why can't I just proxy it
thru 100 Lightsail instances?

Isn't that much cheaper than paying directly per byte? For that much saving
it's probably worth figuring out how to do this. It can't be hard.

Isn't it "free" to move data internally to a lightsail instance, as long as
both are in the same DC?

~~~
nordsieck
> If I want to move 400 TB per month out of Amazon, why can't I just proxy it
> thru 100 Lightsail instances?

There are some answers in the lightsail faq[1]:

1\. You're limited to 20 instances per account. They'll increase that number
on a case-by-case basis, but probably not if you're planning on proxying all
your traffic through those instances.

2\. If you delete an instance and create a new one, they share the same data
transfer allowance.

3\. All data transfer (both egress and ingress) applies to the data transfer
allowance.

It may still be worth doing the proxy setup, but Amazon seems to have pretty
clearly set up limits to make it less desirable.

___

1\.
[https://aws.amazon.com/lightsail/faq/](https://aws.amazon.com/lightsail/faq/)

------
ramraj07
I dabble extensively in being dirt cheap with my monthly cloud spend on
personal projects, and after much experimentation, I have settled on the
following:

1\. elastic beanstalk, no docker: EB comes with really nice defaults so that
you can quickly whip up a flask app, upload it and it just works. It
provisions a small ec2 instance by default which iirc costs 10ish a month at
best. Importantly, any operation you do with EB will by definition be ready
for continuous deployment since you don't get an option to ssh into the
machine to deploy. It's extensible enough to add whatever extra stuff you need
as well. Only thing it can't do is simple caching ( if you scale to more than
one instance that is), but that can be solved by having a separate eb
deployment for a worker that can take care of all these aux stuff (elasticache
is expensive I think). In a pinch, it also scales well (though the default
cheap deployment does not have a load balancer).

2\. Just suck it up and go with RDS postgres. Again, I see too many things
going wrong with spinning up your own db in an ec2 instance especially if that
instance goes down. Im too lazy to write backup scripts and keep track of
them! The cheapest RDS postgres costs 13 a month or so, but I just suck it up
to power whatever side projects I do. Postgres means I'm working with
something I know, and I get full text search and pubsub for free. And whatever
I write is not locked code in anyform, and can be scaled up if needed as well.
More importantly I'm only spending my time in technologies that are relevant
for me in my day job so that's a win.

3\. Github Actions to deploy to eb. just a few lines of yaml and you instantly
get continuous deployment directly from your repo for free! Really can't beat
that.

I have meant to try out heroku since it could be cheaper from what I have
read. But I couldn't figure out what their S3 alternative is or how different
they are from the canonical cloud offerings.

I'm sure it can be so much more cheaper, but I'm not good at advanced
networking or sysadmin, and I'm too lazy / bored / disorganised to write
deploy scripts or sshing into remote machines. I'm also always afraid of
if/how long I need to re-provision a vps/ec2 if it goes down. Not that they
do, but they can, and that scares me.

~~~
gnaman
Have you come across any cheap elasticache alternatives? I'm on AWS free tier
and AWS gives you a free 2 vCPU 0.5gb(or 1 vCPU and slightly more memory)
instance which suits me for now. But I was wondering if there are any other
managed redis alternatives? We are just 2 people and we want to keep our stack
open to be able to switch providers and I don't know how easy it'd be to
switch db instances.

I have explored redislabs but all in all it seems much more expensive than
elasticache. A similar instance from redislabs costs ~$36 vs ~$13 in AWS. My
comparison was based solely on capacity

~~~
ramraj07
Perhaps you could consider hosting redis on lightsail? It might be the
cheapest memory option within AWS (so traffic is free and fast). But it sounds
like you're trying to use it as a database? I'll still go with managed
MySQL/postgres - you can use the database's backup and restore abilities top
switch providers fairly seamlessly- I have done it from gcp to AWS. Which is
why I suck it up to RDS.

~~~
gnaman
I only need ephemeral storage. I really like the pub sub functionality (which
is the my most urgent need) of redis and the key value pair store suits me for
now.

------
elondaits
One problem of VPS solutions is that they're easy to maintain until you have
to do it. At some point the technical debt comes back and you need to upgrade
the stack components and eventually the OS as well, without sacrificing
uptime.

... if you did things well, it's just starting another instance and installing
/ copying things over with some minimum downtime. But if you don't have a 100%
documented stack, you don't know which configurations you touched to make
things work, you have files lying around, then you're probably going to pay
back all your savings and more in the workdays needed to migrate.

At my current employer we never have time for maintenance, and we don't have
professional expertise (the "I worked exclusively at this for many years"
kind, I mean) at webhosting, security, system admin or dba, so I heavily lean
towards more "managed" and cloud solutions.

~~~
amelius
But cloud solutions can change their UIs and APIs anytime they want. They can
also drop features as they please.

~~~
briffle
Has any major cloud provider ever done a major change like that without 6+
months of advanced notice?

------
pachico
I read a lot of "you are wrong", "you didn't think about this", etc, which I'm
not going to get into. I embrace these posts as an invitation to re-evaluate,
with your own data and use cases, your technical decisions and for that I'm
always grateful.

On the same note, in case someone is digging into how to reduce CDN bills, I
wanted to share that we are quite happy with BelugaCDN. It distributes objects
stored in S3 using, in a hacky way, referrals as authentication method. Lots
of money saved there.

------
lend000
A bit off topic, but I bet someone here knows. When running an EC2 instance
and not using all of the cores on the socket (for example, using a c5.large
instance instead of a c5.12x large, which gives you all the cores on the
socket), you presumably are sharing your L3 cache with your neighbors on the
same socket, because that's how the processor is designed.

Is there a way that the hypervisor allocates a dedicated portion of the shared
L3 cache to just your instance, or is it a free for all for all of the L3
cache space against potentially noisy neighbors?

~~~
nisten
Yeah that is true, you are sharing L3 cache. In order to mitigate some of
recent intel issues I think AWS actuallly has their own chip now on newer
motherboards to handle the hypervisor duties securely.

Otherwise, they'd do it in software patches for older CPUs and take the
performance hit of the patch.

I'm not sure how much the hypervisor would reserve off of the L3, it is likely
to be free for all however you'd still have quite a bit of dedicated L2 and L1
on most xenons. With AMD's first gen EPYC it's a little bit different because
clusters of cores share a cache and you can get weirdly high latencies
depending on which cores you're using, (i.e. cores 8 and 9 being too far
apart)

Also according to this anandtech article, the average total CPU load for
physical aws machines is ~60% and is actively balanced out by them. And yes,
running benchmarks on a machine without noisy neighbors yields very
significant improvements, up to 2x better on the benchmark scores. They
measured this by comparing renting out all the cores of a machine vs only
renting out the 4 or however they needed .

[https://www.anandtech.com/print/15578/cloud-clash-amazon-
gra...](https://www.anandtech.com/print/15578/cloud-clash-amazon-
graviton2-arm-against-intel-and-amd)

I'm assuming they'd put a CPU into sleep/hibernate mode in order to save power
instead of having it only run at 5% utilization.

~~~
lend000
Without any dedicated hypervisor tricks, can't a typical L3 cache eviction
algorithm also evict memory that is assigned to another core and currently
residing in its L2 or L1 cache? (Thereby flushing even the higher level caches
if another core is really noisy.)

~~~
nisten
I'm not entirely sure, it looks like for Skylake CPUs the L3 cache is no
longer inclusive but instead acts as an extension of the per core L2 cache.

[https://www.anandtech.com/show/11550/the-intel-skylakex-
revi...](https://www.anandtech.com/show/11550/the-intel-skylakex-review-
core-i9-7900x-i7-7820x-and-i7-7800x-tested/4)

I remember a while ago reading about storing your encryption keys in L2
instead of ram and deliberate "abuse" of the L3 cache on VPS hosts however
can't find that article and haven't kept up with the news on it.

Given that the intel cpu patches have reduced CPU performance by ~15% ( again
sorry don't have the exact source) I'd say there has been quite significant
changes in cache management in the name of security.

~~~
lend000
Thanks for the info. It's a dilemma when allocating instances because I want
the full per-core performance but I don't need a full socket's worth of cores,
so I just have to hope my neighbors aren't running huge jobs all the time.

------
KenCochrane
Maybe I missed something, but how do you handle the fact that your nginx
server is a single point of failure? If that goes down, traffic can’t get to
your web servers.

Do you have more than one, and DNS load balance, or do you just live with the
risk?

One of the main reasons why I use an ALB/ELB is so that I don’t have that
SPOF. If you found a way around that, please share, I would love to know, so I
can save some money :)

~~~
n_u_l_l
His database also is.

I think it's highly unprofessional to use a setup like this in production.
Looking at his product, it seems like a product whose downtime has a big
impact on their clients.

------
mattbillenstein
Their setup is trivial - they could do it at 0.2% of revenue with a cheap vps
on Linode or other...

~~~
nordsieck
> Their setup is trivial - they could do it at 0.2% of revenue with a cheap
> vps on Linode or other...

Lightsail has pretty comparable pricing to Linode. I'm sure they could re-
architect their app to use fewer instances, but they could do that and stay on
Lightsail as well.

Moving to linode isn't going to give them a 90% savings.

~~~
wolco
The price seems on par. Are there hidden costs on aws?

~~~
dijit
I'm assuming that you might not be aware of AWS pricing.

It's actually incredibly complicated and often very difficult (if not
impossible) to predict. We have a dedicated part of our organisation which
exists solely to figure out costs ahead of time for project.

I'm not sure if it's intentionally obfuscated, I would suspect not, because
"pay for what you use" can be broken down into many areas.

~~~
znpy

        It's actually incredibly complicated and often very
        difficult (if not impossible) to predict.
    

Not a joke: there are people that optimize aws bills for a living.

~~~
Ozzie_osman
There are startups that build specialized AI to optimize AWS bills for a
living.

------
elcomet
It's the difference between pets and cattle.

They are using Lightsail to create pets, it has not much configuration. When
you need a cattle, you need more config and complex setup which costs money.

As they say in the end, this is because they are a micro startup and don't
need a huge scalable infrastructure.

It's funny as it seems to be the inverse of economy of scale. The more you
grow, the higher the marginal cost. But I think that Amazon gives discount to
large users

------
scarface74
For context, I know the ins ands outs of most of the core AWS services
_really_ well from the dev, Devops, and ops side.

But, my advice tends to be Lambda first if it is really low volume, LightSail
second, and full AWS third.

As far as Lambda, I often recommend proxy integration, where you can just use
the standard API framework for whichever language you choose (Django, Flask,
Express, ASP.Net, etc) add three lines of code and push the entire thing into
Lambdas. This gives you the flexibility to deploy to a VM later with no code
changes.

For your static assets use S3, except for the case of Lightsail where you get
plenty of free bandwidth.

~~~
root993
Hello, author here.

I totally agree on Lambda first. The only reason we did not do that is because
when we started this product I was not well versed with Lambda and serverless
and preferred to work with something that I dealt with previously.

If I could go back in time, I would set up all our applications on serverless.

~~~
scarface74
Disclaimer: I work for AWS Professional Services but I just started. All of my
experience comes from working at outside companies.

From the perspective of an outside, boots on the ground Developer/architect,
I’ve never worried about “vendor lock in”, I believe you should choose your
infrastructure wisely and go all in. But, I do worry about “Lambda lock-in”
for APIs. I like the optionality of being able to deploy my APIs anywhere just
by changing the CI/CD pipeline.

That’s why I recommend using proxy integration. Every language supported by
Lambda has a method to just throw your standard API in lambda without tying
yourself to it.

Here is an example for Node/Express

[https://github.com/awslabs/aws-serverless-
express](https://github.com/awslabs/aws-serverless-express)

Python/Flask (ignore the DDB part):

[https://www.serverless.com/blog/flask-python-rest-api-
server...](https://www.serverless.com/blog/flask-python-rest-api-serverless-
lambda-dynamodb/)

C#/Web API

[https://aws.amazon.com/blogs/developer/deploy-an-existing-
as...](https://aws.amazon.com/blogs/developer/deploy-an-existing-asp-net-core-
web-api-to-aws-lambda/)

------
ChicagoDave
I’m wondering if Lambdas and DynamoDB would be competitive to this setup.

~~~
aritraghosh007
Since they are serving about 250 requests per second, Lambdas might end up
being more expensive, factor in an expensive DynamoDB and that monthly AWS
bill looks scary.

~~~
root993
Hello, author here. I just want to confirm that this is one of the reasons why
we did not go with Lambda and the other reason being I was not fully aware of
and versed with serverless when we started this venture

------
peterwwillis
You can shop for deals on VPSes at lowendbox.com. But if you're trying to run
a business, this is a waste of time. Find a provider which is highly reliable,
which can also automatically rebuild all failed infrastructure with no
intervention needed. That eliminates 99.999% of the providers out there.
You're paying a premium to never have to think about your tech again, so you
can focus on the business.

Besides using the free tier and other AWS services which are practically free
at low uses, you can use cost effective options like Fargate Spot Instances
and EC2 Reserved Instances. I highly recommend Fargate over running instances.
Use Lambda with CloudWatch triggers if you need to schedule occasional jobs
(or use Fargate's feature for that). Try to avoid heavy reliance on caches,
ElastiCache is kind of a rip off. Move as much content to static as possible,
use CloudFlare to reduce bandwidth costs. If you're gonna serve over S3, you
might as well front it with CloudFront as it's actually cheaper due to caching
at the edge, and also more reliable. ALBs are expensive but very useful for
APIs as well as autoscaling (if you have to run instances, run them with an
ASG, which also means having versioned AMIs)

------
darsoli
For the mathematically disinclined (such as myself), the total savings are at
least $229/mo .. not bad! Curious if you could use Cloudformation to provision
these instances and setups?
[https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amaz...](https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-
lightsail-cloudformation-stacks)

------
barnabask
I'm interested in the managed DB part of this writeup, specifically that OP
chose Lightsail. The last time I looked into it, Lightsail was MySQL only, so
that was good to know.

I wrote a PostgreSQL DBaaS Calculator that got some traction here a while ago,
and I just updated it this evening to add Lightsail to see how it stacks up:
[https://barnabas.me/articles/postgres-
dbaas.html#calculator](https://barnabas.me/articles/postgres-
dbaas.html#calculator)

No surprise, Lightsail is similar pricing to RDS with a 1-year commitment, but
it's month-to-month. It's a pretty good deal until you need more than 8 GB
memory, 240 GB storage, 2 cores ($115/month Standard plan). But Azure or AWS
RDS are the ones to beat.

------
anthony_barker
When I did data center stuff for a large company the biggest cost was network
- not servers. Specifically network security and redundancy.

Its amazing to me that this is all included for basically free except for
Application level filtering by these providers.

~~~
EdwardDiego
Yep, I was consulting for a firm with an already sizeable infrastructure
investment/dependence on AWS, and their architects were proud of their best
practice usage of multiple AZs for redundancy, but weren't know that inter-AZ
traffic cost also. So I imagine they're going to have fun trying to
incorporate that into their infrastructure layout.

In my day job we saved $600 a day by cutting down on needless inter-AZ
traffic.

------
tzs
> An EC2 instance with 2 virtual cores, 4GB RAM and a storage of 80GB costs
> roughly 37$ a month and a Lightsail instance with the exact same
> configuration costs 20$ a month which is almost half the cost!

In general I'm not sure you can really compare instances from different
service by just look at cores, RAM, and disk.

I used to have my small website and email server at Rackspace, on the
smallest, cheapest instance. I ended up getting out of mail hosting (moved
that to Fastmail), and putting the small website on Lightsail.

The Lightsail instance and the old Rackspace instance have the same nominal
specs for virtual cores, RAM, and disk. (Actually, Lightsail may be better on
disk--I don't recall if the Rackspace one was SSD like Lightsail).

The main thing the website actually does is host some graphs showing the
temperature in my house. An ESP8266 temperature monitor I made uploads a
sample once a minute. A script was running once a minute on the server that
using gnuplot to make graphs of temperature over the last hour, 3 hours, 12
hours, 48 hours, and over all samples.

At Rackspace it ran that fine, while at the same time gathering my mail from
several services via fetchmail, receiving mail for my domain on its smtp
server, and running spam filtering.

On Lightsail just handling the website it was locking up every few hours. I
managed to catch one pre-lockup and found the load average was something like
300.

What was happening was sometimes that once a minute graph generation task was
taking longer than a minute, and that would slow down the next one, and so on.
Oddly, it didn't seem to be gnuplot that was taking too long, but rather the
script that took the file containing all the samples, and extracted just the
samples newer than a specific threshold. At least, running everything by hand
that was the only step I ever saw take unusually long.

I changed it to every 5 minutes to temporarily stop the frequent hanging, and
then added a check to my script to skip regenerating the graphs if a previous
instance of the script was still running to fix things permanently. I also
changed it from storing the data in just a big file of samples sorted by time
to an sqlite DB.

------
fxtentacle
TLDR: Use Lightsail, Amazon's approximation of a dedicated server.

In my opinion, that approach sacrifices pretty much all the benefits that
cloud proponents usually talk about, like only paying for what you actually
use or scaling up and down on demand.

In fact, I'm not sure what the actual difference would be between Lightsail
and a good dedicated hoster that provides backup and failover services.

~~~
alain_gilbert
The difference would be:

\- They could have much better service

\- And bring down their expenses by at least half again

I used lightsail, and it's a terrible service.

It is very expensive (still) compared to other hosting providers.

And if your instance ever go out of memory, it become unresponsive for as long
as you don't go manually restart it.

On other providers that I use, the OS would just "sacrifice child" (kill the
process) and restart it.

It's not ideal, but much better than having to go there yourself to restart
the whole thing.

~~~
fxtentacle
I've been using cgroups since way before docker made them cool exactly for
this: if one process goes rogue on memory use, make sure only exactly that one
crashes.

And yes, I fully agree with you. In addition to the other disadvantages,
Lightsail also shifts the burden of process monitoring and management onto
you.

~~~
alain_gilbert
I use docker. And yes, it normally just take care of restarting the app
whenever something goes wrong.

But somehow on lightsail (only), the machine just goes completely unresponsive
instead.

------
barrenko
Slightly off-topic, but is there a book to learn about this kind of stuff,
preferrably without having to sign up for AWS, but that does have code samples
and whatall?

~~~
root993
There is one book that I would highly recommend - [https://gumroad.com/l/aws-
good-parts](https://gumroad.com/l/aws-good-parts)

------
t0mas88
I don't understand why this is so special? Ours is about 4% for a very compute
heavy service handling millions of events per day across four continents.

------
axegon_
It's no secret that I've had my fair amount of criticism towards AWS's billing
and how unpredictable it becomes, even if you read every fine print and take
everything into account. Especially if you are a heavy user, "correction
invoices" are not uncommon. That said, cloud services can be incredibly cheap
if you are very careful and smart about it. Especially if you combine several
of them.

------
reledi
Another approach to consider, that's so straightforward and quick that most
will consider it boring and overlook it.

\- kill services with low usage

\- downgrade instance size

\- downgrade instance type

\- merge databases

\- schedule services with obvious usage patterns to shut down when not used

\- use EC2 spot instances

Most importantly, it requires an aggressive culling mindset. If drastically
reducing the AWS bill means staying afloat, then make bold choices.

------
mark_mart
As a summary: They use AWS, see huge bills, then decide to not to use AWS
services and switch to redis, nginx etc.

------
ravedave5
A lot of this is penny wise pound foolish. Managed services cost more, but
they provide more. RDS is just such a simple slam dunk for what you get for
the cost. How much does it cost to spend 8-20 hours a week handling
maintenance and upgrades and scaling for these services? I guess I'm bitter
working on a project that was built with all sorts of crazy custom deployment
stuff too conserve costs that's a total OPs nightmare. Moving from Redis on
EC2s to elasticache was such an upgrade. We constantly had little issues here
and there.

Edit - Alsocontainerize your app from the start so that if it does take off
you can slam it in ecs or k8s.

------
raverbashing
So Lightsail is the AWS equivalent of DO/Linode/etc?

~~~
sumedh
Yes, AWS probably realized that they losing money to DO/Linode so to capture
some of that market they launched Lightsail.

------
sandGorgon
The general rule of thumb to drop AWS bill is spot instance. Which is very
hard to do unless you build your application to be tolerant of server kills.

------
aiibe
Definitely off topic, are you using Twilio/Whatsapp at superlemon.xyz ?

I wonder how do you cover the cost for unlimited outbound messages in your
free plan...

Thanks

------
m3kw9
You said you basically use Shopify as CDN, what’s stopping everyone from just
setting it up and abuse it?

~~~
root993
Hello, author here.

Like I mentioned in the post, there is no way to programmatically upload
anything to the Shopify CDN and the CDN cache cannot be invalidated once you
upload a file. If you want to update an existing resource, all you can do
really is upload a new one.

This ofcourse still does not completely prevent people from abusing it, but it
does restrict usage to a large extent. There is also the issue of giving out a
cdn.shopify.com link to your customers instead of something that has you
company branding on it. This is not a problem for us because our customers do
not have to manually add this snippet to their website and we do it via an API
instead, so this link is not apparent to our customers

------
jorangreef
Do Hetzner or xneelo reflash the firmware on server hardware when they recycle
them across users?

------
euph0ria
How do you solve high availability with the nginx setup? What software for
heartbeats?

------
person_of_color
Another day, another SaaS that I can’t believe has value.

------
Software202
Really good one.

------
pezo1919
Here is how I do: no revenue, no bill. ;D

~~~
random_visitor
I've first hand, witnessed people having no revenue and a long AWS bill. A
direct consequence of using all the hip services when they didn't need any.
I'd say you're doing great (to be clear this is not sarcasm)

------
KorematsuFred
Tldr;

Author is talking about few hundred dollars here.

~~~
sushshshsh
At that rate a raspi on starbucks wifi would get them to 0.2%

------
whack
I appreciate the disclaimers at the end:

> _I would like to put emphasis on the fact that we are a micro-SaaS product
> that solves a small and specific use case and therefore this kind of AWS
> setup worked for us. This may not work for big organisations or products
> where the traffic is erratic._

> _This setup will also not work for folks who have a ton of stuff to do
> already and would prefer to use managed services and not take the additional
> headache of monitoring, maintaining and provisioning hardware resources on a
> regular basis because this has a time cost to it._

It is refreshing to see a post that doesn't pretend as though its
recommendations are the holy grail for anyone and everyone.

I personally prefer saving time and effort, over a ~$500 monetary discount.
But it's nice to read posts like these and learn more about alternatives such
as Lightsail.

~~~
ldoughty
> I personally prefer saving time and effort, over a ~$500 monetary discount.

Completely agree. As the general "Ops" manager, I hate getting the call at 2am
because something broke... I hate it even more when it's not really fixable by
me in the first place (e.g. black box appliance or software).. but I feel a
heck of a lot better when I can point the finger at an external team that's
paid and supposed to be experts... If you outsourced Redis or you DB, and
someone like AWS or MongoDB themselves has an issue... Will they pay people a
lot of money to simply provide that service reliably... I get paid to keep 20
things connected, not be the subject matter expert in all of them.

~~~
amelius
> but I feel a heck of a lot better when I can point the finger at an external
> team

But how would you feel if you were not just the Ops manager, but the CEO as
well?

~~~
ghaff
I think if I were the CEO I'd have even more on my mind than managing servers.

I totally get that it can be cheaper to do things yourself. And I also get
that sometimes you literally can't afford to go the easier route.

But I also think a lot of people of forums like this overly discount time
spent or even just distraction that take away from doing the many other things
you could be working on as part of a business.

------
omnifischer
Text from about me:

> where I learnt how to scale an application to serve ads to millions of users
> a day

Please lets stop this 'race'.

------
longtermdd
AWS expense/ revenue is an insane anti-metric to track.

------
samstave
I have a question: (it may not be related to this article in any other sense
aside from "really lightweight" use of AWS...

I would like to have a workflow of really lightweight QR/barcode
transactions... but with what seems to me currently a complex implementation:

1\. you have a prescribed barcode ParentA 2\. you scan that barcode and create
a QR code ParentB 2.a: you ascribe that QR to an object ChildA 3.n: you have
that ChildA go through many iterations 3.n+: ChildA may be conjoined with
ChildB,C,D etc... -- but I want an iterative QR code that follows the family
tree back to parent A and keeps history of all transitions...

(I know I am wording this poorly... just thinking out loud...)

~~~
unixhero
So what about the grandparents, and how would ChildN go to kindergarden?

~~~
samstave
What a fucking stupid response.

The workflow that I am talking about would apply to taking the nightmare out
of METRC tracking system for cannabis -- the METRC system is a piece of shit -
but wants complete chain of history of how plantA becomes productA - and it is
a bullshit workflow - and I have a way to make it easier - and by using a
system similar in the way described in this post, it could be done very
cheaply...

~~~
unixhero
For what is this workflow? Just curious.

If it's barcodes being used by humans in the real world, get a software
package to handle it, check the solution from Zebra
[https://www.zebra.com/us/en/products.html](https://www.zebra.com/us/en/products.html)

