Testing your custom ECS container instance image
You have now completed all customizations and it is time to rebuild your image using the packer build
command. Before you do this, now is a good time to verify you have the correct Packer template in place, and also have created the associated supporting files. The following example shows the folder and file structure you should now have in your packer-ecs repository:
> tree . ├── Makefile ├── files │ └── firstrun.sh ├── manifest.json ├── packer.json └── scripts ├── cleanup.sh ├── cloudinit.sh ├── storage.sh └── time.sh 2 directories, 8 files
Verifying the Packer repository
Assuming everything is in place, you can now run your Packer build once again by running the make build
command.
Once everything is complete and your AMI has been successfully created, you can now view your AMI in the AWS console by navigating to Services | EC2 and selecting AMIs from the menu on the left:
EC2 dashboard AMIs
In the preceding screenshot...