
How to Manage 2FA for a Shared AWS Account
Nobody should share an AWS login, and the root user accepts several MFA devices instead of one copied secret. What that leaves, and how to run it.
Nobody should be signing in to AWS with a shared login. Day-to-day access belongs to per-person identities through IAM Identity Center, and automation belongs to roles rather than to anything a human types.
That leaves the root user, which is genuinely one credential per account. The useful thing to know is that you do not have to share its second factor either: AWS lets you register several MFA devices on the root user, so two or three administrators can each enrol their own. Copying a TOTP secret around is a fallback for the cases where that is not available, not the default.
Three different credentials
“Our AWS account” usually means one of three things, and they have different answers.
The root user. One per account, identified by an email address, able to do everything including closing the account and changing billing. Not for daily work.
Per-person identities. IAM Identity Center users, or IAM users on older setups. This is where the actual work happens, and where each person has their own second factor.
Access keys. Long-lived credentials for programmatic access. Not a login, not protected by MFA in the way people assume, and the thing most likely to be sitting in an old repository.
Most “shared AWS 2FA” questions are really about the first, asked because the second and third were never set up.
Daily work: per-person identities
IAM Identity Center gives each person their own sign-in, their own MFA, and short-lived credentials into the accounts and roles they are entitled to. Access is granted by assignment rather than by handing anything over, and removing someone is one action in one place regardless of how many AWS accounts you run.
If you are still on IAM users, the minimum is one user per person, each with their own MFA device, and no shared user for the team. A shared IAM user has all the problems of a shared root user with none of the reasons.
For an agency working in a client’s account, the equivalent of “please invite me” is a cross-account role: the client keeps ownership and can revoke it in one place, and nobody emails credentials.
Automation: roles, not logins
Anything running unattended should assume a role rather than sign in. On AWS itself that means instance profiles, task roles or OIDC federation from your CI provider. Those are short-lived credentials, with no secret to store and nothing for a human to type.
If a script is prompting someone for a six-digit code, it is using a human’s identity, and it will break the day that human leaves.
Long-lived access keys are the other half of this. They are revocable and rotatable individually, which is a genuine advantage over a TOTP secret, but they are also the credential that leaks in commits. Keep them scarce and rotate them on a schedule you actually follow.
The root user: the real shared account
Root exists, several people need to be able to reach it, and it must not be a single person’s phone. Four things settle it.
Register more than one MFA device
This is the AWS-specific answer and it removes the sharing question entirely. Enrol the authenticator or hardware key of each administrator who should be able to act as root. Each device holds its own secret, and no secret is ever copied. Offboarding is deregistering one device, not resetting the account’s 2FA and re-enrolling everyone.
Where a hardware key is an option, this is where it earns its price: the second factor cannot be screenshotted, forwarded or synced.
Point the root email at a mailbox two people can read
Root recovery goes through that address. A founder’s personal inbox makes the account unrecoverable the day they are gone, so use a distribution list or a shared mailbox, and make sure whoever can read it is someone you would trust to recover the account, because functionally that is what the address grants.
Delete root access keys
There should be none. If any exist, they are a shared credential with no MFA in front of them, which is worse than anything else in this article.
Watch for root sign-ins
CloudTrail records them, and an alarm on root usage is standard practice. On a healthy account root sign-ins are rare and explainable, which makes them cheap to alert on and valuable to see.
When a shared TOTP secret is still the answer
Multiple MFA devices cover most cases. A few resist:
- A client’s account you do not administer, where you are handed credentials and cannot restructure anything.
- Older or third-party consoles around AWS (a billing portal, a reseller panel, a monitoring vendor) that allow exactly one TOTP enrolment.
- A break-glass credential your process requires several people to be able to use at short notice, where per-person devices are not practical.
For those, the requirements are the same as any shared account: one custody of the secret, code access granted per person, a log of who read a code, and recovery codes stored outside the account they recover. The reasoning is in how to share 2FA codes with your team securely, and the comparison of mechanisms in best ways to manage 2FA for shared accounts. The same reasoning applied to a payment provider is in how to manage 2FA for a shared Stripe account.
A break-glass procedure worth writing down
For root, and for anything else that only gets used in an emergency:
- Who may use it, by name, and what triggers that.
- Where the credential and its second factor live, and how many people can reach each.
- Where the recovery codes are, outside the account they recover.
- What gets alerted when it is used, which is the CloudTrail alarm above.
- What happens afterwards: who is told, what gets reviewed, whether anything is rotated.
- When it was last tested. An untested break-glass procedure is a plan you have chosen to discover under pressure.
Offboarding an AWS account
- Remove their Identity Center assignments or delete their IAM user.
- Deactivate and delete their access keys, including any their tooling used.
- Deregister their root MFA device, if they had one.
- If they ever held a shared TOTP secret, reset that 2FA and rotate the associated password. The secret does not leave their phone by itself.
- Check whether they can still read the root email address.
- Review CloudTrail around their departure for anything unexpected.
Step 5 is the one that gets missed. Access to the root mailbox is access to the root account, whatever else you have revoked.
Where Share Auth fits
Narrowly, and deliberately. For the accounts in the section above, meaning a client’s console, a third-party panel that allows one enrolment or a break-glass credential: the secret is entered once and encrypted at rest, the people who need codes see the code and its countdown rather than the secret, permissions are per member, and every view is logged.
For an AWS root user you administer, registering a second MFA device is better than anything a vault can do, ours included. Do that first.
Frequently asked questions
You do not have to share one. AWS lets you register several MFA devices on the root user (eight, at the time of writing), so two or three administrators can each enrol their own authenticator or hardware key. Nobody copies a secret, and removing one person means deregistering one device.
Prefer IAM Identity Center, which gives each person an identity with their own MFA and short-lived credentials into the accounts they need. If you are still on IAM users, one per person with their own MFA is the minimum, and never one shared user.
One that more than one person can read, such as a distribution list or shared mailbox. Root password recovery goes through that address, so a personal inbox makes the account unrecoverable the day that person is gone.
CloudTrail records root sign-ins. Standard practice is an alarm that notifies the team whenever root is used, because on a well-run account that should be a rare, explainable event.
Only where registering several MFA devices is not an option, such as an older setup or a client's account you do not administer. Then keep one custody of the secret, grant code access per person, log the views, and never store it in the same entry as the password.
Read next · Tool by tool
How to Manage 2FA for Shared Social Media Accounts
Most social platforms let people post without ever holding the password. What delegation exists where, and the recovery plan these accounts need.
How to Manage 2FA for a Shared Stripe Account
Stripe has team members, roles and restricted API keys, so most shared Stripe logins are unnecessary. What is genuinely left, and how to run 2FA on it.