Reducing Costs
On Digital Ocean, I can run the Commuter Challenge for $11 a month. I use a small droplet which hosts both the app server and the database. I use a Simple Object Storage bucket for user uploaded content like profile pictures and events flyer images.
Going into AWS I expect I'll be paying more, and my goal is to host everything on $20 or less a month. I know it's going to be close because I plan to use RDS. I could probably achieve a similar price if I continued to run everything on a single EC2 instance. But, I want to do things the "proper" way. I want to learn more of the AWS tools that would be used on a highly available enterprise system, even if I run them for a bit and find a different (cheaper) way.
NAT GW Cost
In my last post I set up an EC2, NAT Gateway and SSM. I logged on the next day to start investigated RDS and saw a charge of $0.24. Gasp! It was only turned on for a few hours! Anyone with AWS experience knows right away that this charge is from the NAT Gateway. At $0.045 per hour, it costs a minimum $30 a month to run.
That won't do. For a company, the overhead of not managing your own NAT is probably worth it. Although depending on your use case, that might not be true.
It looks like if I want to keep my EC2 in a private subnet I should look into running a NAT Instance, or maybe implement IPv6 and an egress only internet gateway.
NAT Instance
The AWS NAT Instance hasn't received updates since 2018, and I saw many recommendations for fck-nat. It's active, has to easy follow instructions, and a cloud formation template to get you going. I won't post the template here as its the same as on the deploy instructions, but with my template's references replacing parameters.
Using a t4g.nano for the NAT instance, it should cost around $3.50 a month! Now I can get back to RDS or the S3 bucket with CloudFront.