The essential AWS IAM best practices are: require temporary credentials instead of long-term keys, enforce phishing-resistant MFA, apply least privilege using Access Analyzer and ongoing reviews, and lock down accounts with organization-level guardrails. Together these controls cut the biggest sources of cloud credential risk, and each one has a concrete, testable configuration step you can start this week.
TL;DR:
- Rely on temporary credentials and federated identity management for both human users and workloads to reduce the risks associated with long-term keys and static passwords.
- Enforce MFA using hardware keys, passkeys, or other phishing-resistant methods on all accounts, especially for console access and privileged accounts, and regularly review MFA device types.
- Protect the root account with MFA, store credentials offline, delete unused long-term access keys, and rotate necessary keys with scopes limited to their exact needs.
- Start with broad managed policies, then gradually refine to customer-managed ones using Access Analyzer, testing policies in staging before production.
- Implement organization-wide guardrails with service control policies, resource control policies, and permissions boundaries to prevent privilege escalation across accounts.
Table of Contents
- Use temporary credentials: federation for human users and roles for workloads
- Require multi-factor authentication and prefer phishing-resistant methods
- Protect root credentials and rotate long-term access keys safely
- Apply least-privilege permissions: start with managed policies then refine to customer-managed
- Use IAM Access Analyzer, last-accessed data and automated policy generation
- Establish permissions guardrails across accounts: Organizations, SCPs, RCPs and permissions boundaries
- Use conditions, ExternalId and confused-deputy protections for cross-account access
- Regular review, audit and remove unused identities, policies and credentials
- Implementation checklist: concrete controls and quick configuration steps
- How Nexus operationalizes AWS IAM best practices
- Perspective: why automation plus governance is the sustainable model for IAM
- How Nexus can help implement and maintain IAM best practices
- FAQ
- Sources
Use temporary credentials: federation for human users and roles for workloads
Long-term IAM users with static credentials are the single easiest thing to remove from an AWS environment. A leaked access key has no expiry, no built-in rotation and often no owner once the original employee moves teams. Temporary credentials, issued through federation or assumed roles, expire automatically and limit how long a compromised credential stays useful.
AWS's own security best practices for IAM recommend temporary credentials for both human users and workloads as a foundational control, alongside MFA, least privilege and ongoing review.
For people, that means routing sign-in through IAM Identity Center rather than creating individual IAM users. For workloads, it means roles instead of keys.
- Enable IAM Identity Center and federate through SAML 2.0 with your existing identity provider.
- Use SCIM provisioning where your IdP supports it, so user and group changes sync automatically.
- Assign EC2, ECS and Lambda workloads IAM roles instead of embedded credentials.
- Use IAM Roles Anywhere for workloads running outside AWS that still need to assume roles.
Two caveats worth planning around: IAM Identity Center is region-scoped, so multi-region organizations need to pick a home region deliberately, and every environment still needs a documented break-glass procedure for the rare case where federation itself is unavailable.
Require multi-factor authentication and prefer phishing-resistant methods
Not all MFA is equal. SMS codes can be intercepted through SIM-swapping, TOTP apps are stronger but still phishable through fake login pages, and hardware security keys or passkeys using FIDO2 are considered phishing-resistant because they verify the website's identity cryptographically before releasing a credential.
AWS IAM best practices call for MFA on every account, with particular emphasis on protecting console access and any account with elevated privileges.
- Require MFA for all human console sign-ins, with no exceptions for "low-risk" accounts.
- Treat emergency or break-glass accounts as higher risk, not lower, and require hardware-backed MFA on them.
- Configure IAM Identity Center to apply MFA by default across connected applications.
- Audit existing MFA registrations and flag any account still using SMS as the only factor.
Pro Tip: Run a quarterly export of MFA device types registered across your identities, then set a deadline to migrate any SMS-only accounts to a security key or passkey.
Phasing out SMS doesn't require ripping out your identity provider. Most IdPs let you set a minimum assurance level that simply rejects SMS as a standalone factor going forward, so new enrollments default to something stronger while you work through the existing list.
Protect root credentials and rotate long-term access keys safely
The root user in every AWS account has unrestricted access and cannot be limited by any policy, which is exactly why it should almost never be used day to day.
- Enable MFA on the root account immediately, using a hardware key if possible, and store the device somewhere access-controlled rather than at a single person's desk.
- Store root sign-in credentials offline, define who is authorized to invoke emergency access, and document the exact steps so the process doesn't rely on institutional memory.
- For any IAM user that still has a long-term access key, pull last-used data and delete keys that haven't been used in the past 90 days; rotate the rest on a fixed schedule rather than waiting for an incident to force the issue.
- Where a long-term credential genuinely can't be avoided, such as a legacy application that can't assume a role, store it in a secrets manager rather than in configuration files, and scope the attached policy to only what that one integration needs.
Our overview of privileged access management covers tiered secrets handling in more depth if root and administrative access spans multiple teams, and our primer on cloud secrets management walks through rotation patterns for the keys you can't eliminate outright.
Apply least-privilege permissions: start with managed policies then refine to customer-managed
Least privilege is a destination, not a starting configuration. Most teams onboard new roles with AWS managed policies because they're fast to apply and broad enough that nothing breaks, then instrument actual usage before tightening down to customer-managed policies scoped to what's really being called.
That staged approach avoids the two failure modes of jumping straight to a hand-written policy: either it's too narrow and breaks production on day one, or it's written defensively broad and never gets revisited.
- Attach policies to roles or groups rather than individual users, so permission changes apply consistently and audits stay manageable.
- Let new workloads run against a managed policy for a defined observation window, typically two to four weeks, before refining.
- Use policy validation checks during authoring to catch overly permissive statements before they reach production.
- Test refined policies in a non-production account first, with the same workload patterns the production role will see.
This is also where IAM Access Analyzer earns its place in the workflow, since it can generate a draft customer-managed policy directly from the activity your role has actually used, which turns the refinement step from guesswork into a review task using practical least-privilege access patterns.
Use IAM Access Analyzer, last-accessed data and automated policy generation
IAM Access Analyzer can generate fine-grained least-privilege policies by analyzing CloudTrail logs for the actions a role actually used, rather than the actions its current policy merely allows. It also runs policy validation checks during authoring, catching structural problems before a policy is ever attached.
Access Analyzer runs three distinct types of analysis worth knowing apart:
- External access analyzers flag resources shared with entities outside your account or organization.
- Unused-access analyzers surface roles, permissions and access keys that haven't been used within a defined tracking period.
- Policy generation builds a draft policy from observed CloudTrail activity, which you then review and refine rather than deploy as-is.
Over 100 policy checks run during validation to catch issues like overly permissive wildcards or unused permissions, according to AWS's own description of Access Analyzer's policy generation. That volume of automated checking is exactly why generated policies still need a human review pass: a check catches structural risk, not business context.
Feeding Access Analyzer findings into AWS Security Hub gives you a prioritized queue instead of a raw list, and Security Hub's unused-access findings use a lookback window commonly used to review dormant permissions, generally considered as a few months. Always test a generated policy in staging before production: generated policies reflect what was observed, not necessarily every legitimate action a role might occasionally need.
Establish permissions guardrails across accounts: Organizations, SCPs, RCPs and permissions boundaries
A single over-permissioned role in one account can become an organization-wide problem if nothing constrains what that role could escalate to. AWS Organizations, combined with service control policies, resource control policies and permissions boundaries, gives you layered limits that work even when an individual policy gets it wrong.

