0% found this document useful (0 votes)
21 views6 pages

Creating AMI, Mount EBS, Migrate AMI

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views6 pages

Creating AMI, Mount EBS, Migrate AMI

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

Creating AMI and EBS


 A instance named (linux) is launched using (Amazon Linux 2 AMI).

 When the instance is launched, then to create AMI for linux,


 Click Actions
 Click Images and templates
 Choose Create Image
 A template of image information is opened when you click create image option. Then,
respective required field must be filled.
 Give image name and image description respectively
 Enable No-reboot option
 Allocate the size of EBs and add tags if necessary
 Click Create Image

Then, image is created by putting image name, image description and enable no reboot
respectively.

 Go to Images:
 In AMIs, the AMI we created will be shown with name, id status, etc.
2. A. EBS volume increase and mount on Amazon Linux2 AMI
 Amazon Linux2 AMI instance is launched and AMI is created as earlier respectively.
 Then, to modify the volume, go to EBS and choose the volume amount as per your wish
to increase the volume.
 It will take some time to modify volume as volume is increased.
 Then after some time, the volume state will be in use (optimizing) and the green light
status will be seen.
 To verify the file system for each volume, the instance is connected using the command

(df –h)

This is before extending the file system

 To check whether the volume has a partition that must be extended, use the command
(lsblk)

 The file can be extended using the following code.


(sudo growpart /dev/xvda 1)

We can see the changed: part about the information changed.


After that the size changed to 9.0G in /dev/xvda1 which was 8.0GB earlier.

B. EBS volume increase and mount on Ubuntu

 Ubuntu AMI instance is launched and AMI is created as earlier respectively.


 Then, to modify the volume, go to EBS and choose the volume amount as per your wish
to increase the volume.
 It will take some time to modify volume as volume is increased.
 Then after some time, the volume state will be in use (optimizing) and the green light
status will be seen.
 To verify the file system for each volume, the instance is connected using the command

(df –h)

This is before extending the file system

 To check whether the volume has a partition that must be extended, use the command
(lsblk)

 The file can be extended using the following code.


(sudo growpart /dev/xvda 1)
We can see the changed: part about the information changed.

After that the size changed to 9.0G in /dev/xvda1 which was 8.0GB earlier.

C. Migrate AMI from one region to another


 Launch instance as earlier and create AMI
 Go to AMIs section and click action dropdown
 Click copy AMI
 Choose Destination Region, name and description
 Choose encryption option if needed to encrypt EBS snapshots

D. Migrate AMI from one AWS account to another


 Launch instance as earlier and create AMI
 Go-to AMIs section and click action dropdown
 Modify Image Permission
 Give AWS account number of the person or other member and choose public or private
for now private is chosen and add permission and save
 Then go-to the other AWS account number and can view that AMI in the AMIs private
AMI section.

E. Migrate snapshot
 Launch instance as earlier and create AMI
 Go-to snapshot section and click action dropdown
 Click Modify Permission
 Give AWS account number of the person or other member and choose public or private
for now private is chosen and add permission and save
 Then go-to the other AWS account number and can view that snapshot in the private
snapshot section.

You might also like