Allowed AMIs in Amazon EC2 (Part 1)

 





Control the Discovery and Use of AMIs in Amazon EC2 with Allowed AMIs

To manage the discovery and utilization of Amazon Machine Images (AMIs) by users in your AWS account, the Allowed AMIs feature can be utilized. This feature enables you to define criteria that AMIs must fulfill to be visible and accessible within your account. Once these criteria are activated, users launching instances will only see and be able to use AMIs that meet the established standards. For instance, you could create a list of trusted AMI providers as part of the criteria, ensuring that only AMIs from these providers are visible and available for use.

Prior to activating the Allowed AMIs settings, you can turn on audit mode to see which AMIs will be visible and available for use. This allows you to adjust the criteria as necessary to make sure that only the intended AMIs are accessible to users within your account. Furthermore, you can execute the describe-instance-image-metadata command and apply filters to the response to find any instances that were initiated with AMIs that do not satisfy the defined criteria.

You set the Allowed AMIs configurations at the account level, either explicitly in the account or via a declarative policy. These configurations need to be established in every AWS Region where you want to manage the discovery and utilization of AMIs. By using a declarative policy, you can implement the configurations across several Regions at once, as well as across multiple accounts simultaneously. If a declarative policy is being utilized, you are unable to change the settings directly within an account.

Key benefits of Allowed AMIs

  • Compliance and security: Users can only discover and use AMIs that meet the specified criteria, reducing the risk of non-compliant AMI usage.

  • Efficient management: By reducing the number of allowed AMIs, managing the remaining ones becomes easier and more efficient.

  • Centralized account-level implementation: Configure the Allowed AMIs settings at the account level, either directly within the account or through a declarative policy. This provides a centralized and efficient way to control AMI usage across the entire account.

How Allowed AMIs works

You define parameters that automatically filter and identify which AMIs are available and can be utilized within your account. You outline the parameters in a JSON configuration, and then activate them by executing the enable API operation.

JSON Configuration for the Allowed AMIs Criteria

The core configuration for Allowed AMIs is the JSON configuration that defines the criteria for allowed AMIs.

Supported Criteria

At present, the criteria that are supported consist solely of AMI providers. Acceptable values include aliases specified by AWS and AWS account IDs, as detailed below:

  • amazon - An alias that identifies AMIs created by AWS Allowed AMIs 201 Amazon Elastic Compute Cloud User Guide

  • aws-marketplace - An alias that identifies AMIs created by verified providers in the AWS Marketplace

  • aws-backup-vault - An alias that identifies backup AMIs that reside in logically air-gapped AWS Backup vault accounts. If you use the AWS Backup logically air-gapped vault feature, ensure this alias is included as an AMI provider.

  • AWS account IDs - One or more 12-digit AWS account IDs

  • none - Indicates that only AMIs created by your account can be discovered and used. Public or shared AMIs can't be discovered and used. If you specify none, you can't specify an alias or account ID.

How criteria are evaluated

The criteria in the JSON configuration are assessed with an "or" condition. This indicates that an AMI only needs to correspond with one of the designated providers in any ImageCriteria object to be deemed permissible. For instance, if you define both Amazon and an AWS account ID as providers, AMIs from either of these sources will be permitted.

Limits for the JSON Configuration

  • ImageCriteria objects: Maximum of 10 ImageCriteria objects can be specified in a single configuration.

  • ImageProviders values: Maximum of 200 values across all ImageCriteria objects.

Conclusion

Allowed AMIs and their various features are discussed in detail. 














































Comments

Popular posts from this blog

Deployment (Part 3)

Deployment (Part 1)

Deployment (Part 2)