Prebaking vs. Bootstrapping AMIs - Overview of Deployment Options on AWS

Prebaking vs. Bootstrapping AMIs

If your application relies heavily on customizing or deploying applications onto Amazon EC2 instances, then you can optimize your deployments through bootstrapping and prebaking practices.

Installing your application, dependencies, or customizations whenever an Amazon EC2 instance is launched is called bootstrapping an instance. If you have a complex application or large downloads required, this can slow down deployments and scaling events.

An Amazon Machine Image (AMI) provides the information required to launch an instance (operating systems, storage volumes, permissions, software packages, etc.). You can launch multiple, identical instances from a single AMI. Whenever an EC2 instance is launched, you select the AMI that is to be used as a template. Prebaking is the process of embedding a significant portion of your application artifacts within an AMI.

Prebaking application components into an AMI can speed up the time to launch and operationalize an Amazon EC2 instance. Prebaking and bootstrapping practices can be combined during the deployment process to quickly create new instances that are customized to the current environment.

Refer to Best practices for building AMIs for more details on creating optimized AMIs for your application.