DEV Community

Discussion on: Free hosting for developers.

Collapse
 
sasicodes profile image
Sasidharan • Edited

If you change your Objects in s3 very often/ updating code frequently will costs for CRUD in s3.Considering that makes little bad for me. But its ok.

Thread Thread
 
byrro profile image
Renato Byrro • Edited

True. On average, though, website static files are updated infrequently. You might have one or another file updated more regularly, but the overall update rate will be very low in comparison to the total number of files stored.

And if you are indeed updating some things very frequently, depending on what it is (e.g. a JSON string), it might be worth considering a more dynamic storage solution.

The equivalent to an S3 PUT operation is 4x cheaper on DynamoDB (Write op), for instance. "S3 GET" operation is 1.6x more expensive than a DynamoDB Read op. And that is for Dynamo On-demand. If you have a somewhat stable and predictable demand, Provisioned Throughput would be even cheaper. That is considering a small object with <4kb in size for Reads and <1kb for writes.

Thread Thread
 
fasani profile image
Michael Fasani • Edited

You seem pretty knowledgeable on AWS. I’m thinking about the following... I plan to setup a Gatsby site. I plan to use GitHub actions to push to S3 on commit to master. Adding cloud front to CDN it. Then I will write either a Rust or Node comments system and put it on EC2 so when a person comments that will push a commit to GitHub to be merged later by me and redeploy that commit to S3. I know this may sound like a bit of effort but the goal for me is to learn Rust, Gatsby and AWS. I also may use serverless for the comments system. I know I could just use Lightsail but I already have a fully managed hosting solution that I could use. It’s more about having fun! Does this sound like a decent/correct approach in your opinion? I haven’t done any kind of DevOps for about 15 years, I only decided yesterday that I will learn some AWS. Thanks!

Thread Thread
 
byrro profile image
Renato Byrro • Edited

As a project for learning, it seems very interesting. For production workloads, this doesn't seem like an efficient architecture.

Personally, I tend to stay away from EC2 as much as I can. You can probably run 80-90% of workloads on AWS Lambda nowadays. Looking superficially at your idea, I don't see a reason why you couldn't go Serverless. I would also use AWS API Gateway to interface HTTP requests with Lambda. That would be my primary choice.

I don't know if it would be possible, but maybe you can use API Gateway as a proxy to the Github API directly. You can transform incoming requests to match Github specs, and also customize responses to the clients commenting.