Skip to content

Tracking running usage instances and launch templates launched from shared AMIs in external accounts - is possible from the owner side?

0

Following up on this thread: https://repost.aws/questions/QUOg3tuRi4TdKVcn4my23S6A/ami-usage-report-count-doesn-t-match-actual-instances-count-how-is-the-count-calculated-internally

In the previous thread it was confirmed that the AMI Usage report is a point-in-time snapshot and the AMI reference check endpoint can be used for accurate instance counts. However both of these only work within the same account.

Our use case is different - our AMIs are shared with external customer accounts that we have no access to. We are trying to track how many resources ( instances, launch templates, or any other resources types) are actively running from our shared AMIs in those external accounts, from our side only, without requiring any access or cooperation from the consumer accounts.

Is there any AWS native way to achieve this?

asked 3 days ago25 views
1 Answer
0

Unfortunately, there is no AWS native way to track running instances and launch templates launched from your shared AMIs in external customer accounts without their cooperation or access to those accounts.

The AMI Usage feature does provide the ability to generate reports showing which AWS accounts are using your shared AMIs and how many resources (EC2 instances and launch templates) are referencing them. You can specify the AMI ID and the account IDs you want to report on, and the report will show the number of resources by resource type per account.

However, there are important limitations to be aware of:

  1. The AMI usage reports are point-in-time snapshots and may not contain the most recent activity
  2. The reports show resources that reference the AMI, but this doesn't necessarily mean those resources are currently running
  3. You cannot get real-time or accurate counts of actively running instances in external accounts from the owner side alone

To get accurate, real-time information about running instances and active resources using your AMIs in external customer accounts, you would need cooperation from those accounts. They would need to either provide you with access or share that information with you through some other mechanism.

The AMI usage reports can give you visibility into which accounts are using your AMIs and approximate usage patterns, but they cannot provide the level of detail you're looking for regarding actively running resources in accounts you don't have access to.
Sources
View your AMI usage - Amazon Elastic Compute Cloud
Manage and monitor AMI usage - Amazon Elastic Compute Cloud
What's New at AWS - Cloud Innovation & News
create_image_usage_report - Boto3 1.42.50 documentation

answered 3 days ago
EXPERT
reviewed 3 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.