Building custom ECS container instance images using Packer
In the previous section, you established a base template for building a custom AMI using Packer, and proceed to build and publish your first custom AMI. At this point, you have not performed any customization that is specific to the use case of provisioning ECS container instances, so this section will focus on enhancing your Packer template to include such customizations.
The customizations you will learn about now include the following:
- Defining a custom storage configuration
- Installing additional packages and configuring operating system settings
- Configuring a cleanup script
- Creating a first-run script
With these customizations in place, we will complete the chapter by building your final custom ECS Container Instance AMI and launching an instance to verify the various customizations.
Defining a custom storage configuration
The AWS ECS-Optimized AMI includes a default storage configuration that uses a 30 GB EBS volume, which is partitioned...