Skip to content

Latest commit

 

History

History

S3+CloudFront

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Deploy to S3 + CloudFront

A CloudFormation setup using S3 and CloudFront. The index.html and all assets are uploaded to an S3 bucket created by the template, and served through a provisioned CloudFront distribution, using a custom domain name and SSL encryption.

The setup supports history-location based routing by suitable CLoudFront settings to serve index.html for non-existing content.

Note: the domain name is not automatically setup. You have to add a CNAME record to your DNS pointing to the CloudFront domain name, given by the CloudFrontDomainName output!

Deployment plugins

Install these additional Ember CLI Deploy plugins:

CloudFormation template

cfn.yaml

Example configuration

deploy.js

Inputs

Name Description Type Default
DomainName Domain name of the CDN, e.g. www.example.com string
CFCertificate Existing ACM Certificate ARN for DomainName. Must be created in the us-east-1 region! string
ForceHttps Force HTTPS by redirecting HTTP requests 0 / 1 0

Outputs

Name Description
AssetsBucket The name of the S3 bucket the app will be uploaded to
CloudFrontDistribution The CloudFront distribution ID
CloudFrontDomainName The original domain name of the CloudFront Note: the DomainName input parameter will be used as a CNAME. This is the primary domain name