Welcome to Day 5 of the 30 Days AWS Security Challenge. We have spent four days on IAM, and today we add one more layer on top of it: multi factor authentication. If there is a single security setting that gives you the biggest return for the smallest effort, this is it.
What MFA Actually Does
A password alone proves you know something. MFA adds a second requirement, usually proving you have something, like your phone. Even if someone steals or guesses your password, they still cannot log in without that second factor.
In AWS, MFA typically means a six digit code that changes every thirty seconds, generated by an app on your phone or a physical hardware device. You enter your password as usual, then AWS asks for that rotating code before letting you in.
Why This Matters So Much for AWS
Passwords leak more often than people think. They show up in data breaches, get reused across sites, or get phished through a convincing fake login page. Any of these can hand your AWS password straight to an attacker.
Without MFA, a leaked password is often all it takes to fully compromise an account. With MFA turned on, that same leaked password is close to useless on its own, since the attacker still needs your physical device to generate the second code.
This matters even more for your AWS root user specifically, since a compromised root account can touch billing, every resource, and every setting in the entire account. We'll go deeper on root account protection tomorrow, but MFA on root is step one.
Types of MFA AWS Supports
AWS gives you a few options depending on what you have available:
- Virtual MFA apps, like Google Authenticator or Authy, which generate rotating codes on your phone. This is the most common and easiest option to start with.
- Hardware MFA devices, small physical tokens that generate codes, useful for high security environments or shared accounts.
- Security keys, physical USB or NFC devices that use a more advanced standard called FIDO, offering strong protection against phishing.
For most individuals and small teams, a virtual MFA app is enough to close the majority of the risk, and it costs nothing to set up.
How to Turn On MFA for Your Account
Setting this up takes about five minutes:
- Sign in to the AWS console and open IAM > Users, then select your user (or go to your account settings if setting up MFA for the root user).
- Find the Security credentials tab and click Assign MFA device.
- Choose Virtual MFA device, then scan the QR code shown with an authenticator app on your phone.
- Enter two consecutive codes from the app to confirm the setup.
- Save the setup, and from now on you will need a fresh code from your app every time you sign in.
Do this for the root user first, since it carries the most risk, then repeat it for every IAM user in the account.
Enforcing MFA Across Your Team
Turning MFA on for yourself is a good start, but a team account is only as strong as its weakest login. You can enforce MFA at the account level using an IAM policy that denies most actions unless MFA is present in the session. This means users are effectively locked out of doing anything meaningful until they complete MFA, closing the gap of someone simply skipping the setup.
Key Takeaways
- MFA adds a second proof of identity beyond your password, usually a rotating code from your phone
- It protects you even when a password has already leaked or been guessed
- The root user should get MFA before anything else in your account
- Virtual MFA apps are free, fast to set up, and enough for most individuals and small teams
- You can enforce MFA account wide with an IAM policy so it is not optional for anyone
Tomorrow we stay focused on that root user and go through the specific best practices for locking it down beyond just MFA, since it is the single most powerful identity in your entire AWS account.
Loading article