The recommendation against using S3 for static hosting is that there are much better alternatives outside of AWS. The dev experience you get with Netlify and Zeit will almost certainly never be possible with AWS.
"""
#!/usr/bin/env bash
rm -rf public
hugo --verbose
aws s3 sync ./public s3://$BUCKET_NAME --profile s3_personal
"""
You can set custom TTL for CloudFront to 0 for instant refresh in production. Dev server is `hugo server`, `hugo` is a single Go binary you can Dockerize with --net=host and --volume=$(pwd):/app to use your own dev environment. If you don't maintain too many large static assets, your cost is like 5 cents a month, and I think that's a competitive price, not AWS being generous. $12 / year for a custom domain via ICANN, and Route 53 manages A/AAAA/CNAME/MX records for free.
Again, not to refute your claim. I'm a single author, who publishes as a hobby, with a single dev and a single prod environment, so if things break down (it hasn't for years), it's easy to fix. It's much different than content marketing and enterprise use cases. Even so, I would rather start here and add a static CMS like Forestry before considering a custom solution like Netlify (which is probably built on top of AWS anyways).
Looks like you can add extra developers on the lower tiers for $15/user/month, but they're still charging way more per GB than AWS does.
I get that you should always charge more if possible, but I'm much more concerned with surviving during hard times, and there's just less to ablate away if you stick more or less to first principles.
If your time frame for hosting is 10+ years, I’d personally recommend to put your eggs in s3, (or the “s3 interface”, to be specific; whether it’s with AWS, DO, etc).
So, is Amplify just a simplified interface to S3+CF?
Includes CD and Amplify itself (like Cloudformation) is free, you only pay for the resources you make.
AWS Amplify has been out for a couple years now, and it is also able to automate much more than just static websites.
So taking a look at the 2 options you mention, I am not seeing anything that those do that Amplify does not (but the opposite is not true, Amplify does a lot of things for you out of the box)
With the recent GA of AWS CDK [2] I would say that it is getting more and more possible to define your own development workflow that is tailored to your own static website hosting needs and better than just raw S3. AWS CDK is still difficult to use with some rough edges, and I know that setting up e.g. a CodePipeline and CI/CD is difficult.
Here is the CDK example for hosting a S3 origin + CloudFront CDN + custom TLS certificate + CloudFront invalidation on deployments static website [3]. Here is my personal version of it combining Hugo that took me a day to set up [4]. Still complicated, lot of rough edges, but offers a pleasant dev experience [5], I haven't yet built up a CI/CD pipeline.
Disclaimer: I work for AWS but my views are my own.
[1] https://aws.amazon.com/amplify/console/
[2] https://aws.amazon.com/cdk/
[3] https://github.com/aws-samples/aws-cdk-examples/blob/master/...
[4] https://github.com/asimihsan/asim_ihsan_io/blob/master/cdk/s...
[5] https://github.com/asimihsan/asim_ihsan_io/blob/master/READM...
That's exactly what Amplify Console is, and it's really good.
I don't understand the eagerness to trade-off $/user instead of $/bandwidth (which is far, far cheaper in nearly every case) just to save a day or two of learning how to use a tool.
For static hosting, AWS Amplify is already a very similar experience to Netlify. Each is slightly better than the other in some ways, but overall they are really very similar.
If you truly have no interest in them other than as a user, then it seems as if you're not aware of alternatives such as AWS Amplify. You haven't responded to any of the comments pointing out the issues with your claims.
Whatever book you're a co-author of doesn't sound as though it's worth the price.
As far as I can tell, AWS exists to optimize accounting and inter-departmental friction, and not to solve any technical problem.
I'm a bit stumped on why they say to avoid using local indices in DynamoDB, though.
https://docs.amazonaws.cn/en_us/amazondynamodb/latest/develo...
Here is a link to the AWS docs referencing the limitation of local secondary indices. Any table with a local secondary index is limited to 10GB per partition key.
The authors may have misinterpreted this limitation.
>Once you create a local index on a table, the property that allows a table to keep growing indefinitely goes away.
It limits the value for that partition key but does not limit the overall size of the table...
For convenience and other reasons, I use S3 to publish some videos for a small group (~30) I teach. Wondering if serving that thru CloudFront would be cheaper.
This is especially important to me now as I'm doing this while everyone here is under voluntary self-isolation so I'm relying on video more.
Not that S3 was ever that expensive for me but if CloudFront is cheaper...
Otherwise, it might not be worth the cost of the distribution!
I'm paying for either S3 or CloudFront for distribution regardless, and either way their transfer out to internet pricing looks similar:
https://aws.amazon.com/cloudfront/pricing/
https://aws.amazon.com/s3/pricing/
Transferring from S3 to CloudFront looks free, so I might give it a try. Already have S3, just have to set up CLoudFront.
I hope I didn't miss something on pricing... really can't afford bill shock!
S3 transfer to CF is free I think so might be worth my giving it a try.
I used this stack (S3, CF, R53, & ACM for SSL cert) to deploy a static site built using Hugo, which can deploy directly to an S3 bucket.
If you're crafting the site yourself without a builder, you can just use the AWS CLI to `cp` the files to the S3 bucket. You may need to invalidate the CF distribution if you want everything updated quickly worldwide.
I would absolutely recommend S3 for static web hosting. Just add CloudFront on top if you need HTTPS, it takes like 2 clicks.
If anyone interested, I answered on StackOverflow how to deploy a front end app (React, Vue, etc) to S3: https://stackoverflow.com/q/41250087/652669