AWS MFA Passkeys and Security Keys

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up aws mfa passkeys and security keys by binding FIDO2 keys to cloud identities. When a user logs in, the browser checks the key to prove who they are. Teams often roll out these keys to stop phishing attacks across their cloud accounts. Still, once a user signs in, broad role rules still allow risky database commands. How aws mfa passkeys and security keys work Passkeys and hardware keys use public key cryptography to check user identity at login. During setup, the user device create

Passkeys + AWS Security Hub: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up aws mfa passkeys and security keys by binding FIDO2 keys to cloud identities. When a user logs in, the browser checks the key to prove who they are. Teams often roll out these keys to stop phishing attacks across their cloud accounts. Still, once a user signs in, broad role rules still allow risky database commands.

How aws mfa passkeys and security keys work

Passkeys and hardware keys use public key cryptography to check user identity at login. During setup, the user device creates a pair of keys for the cloud account. The device keeps the private key safe and sends the public key to AWS. The private key stays inside the phone, laptop, or USB key.

When an engineer logs in, the cloud service sends a random challenge to the browser. The user touches their hardware key or uses face or fingerprint scan on their device. The device signs the challenge with the private key and sends it back. The cloud service checks the signature with the stored public key before opening the session.

Because the browser checks the site domain, fake login pages do not receive unmasked the login token. Even if an attacker tricks a user, the key will not sign the wrong domain. Teams can register multiple keys per user so a lost device does not lock them out. Admins can also require a multi-factor check inside role trust rules before granting a session.

Choosing between synced passkeys and hardware keys

Teams usually pick between synced passkeys on laptops or phones and dedicated USB hardware keys. Synced passkeys copy across a user's personal devices through their operating system cloud account. This makes daily sign-in fast and helps users recover if they break a phone. Still, strict security teams often prefer hardware keys because the secret cannot leave the physical token.

Many teams allow synced passkeys for daily test accounts and require hardware keys for production roles. Admins should also register a backup key in a safe place for root accounts. Planning key recovery early prevents long lockouts when an engineer changes laptops or loses a phone.

Passkeys + AWS Security Hub: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What login keys solve and what they leave open

Passkeys and security keys solve a major problem at the front door of your cloud. They stop attackers from using stolen passwords or phishing codes to take over an account. They also make daily sign-in faster for engineers than typing six-digit phone codes. For compliance audits, FIDO2 keys prove that a real person started the cloud session.

Still, login keys only check who starts the session at the moment of sign-in. Once AWS grants the session token, the key plays no part in what happens next. If that role has broad permissions, the user can run any allowed database query or shell command. A valid passkey login does not stop an engineer from dropping a production table by mistake.

Also, passkeys do not inspect the data that comes back from a database query. If a table holds emails, phone numbers, card numbers, or national IDs, the query returns them raw. Cloud sign-in logs record that a user logged in, not every query they ran inside a database. Teams still need controls that check individual commands and rewrite sensitive fields in query results.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the difference between a passkey and a hardware security key in AWS?

Both use the same FIDO2 standard to prove identity during login. A passkey lives on a phone or laptop, while a security key is a separate USB token.

Do passkeys work for command line sessions as well as the web console?

Yes, when engineers sign in through browser-based single sign-on flows from their terminal. After the browser checks the passkey, the tool receives short-lived credentials for command line work.

Do security keys limit which database queries an engineer can run after login?

No, security keys only check identity when the user signs in or switches roles. Once the session starts, database permissions and runtime controls decide which queries can run.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.