S3 Static Website with SSL Certificate
Create a static website that is hosted in S3 and assigned a SSL certificate through a CloudFront distribution.
S3 Bucket
Navigate to S3 > Create Bucket.
Name and region | |
Bucket name | Specify your Bucket name (names are globally unique) preferrably the same name as your domain name for example Gateway53.com |
Region | Select your Region |
Click on 'Create'.
Select your Bucket and click on 'Edit public access settings' and un-select 'Block all public access'.
Click on your Bucket and upload your static files to your Bucket.
Click on the 'Propeties' tab and on 'Static website hosting'.
Select 'Use this bucket to host a website' and supply your Index document name (index.html).
Click on the 'Permissions' tab and on 'Bucket Policy'.
Add the following bucket policy and click 'Save'
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::MyBucketName/*"
}
]
}
Certification Manager
Create a certificate for your CloudFront distribution.
CloudFront
Build your CloudFront distribution.
Route53
You will have to wait until your CloudFront distribution is Deployed and the State is Enabled before you continue.
Navigate to Route53 > Hosted zones > select your hosted zone.
Click on 'Create Record Set'.
Name | Leave the value blank infront of your naked domain name. |
Type | A - IPv4 address |
Alias | Yes |
Alias Target | Select your CloudFront distribution. |
Routing Policy | Simple |
Pricing
Resource | Type | Cost |
Route 53 | ||
Domain Registration | Yearly | $12.00 |
Hosted Zone | Monthly | $0.50 |
Standard Queries | Monthly |
$0.40 per million queries – first 1 Billion queries / month $0.20 per million queries – over 1 Billion queries / month |
S3 Bucket | ||
S3 Standard Storage | Monthly | $0.023 per GB |
Data Transfer | Monthly | $0 |
Certificate | ||
Certificate | Once Off | $0.75 |
CloudFront Distribution | ||
Data Transfer Out To Internet | Per GB | $0.110 |
Data Transfer Out To Origin | Per GB | $0.060 |
HTTP Requests | Per 10 000 | $0.0090 |
Overheads | ||
Setup & Build | ||
Once Off | ||
Maintenance | ||
Monthly |