We have lot of accounts for each application in AWS and few we will have rights and others restricted . Few cases like we have access to the SSH of the EC2 instance but not aware of which AWS account the instance belongs.
Easy way to identify the account details , follow the below steps.
We will get the MAC output( example ) 1a:2b:3c:4d:5:6f
2. http://169.254.169.254/latest/meta-data/network/interfaces/macs/‘mac’/owner-id
http://169.254.169.254/latest/metadata/network/interfaces/macs/1a:2b:3c:4d:5:6f /owner-id
We will get the corresponding AWS account number as the output.