Service control policies (SCPs) apply at the organization or organizational-unit level and set a hard ceiling on what any identity in that account can do, regardless of what its own IAM policy grants. Resource control policies (RCPs) apply similar logic but at the resource level, useful when you need to restrict access to specific data stores across accounts. Permissions boundaries work differently: they're attached to a specific IAM user or role and cap what that one identity can be granted, which makes them the right tool for constraining roles that developers create themselves.
AWS's guidance on permissions boundaries is explicit that boundaries don't grant permissions on their own, they only limit the maximum. A permissions boundary policy has a character limit, and a role can have multiple managed policies plus one boundary, so boundaries work best as a narrow safety net rather than a full policy replacement.
- Prefer SCPs for organization-wide rules that should never be overridden, like blocking root user activity in member accounts.
- Use permissions boundaries when delegating role creation to developers, so self-service doesn't become privilege escalation.
- Reserve RCPs for resource-level restrictions that need to hold regardless of which account's identity is making the call.
- Pair central guardrails with delegated role creation: let teams create their own roles, but require a boundary on every self-service template.
Use conditions, ExternalId and confused-deputy protections for cross-account access
Cross-account roles and service integrations create a specific risk called the confused deputy problem, where a service is tricked into acting on a resource it shouldn't have access to because it trusted a role without checking who actually asked for the action.
- Add condition keys like
aws:SourceArnandaws:SourceAccountto any resource policy that grants access to a service principal, so the policy only honours requests tied to a specific resource or account. AWS's documentation on confused-deputy protections covers the full set of condition keys, includingaws:SourceOrgIDandaws:SourceOrgPathsfor organization-wide scoping. - For any third-party vendor that assumes a role into your account, require an
ExternalIdin the trust policy. Critically, the ExternalId must come from the third party itself, never generated by your own team, since AWS's guidance on policy evaluation notes this is what actually prevents another customer of that vendor from assuming your role by accident. - Avoid combining
NotPrincipalwith aDenystatement in permissions boundaries, since the logic is easy to get backwards. Prefer explicit conditions likeArnNotEqualsinstead, which are clearer to audit and less prone to accidentally denying the access you meant to allow.
Regular review, audit and remove unused identities, policies and credentials
IAM hygiene degrades quietly. Roles outlive the project they were created for, policies accumulate permissions nobody removes, and access keys sit unused for months before anyone notices. The fix is a scheduled cadence, not a one-time cleanup.
- Pull a credential report monthly to catch password and access key ages across every IAM user.
- Run unused-access analyzers on a fixed tracking period (AWS supports 1 to 365 days) and review findings on the same schedule every time.
- Treat role creation, employee offboarding and quarterly access reviews as fixed audit triggers, not optional checkpoints.
- Before deleting anything, test the removal in a lower environment, stage the change, observe for a short window, then delete.
This cadence pairs naturally with CloudTrail logging, since last-accessed data and unused-access findings both depend on CloudTrail having captured the activity in the first place.
Implementation checklist: concrete controls and quick configuration steps
A rough sequence, ordered by effort versus impact:
- Enable IAM Identity Center and federate your identity provider, replacing individual IAM users for human access.
- Enforce MFA across all console sign-ins, prioritizing hardware keys or passkeys over SMS.
- Pull last-used data on every existing access key and delete anything unused in the past 90 days.
- Create Access Analyzer analyzers for external access and unused access, and generate a first round of least-privilege policy drafts.
- Test generated policies in staging, then roll them out to replace broad managed policies.
- Apply SCPs for organization-wide restrictions, starting with blocking root activity in member accounts.
- Add permissions boundaries to any self-service role creation template developers use.
- Automate policy validation checks as part of your deployment pipeline so new policies get reviewed before merge, not after an incident.
Pro Tip: Tackle access keys and MFA first. They're the fastest wins and the most common root cause in credential-based incidents, so fixing them buys you time to do the policy work properly.
How Nexus operationalizes AWS IAM best practices
In practice, sustaining these controls is an ongoing operational job, not a one-time project. Runbooks can be built around Access Analyzer findings so unused-access alerts turn into tracked remediation work rather than a report nobody opens, and tested break-glass procedures are maintained alongside policy staging steps so changes to production IAM never skip a review pass.
Perspective: why automation plus governance is the sustainable model for IAM
Automated policy generation and unused-access detection remove a lot of manual guesswork from least privilege, but automation without guardrails just moves the risk around. A generated policy that nobody reviews is still a policy that can grant too much, and a self-service role creation process without a permissions boundary is an open door with a nicer coat of paint.
The sustainable version pairs generated least-privilege policies with SCPs, permissions boundaries and continuous monitoring, so the automation handles scale while the guardrails handle the failure cases automation can't anticipate. Treat generated policies as a draft, never a deployment.
— Nick - Sr. Executive
How Nexus can help implement and maintain IAM best practices
Getting IAM controls configured correctly is one project. Keeping them correct as teams grow, roles change and new services get added is a different, ongoing job, and it's where most environments quietly drift back toward excess permissions. We handle that ongoing work as part of our managed cybersecurity and cloud solutions, so the review cadence, policy testing and guardrail maintenance described above happen on a schedule instead of during an incident.

