æonian
Continuous Deployment for your AWS S3 + CloudFront environments
still in early development
what does this do?
- Creates a new S3 bucket
{prefix}-{commit-hash}-{environment}
based on the current repo and config - Upload the contents of a directory you specified as
localDir
- Configure this bucket as a static website
- Change the origin of the CloudFront ID associated to point to our new bucket's website URL
- Initiate an invalidation on
*
making the Distribution pull the new bucket's content - Delete the previous bucket that was assigned as the origin as to not leave a trail of buckets
for example
- Let's say you have a file
operations/staging.js
with the following
let ae = require('aeonian').config({
bucket: {
localDir: './dist/',
prefix: 'mysite-'
},
environments: {
staging: 'CLOUDFRONT_ID',
production: 'CLOUDFRONT_ID',
}
})
ae.deploy('staging')
- Running this would result in seeing
installation
- Install the aeonian package
npm install aeonian
or
yarn add aeonian
- Set the current environment variables to your AWS key and secret for the AWS JS SDK `