Share an AMI With Organizations and Organizational Units
About
AWS Organizations is a
service for managing accounts that allows you to group various AWS accounts
into an organization that you establish and oversee from one central location.
You have the ability to share an AMI with an organization or a specific Organizational
Unit (OU) you've created, in addition to sharing it with particular accounts.
A organization is a
structure you establish to unify and manage your AWS accounts from a central
location. You can arrange the accounts in a hierarchical, tree-like format,
with a root node at the top and organizational units positioned beneath the
organization root. Each account can either be added directly to the root or
organized into one of the organizational units within the hierarchy.
When you share an AMI
with an organization or an OU, all of the children accounts gain access to the
AMI.
Considerations
Consider the following when sharing AMIs with specific organizations or organizational units:
- Ownership- To share an AMI, your AWS account must own the AMI.
- Sharing limits-
The AMI owner can share an AMI with any organization or OU, including
organizations and OUs that they’re not a member of.
- Tags-
You can't share user-defined tags (tags that you attach to an AMI). When you
share an AMI, your user-defined tags are not available to any AWS account in an
organization or OU with which the AMI is shared.
- ARN format-
When you specify an organization or OU in a command, make sure to use the
correct ARN format. You'll get an error if you specify only the ID.
- Encryption and keys-
You can share AMIs that are backed by unencrypted and encrypted snapshots.
- The encrypted snapshots must be encrypted with a customer managed key. You can’t share AMIs that are backed by snapshots that are encrypted with the default AWS managed key.
- If you share an AMI that is backed by encrypted snapshots, you must allow the organizations or OUs to use the customer managed keys that were used to encrypt the snapshots.
- Region- AMIs are a resource specific to a Region. When you distribute an AMI, it is
accessible only within the Region where it was shared. To make an AMI
accessible in another Region, you need to copy it to that Region and then share
it.
- Usage- When
you share an AMI, users are permitted to launch instances based on it, but they
do not have the ability to delete, share, or alter the original AMI.
Nevertheless, once they have initiated an instance from your AMI, they are able
to create a new AMI from that launched instance.
- Billing- You
won't incur charges when other AWS accounts utilize your AMI to start
instances. Instead, the accounts that initiate instances with the AMI will be
responsible for any associated costs.
Get the ARN of an Organization
or Organizational Unit
The ARNs for the
organization and its organizational unit include the 12-digit number associated
with the management account. If you're unsure of the management account number,
you can provide details about the organization and the organizational unit to
obtain the ARN for each.
Allow Organizations and
OUs to Use a KMS Key
To share an AMI backed by
encrypted snapshots, you must grant permissions to the organizations or Organizational
Units (OUs) to utilize the KMS keys that were employed to encrypt those
snapshots. To manage access to the KMS key, you can implement the aws:PrincipalOrgID
and aws:PrincipalOrgPaths condition keys in the key policy, allowing
only specific principals to have permission for the designated actions. A
principal may be a user, IAM role, federated user, or the root user of an AWS
account.
The condition keys are
used as follows:
- aws:PrincipalOrgID-
Allows any principal belonging to the organization represented by the specified
ID.
- aws:PrincipalOrgPaths-
Allows any principal belonging to the OUs represented by the specified paths.
Conclusion
Many aspects about how to share an AMI with organizations and organizational units safely are discussed.
Comments
Post a Comment