CodeDeploy is a new AWS offering, just announced today at re:Invent, and it is the Goldilocks of AWS deployment tools. Where CloudFormation gives you a ton of freedom, it does require a bit of work to get it to deploy your app. Elastic Beanstalk makes it super easy to deploy an app, but if your app requires anything special, getting Elastic Beanstalk to work with it can be an exercise in frustration.
CodeDeploy looks to fill the gap between the two, allowing you a great deal of flexibility with deploying your application, but still giving you a lot of control over how it’s done.
At a high level, this is how CodeDeploy works:
- You define an appspec file which basically is just a yml file that lays out the list of shell scripts that get run to deploy your app.
- You package up the appspec and your app into a zip file and push it into an S3 bucket
- You tell CodeDeploy about your app, and where to find the S3 file.
- You tell CodeDeploy about your instances so it knows where to deploy
- You push a button in CodeDeploy, it deploys your app to your instances
CodeDeploy is a great tool to use in conjunction with a configuration management tool like Chef or Puppet. You can easily kick off those tools from CodeDeploy configuration scripts, allowing you a much more fine grained control over your deployment than you get with Elastic Beanstalk, but giving a lot more feedback than if you were just to use CloudFormation.
We’ll be doing a couple more pieces on CodeDeploy in the future, including getting it working with our reference implementation, so look for those in the next couple weeks!