HVC AWS Deploy
HVC AWS deploy is a library that will help you deploy front end applications to Amazon Web Services quickly and easily.
Installing HVC AWS Deploy
yarn global add @ivanhvc/hvc-aws-deploy
How To Deploy
First, make sure you have your AWS credentials set up on your machine. There are various ways to do this; for steps on how to set up your AWS credentials, please check the AWS documentation:
Loading Credentials in Node.js from the Shared Credentials File
Once you have your credentials set up, go to the root of your Vue, React, etc. application and run yarn build
. Once the build is complete and your build
or dist
folder is created, just run the following command:
hvc-aws-deploy start -name bucket-name-here
If you want to deploy to a different profile in your AWS configuration you should add the --profile
or -p
command:
hvc-aws-deploy start --name bucket-name-here --profile other-profile-here
Once the deployment is complete, you should be able to see your website after about 30 seconds -1 minute. A new JSON file should also appear with information regarding your deployed website. (Make sure to add this file to your .gitignore file!)
{
"bucket": "hvc-example-deploy",
"distribution": "XXXXXXXXXXXX",
"domain": "XXXXXXXXXXXX.cloudfront.net",
"createdAt": "2020-10-13T04:12:13.914Z"
}