Share AMI (Optional)

Share AMI

create vpc for linux instance

  • The share AMI function is used to share AMIs that developers have created and provided for others to use. Or you want to separate the workload across multiple EC2 - across environments located in different AWS accounts while still ensuring full data or config information is present in the instance, share AMI will help you do it quickly

  • Noted: you need at least 2 AWS accounts to perform this lab.

  1. Get the account ID value
  • Log in to the second account, in the EC2 console, on the right corner of the screen, select the triangle icon.

create vpc for linux instance

  • Select the square icon to copy the account ID value which is a 12-digit sequence.

create vpc for linux instance

  • Noted: you should copy account ID to Notedpad to prepare for step 3
  1. Select the AMI to share
  • Return to the 1st account

  • Reuse the AMI you created in lab 5.3 CREATE CUSTOM AMI

  • In the search box, enter ami, select AMIs

create vpc for linux instance

  • Select AMI name: Custom Windows AMI
  • Select Actions
  • Select Edit AMI permissions

create vpc for linux instance

  1. Share AMI
  • In the AMI availability section, select Private - (current setting) (meaning, you only share this AMI with specific AWS or accounts in the Organization unit).

  • In the Shared accounts section, select Add account ID

create vpc for linux instance

  • Enter the account ID value you took in step 1
  • Select Share AMI

create vpc for linux instance

  • Check the configured information and select Save changes

create vpc for linux instance

  1. Check the shared AMI
  • Log in to the second account, in the search box, enter ami, select AMIs

create vpc for linux instance

  • You will not see any AMI, because you are in Owned by me mode. Select the triangle character

create vpc for linux instance

  • Select Private images

create vpc for linux instance

  • Result

create vpc for linux instance

Congratulations, you have successfully shared the AMI via another AWS account. You can proceed to create an EC2 instance from this AMI.

  • Noted
    • At this lab level, the snapshot that comes with the AMI has not Encryption. In fact, EBS and snapshots will be encrypted by default by the KMS service, and you can only share the AMI after sharing Customer managed keys (CMK) - to know more about CMK, you can read more on lab: AWS KEY MANAGEMENT SERVICE
    • Each AMI has a sharing quota with 1000 entities including: organizations, organizational units, and accounts