AWS IAM best practices: AWS lists 14, and each one can be checked
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
AWS publishes 14 security best practices for IAM, from temporary credentials and multi-factor authentication to Access Analyzer validation and permissions boundaries. This page lists each practice as AWS words it on 16 Nov 2026 and gives one way to check it: a CLI command, a console path or an Access Analyzer check.
Open the workbench ยท All guides
The first five practices are about credentials
AWS orders its list with credentials first. It asks for federation with an identity provider for human users, temporary credentials from IAM roles for workloads, multi-factor authentication where an IAM user or the root user is needed, updating access keys when long-term credentials are required, and protecting the root user.
Each can be checked from the account. The checks below use commands AWS documents in its CLI reference, which this site read on 16 Nov 2026.
| AWS practice | How to check it |
|---|---|
| Federate human users; use temporary credentials | Run aws iam get-account-summary and read Users: a count above zero means IAM users exist whose use you can review. Run aws iam generate-credential-report, then aws iam get-credential-report, to list each user and its credentials. |
| Workloads use roles, not keys | Run aws iam get-access-key-last-used with a key ID to see when, and for which service and Region, a key was last used. An unused analyzer finding names unused keys. |
| Require MFA | In aws iam get-account-summary, AccountMFAEnabled shows 1 when the root user has MFA; MFADevicesInUse counts devices. |
| Update access keys when needed | Use aws iam get-access-key-last-used before deleting a key; Access Analyzer reports unused access keys. |
| Protect root user credentials | AccountAccessKeysPresent in the get-account-summary output shows whether root access keys exist; AWS asks you to read its root user best practices page. |
The middle practices concern the size of permissions
Four practices concern permissions: apply least-privilege permissions, start from AWS managed policies and move toward least privilege, use Access Analyzer to generate least-privilege policies from access activity, and regularly remove unused users, roles, permissions, policies and credentials. AWS says you may start with broad permissions while you learn what a workload needs and reduce them as the use case matures.
AWS also says AWS managed policies might not grant least privilege for your cases because they serve all customers. The managed policies page shows how large a few of them are.
| AWS practice | How to check it |
|---|---|
| Apply least-privilege permissions | Paste the policy into the workbench to count the actions each wildcard covers and see their access levels; then confirm in Access Analyzer. |
| Start with AWS managed policies, then narrow | Run aws iam list-entities-for-policy for a managed policy ARN to list the users, groups and roles it is attached to. |
| Generate policies from access activity | Run aws accessanalyzer start-policy-generation, or use the Generate policy page in the IAM console. A CloudTrail trail must be enabled. |
| Remove unused access | Create an unused access analyzer with aws accessanalyzer create-analyzer and type ACCOUNT_UNUSED_ACCESS (or the organization type); run aws iam generate-service-last-accessed-details for service last accessed data. |
The last five practices add conditions, analysis and guardrails
AWS asks for conditions in policies, for example requiring requests to use TLS. It asks you to verify public and cross-account access with Access Analyzer before granting it. It asks you to validate policies with Access Analyzer policy validation, which AWS says provides more than 100 checks. It asks for SCP and RCP guardrails across multiple accounts, and for permissions boundaries when you delegate permission management within an account.
| AWS practice | How to check it |
|---|---|
| Use conditions | Read the Condition element of each statement; see the condition keys page. Custom policy check: aws accessanalyzer check-no-new-access. |
| Verify public and cross-account access | Create an external access analyzer and run aws accessanalyzer list-findings-v2. |
| Validate policies | Run aws accessanalyzer validate-policy with a policy document and a policy type, or open the policy validation pane in the IAM JSON editor. |
| Guardrails across accounts | The Policies section of the AWS Organizations console lists service control policies and resource control policies. The workbench checks SCP and RCP text and size. |
| Permissions boundaries | Console: open a role, then its permissions boundary setting. The workbench builds a boundary policy. |
The workbench covers the practices that can be read from policy text
The workbench on this site reads policy text. It can show that a policy allows write actions on every resource, that iam:PassRole is open, that an Allow statement uses NotAction, that an action name matches nothing in AWS's reference, or that a trust policy has no condition. Practices about credentials, root users and MFA live in an account and need the commands above. The pages on PassRole and wildcards cover the text checks.
Related pages
Sources
- Security best practices in IAM, read 16 Nov 2026
- get-account-summary, AWS CLI, read 16 Nov 2026
- generate-credential-report, AWS CLI, read 16 Nov 2026
- get-access-key-last-used, AWS CLI, read 16 Nov 2026
- list-entities-for-policy, AWS CLI, read 16 Nov 2026
- generate-service-last-accessed-details, AWS CLI, read 16 Nov 2026
- create-analyzer, AWS CLI, read 16 Nov 2026
- validate-policy, AWS CLI, read 16 Nov 2026
- start-policy-generation, AWS CLI, read 16 Nov 2026
- check-no-new-access, AWS CLI, read 16 Nov 2026
- list-findings-v2, AWS CLI, read 16 Nov 2026
Last reviewed 16 Nov 2026.