Logo

dev-resources.site

for different kinds of informations.

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

Published at
1/23/2021
Categories
ami
ec2
aws
snapshot
Author
jonbonso
Categories
4 categories in total
ami
open
ec2
open
aws
open
snapshot
open
Author
8 person written this
jonbonso
open
How to Speed-Up the AMI Creation of your EC2 instances

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

Featured ones: