- Newest
- Most votes
- Most comments
Capturing changes made to a live instance and encapsulating them automatically into an AMI is not easy. The OS and applications are constantly making changes to the filesystem (storage) and it would be difficult to determine which changes are the result of intentional configuration/application modifications, and which are the result of normal housekeeping, application operations, etc.
So your choices are:
-
Manually create a snapshot of the instance's EBS volumes after you make your intended changes, and register an AMI from those snapshots
-
Best practice: Build your AMI using a reproducible, automated process that starts from scratch (a "base AMI"), installs all the necessary patches and applications, writes all the necessary configuration, then builds your custom AMI at the end. EC2 Image Builder and third-party applications like Hashicorp Packer can do this for you. Both can be integrated into GitHub Actions by running the appropriate commands in a Runner context.
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago