I'm working on a project of mine and I'm expecting about ~500-750k unique pings per month.
I'm curious to hear if there's any better way (in terms of latency) to host a static website than my idea below.
Idea:
What I'm hosting:
Also, if my idea above is OK, which EC2 instance would you go for? I'm thinking a micro instance would do just fine, I don't see why I would need the extra RAM/CPU.
Edit: Or how about something simpler like S3 w/ CloudFront?
Cost effective , high-available, fully managed , secure and fault-tolerant solution for your case is AWS S3 :
Create S3 Bucket (mybucket) and enable website static properties on it.
Create IAM user with a permission of read/write on that bucket.
"Version": "2012-10-17",
"Statement": [
{
"Action": "s3:ListAllMyBuckets",
"Effect": "Allow",
"Resource": "arn:aws:s3:::*"
},
{
"Sid": "Stmt1487841624000",
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": ["arn:aws:s3:::mybucket/*", "arn:aws:s3:::mybucket"]
}
]
}
(Keep secret key and access key and the region where you create the bucket)
Configure your secret key and access key in your laptop
aws configure;
Then upload your static website :
aws s3 sync /path/to/local/dir s3://mybucket;
Congrats! your website is hosted : http://[BUCKETNAME].s3-website.[REGIONMAME].amazonaws.com
If you want to :
map the website to another domain
or/and use SSL
or/and integrate with WAF.
or/and so on...
Use also AWS CloudFront.