DEV Community

loading...
AWS Community Builders

How to Speed-Up the AMI Creation of your EC2 instances

Jon Bonso
Co-Founder at Tutorials Dojo | AWS Community Builder | 9x AWS Certified
・1 min read

SCENARIO:

You have a legacy application hosted in a single Amazon EC2 instance running in the Production environment. You need to upgrade your systems and the existing instance must be vertically scaled (use a larger instance type). Before proceeding, you must create an AMI of the EC2 instance first before implementing the change.

ISSUE:

Upon testing, you found out that it takes hours for the AMI creation process to complete. This delay will increase the possible downtime of your application and might cause the migration activity to exceed the scheduled change window, affecting the end-users.

POSSIBLE SOLUTIONS:

Solution #1. Take an EBS snapshot of your EC2 instance before doing the actual migration. Create another snapshot or AMI again right after the first snapshot/AMI has been created.

Solutions #2. Increase the snapshot frequency of your EC2 instance in your Amazon Data Lifecycle Manager

KEY POINT:

  • The snapshot process is incremental. This means that only the blocks on the EBS device that have changed after your most recent snapshot are saved. Thus, future snapshots will take less time

References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html
https://forums.aws.amazon.com/thread.jspa?threadID=91650

Discussion (0)