Best strategy to deploy static site to s3 on github push?

I'd like to automate deploying our site to AWS S3. I've written a node script to automate building and uploading the site, but I'd like to have the script automatically run whenever the master branch of our repo is updated on github.

I looked into AWS CodeDeploy, but it looks like that's for specifically deploying to EC2. I've also looked at AWS Lambda, but there doesn't seem to be a clear way to pull a copy of the repo using git so I can run the script.

Any services (preferably tied to AWS) that I can use?

Answers 1

  • Rather than using an AWS service directly (as you say they nearly all expect a much more complicated setup, deploying to EC2 etc), you might be better off using a CI provider such as Shippable, Codeship or Wercker.

    These all have the ability to fire from git updates, run build commands, install utilities into their CI images/containers and copy files to S3.

    There's probably some startup which has built an exact tool for your purpose, but they haven't appeared on my radar yet :-)


Related Articles