# AWS IAM authenticator setup

[Read this guide on KeySigner](https://keysigner.io/integrations/guides/set-up-aws-iam-sign-in-codes/)

Pair KeySigner with a sandbox AWS IAM user, enter two consecutive codes at enrollment, and check a fresh console sign-in.

## Before you start

**KeySigner on iPhone or Mac with Sign-in codes**

- Use an IAM test user with MFA enrollment permission in a sandbox account. Keep an independent MFA device or an administrator available. AWS recommends a passkey or security key where possible.

## Data and access

- **Shared or checked**. AWS provides the test IAM user’s enrollment. It checks two consecutive codes to verify the device during setup, then a fresh code at console sign-in.
- **Check separately**. Check IAM permissions and the conditions on programmatic access separately. The exercise covers the selected IAM user.

## 1. Open the IAM enrollment QR code

In the sandbox AWS console, open IAM, choose Users and select the test user. On Security credentials, choose Assign MFA device. Name the device, select Authenticator app, then choose Next and Show QR code. Keep the QR code private.

**Check.** The IAM user page shows the intended sandbox user and an authenticator-app setup QR.

## 2. Add the account in KeySigner

Open Accounts, then Add (+) and Sign-in codes and backup. Unlock Sign-in codes, choose Add account, and scan the setup QR code. Review the time-based entry, check the issuer and account name, then confirm and add it.

![KeySigner’s Add account screen offers Scan QR code, Choose QR image and a setup link field.](https://keysigner.io/integrations/guides/set-up-a-time-based-sign-in-code/keysigner-add-account.png)

Add account in KeySigner for Mac before scanning a test QR code.

**Check.** KeySigner lists the sandbox IAM user under the expected issuer.

## 3. Enter two consecutive codes

Choose Show code for the test IAM user in KeySigner and complete any signer approval. Enter the current value in MFA code 1. After it changes, approve the next code, enter it in MFA code 2 and submit Add MFA promptly. Have the signers your rule requires available for both codes.

**Check.** After the two consecutive codes are accepted, the named authenticator appears under the user’s Security credentials.

## 4. Check a separate console sign-in

Keep your original session open and sign in as the same IAM user in a private window. At the MFA prompt, request a fresh KeySigner code. Keep the independent MFA device or sandbox administrator available during and after the test.

**Check.** The private window opens the sandbox console as that IAM user after the MFA prompt.

## Check your result

AWS lists the authenticator on the IAM user’s Security credentials tab and accepts a fresh code in the separate browser session.

[How to verify your setup](https://keysigner.io/integrations/verify-a-setup/)

## If you get stuck

### AWS rejects the two enrollment codes or a later sign-in code

Check automatic date and time on your device. Use consecutive codes from the same account, and submit as soon as the second is ready. If AWS saved the device but then rejects fresh codes, use your independent access and follow the AWS resynchronization guide.

- [This setup key is too short. Ask the service for a key of at least 16 bytes.](https://keysigner.io/integrations/setup-messages/#setup-key-too-short)
- [The code expired. Generate another code.](https://keysigner.io/integrations/setup-messages/#code-expired)

## Tools in this guide

- [Amazon Web Services](https://keysigner.io/integrations/amazon-web-services/)
  - [Review root account access and recovery](https://docs.aws.amazon.com/IAM/latest/UserGuide/root-user-best-practices.html)
  - [Setup requirements](https://keysigner.io/integrations/setup-requirements/#amazon-web-services)

## Setup instructions

- [Assign an authenticator app to an AWS IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_virtual.html)
- [Resynchronize an AWS virtual MFA device](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_sync.html)
- [Set up a passkey or security key for AWS](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable_fido.html)
- [Set up codes for other cloud dashboards](https://keysigner.io/integrations/guides/set-up-cloud-dashboard-sign-in-codes/)

[More guides for this task](https://keysigner.io/integrations/tasks/set-up-sign-in-codes/)
