How do I find out what AWS account a CloudFront distribution belongs to?
3 minute read
I want to locate the AWS account that an Amazon CloudFront distribution belongs to. How can I do this?
To find information about an AWS account that a distribution belongs to, use the ListConflictingAliases command to get information about the AWS account.
First, create a new CloudFront distribution and associate with an SSL certificate. This SSL certificate must cover the domain associated with the CloudFront distribution whose AWS account you're trying to locate.
Then, run the ListConflictingAliases command, using the ID of the new distribution and the alternate domain name associated with the distribution you want to find.
Note: To use this method, the distribution must have alternate domain name associated to it. If the CloudFront distribution you are trying to locate does not have an alternate domain name associated, then contact AWS Support.
Note: The ListConflictingAliases command requires GetDistribution and ListConflictingAliases permissions. To verify ownership, you must have read access to YourDistributionID. You must also have a certificate associated that secures the conflicting CNAME.
1. In the AWS Identity and Access Management (IAM) policy for the distribution that you created, add the following resource-level permissions to the IAM user or role that's making the API request.
For DISTRIBUTION-ID, enter the ID of the new distribution you created.
YourDistributionId, enter the ID of the new distribution created in your AWS account. For
YourCNAME, enter the alias (alternate domain name) associated with the CloudFront Distribution that you are trying to locate.
4. The output provides a list of CloudFront distributions and the associated account ID that conflicts with the alias that you entered in the ListConflictingAliases command.
The domain name in the --alias parameter is associated with the CloudFront distribution that you are trying to find. The AWS account ID associated with the distribution ID is also listed in the output.