How to share AMI with other AWS accounts? cloud 709107 640

How to share AMI with other AWS accounts?

Overview

Using Organization service in AWS is quite common if you have multi-team/environment architecture. Most of the time we make our deployment environments like staging and production identical so that we can use the exact same sort of configurations for all and it makes DevOps’s life easier. Hence, in this post, we will learn to share the AMI with another account so that we can use the same AMI for our other Organization account as well.

Let’s say you have an AWS account for staging and another for production. You’ve created an AMI for microservice for your staging environment and you want to use the same AMI for your production microservices.

In this case, if you are smart 🙂 Developer or DevOps Engineer you don’t want to create an AMI for production microservices again. Instead, you will try to find a solution to use an existing AMI that you have used for your staging account and will use that AMI for the production account.

Prerequisite

  • You must have an account number with whom you want to share your AMI.

Steps to share

  1. Login to your AWS console
  2. Make sure you are in the correct Region.
  3. Search EC2 service and Click on AMI (You can find it on the left side under Images section)
  4. Select the correct AMI that you want to share with another account.
  5. On the bottom side click on the Permissions tab.
  6. Click on the Edit button. A Modify Image Permission popup will be displayed.
    • In this popup, the ima
  7. Add the account number to whom you want to share and click on the Add Permission button.
  8. To allow create volume permissions for snapshots, select Add “create volume” permissions to the following associated snapshots when creating permissions.
  9. Click the Save button.

Now, you have successfully shared the AMI to the given account.

Let’s verify whether the AMI is shared with the new account or not.

Steps to verify

  1. Login to your new account using the AWS console.
  2. Select EC2 service.
  3. Go AMI that can be found under Images section.
  4. The default filter would be Owned by me. Hence, you can’t see the AMI you shared here.
  5. You need to change it to Private images. The AMI you just shared will be listed here.

Congrats. You are now able to share your AMI with another AWS account.


Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments