Search code examples
powershellamazon-web-servicesamazon-iamaws-powershell

How to retrieve IAM Entities limits and current usage via Powershell


I need to retrieve the following current count and capacity(limit) for AWS account:

  • users
  • groups
  • roles
  • instance profiles
  • server certificates per AWS account.

I have tried next commands:

  • Get-EC2AccountAttributes,

  • Describe methods of Ec2Client class

Thank you in advance


Solution

  • As outlined in Limitations on IAM Entities, the AWS Identity and Access Management (IAM) service limits can be retrieved by means of the GetAccountSummary API.

    The respective AWS Tools for Windows PowerShell cmdlet is Get-IAMAccountSummary:

    Retrieves account level information about account entity usage and IAM quotas. [...]