Infisical’s AWS IAM User secret rotation capability lets you update the Access key and Secret access key credentials of a target IAM user from within Infisical at a specified interval or on-demand.

Prerequisites

  • Create an AWS Connection with the required Secret Rotation permissions

  • Make sure to add the following permissions to your IAM Role/IAM User Permission policy set used by your AWS Connection:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "iam:ListAccessKeys",
            "iam:CreateAccessKey",
            "iam:UpdateAccessKey",
            "iam:DeleteAccessKey",
            "iam:ListUsers"
          ],
          "Resource": "*"
        }
      ]
    }
    

Workflow

The typical workflow for using the AWS IAM User rotation strategy consists of four steps:

  1. Creating the target IAM user whose credentials you wish to rotate.
  2. Configuring the rotation strategy in Infisical with the credentials of the managing IAM user.
  3. Pressing the Rotate button in the Infisical dashboard to trigger the rotation of the target IAM user’s credentials. The strategy can also be configured to rotate the credentials automatically at a specified interval.

In the following steps, we explore the end-to-end workflow for setting up this strategy in Infisical.

1

Create the target IAM user

To begin, create an IAM user whose credentials you wish to rotate. If you already have an IAM user, then you can skip this step.

2

Configure the AWS IAM User secret rotation strategy in Infisical

  1. Navigate to your Secret Manager Project’s Dashboard and select Add Secret Rotation from the actions dropdown.

  2. Select the AWS IAM User Secret option.

  3. Select the AWS Connection to use and configure the rotation behavior. Then click Next.

    • AWS Connection - the connection that will perform the rotation of the specified application’s Client Secret.
    • Rotation Interval - the interval, in days, that once elapsed will trigger a rotation.
    • Rotate At - the local time of day when rotation should occur once the interval has elapsed.
    • Auto-Rotation Enabled - whether secrets should automatically be rotated once the rotation interval has elapsed. Disable this option to manually rotate secrets or pause secret rotation.
  4. Select the AWS IAM user and the region of the user whose credentials you want to rotate. Then click Next.

  5. Specify the secret names that the AWS IAM access key credentials should be mapped to. Then click Next.

    • Access Key ID - the name of the secret that the AWS access key ID will be mapped to.
    • Secret Access Key - the name of the secret that the rotated secret access key will be mapped to.
  6. Give your rotation a name and description (optional). Then click Next.

    • Name - the name of the secret rotation configuration. Must be slug-friendly.
    • Description (optional) - a description of this rotation configuration.
  7. Review your configuration, then click Create Secret Rotation.

  8. Your AWS IAM User credentials are now available for use via the mapped secrets.

FAQ