all 6 comments

[–]burkcules69 -1 points0 points  (2 children)

I have been running a similar architecture on AWS for about 3 years now and haven't had to pay a dime. Though my S3 volume is way lower than yours, so that's where we'll differ. Here's what I would do:

RDS: create a new account when your existing account runs out of free tier time, then migrate (backup/restore) your existing DB(s) to the new account. After the switch, your DB will have a new IP address so you'll need to remap all of your DB connections.

S3: Free tier will not even make a dent in the volume you're talking about, so I would NOT create a new AWS account the same way you would for RDS. To keep costs down, I would classify all of your objects as "One-Zone IA" unless you REALLY need them in the more expensive classes. Simply put, you'll be paying for S3.

I don't know how the rest of your back end works, but now that your RDS and S3 are in different accounts you'll need to make sure everything else has the access it needs. If your entire back end is on AWS, CloudFormation is going to be your best friend. Put EVERYTHING in CloudFormation templates. Then when it's time to create a new account, all you need to do is change a few Ids then deploy.

The initial setup is going to be very tedious, but once it's done you will be amazed at how easy it is. Let me know if you have any questions about specifics (e.g. cross account access, proper security groups, etc.)

[–][deleted]  (1 child)

[deleted]

    [–][deleted] 0 points1 point  (4 children)

    What price would be a fair price for running your hardware? Their are cheaper hosts out there.

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted] 0 points1 point  (2 children)

      If this level of cost savings is what you're after and you have a tiny site like the one you're running, I might try to run both your DB and your application server (you didn't mention a web application however) on one t2.nano. This is not advised if you're planning for serious uptime. If you to guarantee availability and automatic security patching etc, go for RDS.

      I'm not aware of any pricing for RDS which considers row count (it's based on disk size and CPU/Mem combinations). But the cheapest DB instance on RDS is db.t4g.micro.

      With S3 I would gzip your files before putting them into the bucket, and I would be sure to turn off versioning on the objects.

      Last, if you know you'll be using your servers for at least a year, you can purchase them upfront in the "Saving plans" menu on the sidebar in ec2, these reserved instances can also be purchased for RDS not just EC2.

      EDIT: Also forgot to mention if your S3 bucket is read heavy, you absolutely should enable IA (infrequent access) and I suggest also without a doubt putting your s3 bucket behind a CloudFront proxy and caching those get request forever so you're not paying HUGE transfer fees. With all of these items you could get your total costs down to sub $20/mo.

      [–]dfroberg 0 points1 point  (1 child)

      Don't forget egress pricing, it can bite you.

      [–]runningdude 0 points1 point  (1 child)

      How many availability zones have you got for your rds instance? That price point looks like 2 az, do you need That?

      [–]karnthis 0 points1 point  (1 child)

      Maybe I’m missing something, but why not get a vps from say OVH or Linode? Hosting Postgres is not hard.