- IAM Identity Center federation, Access Analyzer analyzers and SCP guardrails can be configured as part of onboarding.
- 24/7 monitoring can map directly to the review cadence unused-access findings require.
- Compliance and risk services can tie IAM evidence to frameworks like SOC 2 and HIPAA when audits come around.
If your team has the bandwidth to own this work in-house, the checklist above is a solid foundation. If IAM review keeps sliding because it competes with other priorities, our services page outlines how we take that ongoing maintenance off your plate, and our buy versus build comparison is worth reading before you decide which path fits your team.
FAQ
What are the four pillars of IAM?
IAM programs are typically organized around identity governance, authentication, authorization and auditing: who an identity is, how it proves that, what it's allowed to do and how that activity gets tracked. In AWS specifically, these map to IAM Identity Center or IAM users for identity, MFA for authentication, policies for authorization, and CloudTrail for auditing.
What is the best practice for managing AWS IAM access keys?
The best practice is to avoid long-term access keys entirely where possible, using IAM roles and temporary credentials instead, as recommended in AWS's own IAM best practices. Where a long-term key is unavoidable, rotate it on a fixed schedule, delete it immediately once last-used data shows it's dormant, and store it in a secrets manager rather than in code or configuration files.
What are the 5 pillars of AWS?
The AWS Well-Architected Framework is built on five pillars: operational excellence, security, reliability, performance efficiency and cost optimization. IAM best practices, including temporary credentials, least privilege and guardrails, sit within the security pillar.
What is IAM in AWS?
IAM, or Identity and Access Management, is the AWS service that controls who can authenticate into an account and what actions they're authorized to take once they're in. It covers users, roles, groups and policies, and underpins nearly every other security control in an AWS environment.
How does IAM Access Analyzer help with least privilege?
IAM Access Analyzer reviews CloudTrail activity to generate a draft least-privilege policy based on what a role actually used, rather than what its current policy merely permits, as described in AWS's policy generation guidance. It also runs validation checks during authoring and can flag unused permissions and external access, though generated policies should always be tested in staging before production use.
Sources
- Security best practices in IAM - AWS Identity and Access Management
- IAM Access Analyzer makes it easier to implement least-privilege permissions by generating IAM policies based on access activity
