For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using Privileged Cloud to Generate AWS STS Credentials

Remove standing privilege and provide programmatic credentials for use in AWS

This feature goes live with Vault version 18.8 in November 2026

Overview

Keeper Privileged Cloud gives developers and DevOps teams just-in-time access to elevated AWS permissions through short-lived AWS Security Token Service (STS) credentials. Eliminating standing privileges is a critical security control that limits the impact of compromised credentials and reduces the risk of unauthorized access.

Developers retain their existing tools and workflows, including the AWS CLI, scripts, Terraform and AWS SDKs, with minimal friction. The KeeperPAM Gateway generates the temporary credentials—an access key ID, secret access key and session token - and Keeper delivers them securely through the Vault.

This capability supports both just-in-time ephemeral accounts and existing AWS users.

Setup

  • Set up the PAM configuration as outlined in AWS Environment Setup, and connect the corresponding KeeperPAM Gateway.

  • Create a PAM Cloud record and configure JIT and Workflow policies as described in the setup docs

  • To use ephemeral accounts, make sure to check the "Create ephemeral account for connection" option in the record's JIT settings, and validate the permissions the account should receive.

  • Share the PAM Cloud record with view-only permission to users who are eligible to request elevation

PAM Cloud Resource record JIT settings for ephemeral account creation and generation of credentials
This record is set up to use an ephemeral account when generating credentials on the cloud resource.
PAM Cloud Resource record showing generate credentials button
After the JIT settings have been saved for the record, the "Generate Credentials" button can be used.

Generating Credentials

As a user who is eligible to receive elevated access:

1

Open the record

Click Generate Credentials.

2

Wait for (up to) 15 seconds

Credentials will appear in a one-time share modal after they have been generated.

3

Save the credentials

Credentials can be saved as a PAM User record, or the user can copy/paste the STS credentials and place them in the appropriate location.

If a workflow is active, the credentials will expire automatically when the workflow expires.

Generated credentials being shown in a one-time shared modal
After the user account has been created, and STS credentials have been generated, they are shared in a one-time modal.
Modal showing where the user can save the generated credentials as a PAM User record
The credentials can be saved in any of the subfolders in the application folder as a PAM User record.

What happens behind the scenes

1

Optional: An ephemeral user account is created

For an ephemeral account, the KeeperPAM Gateway creates a new user in AWS with the permissions from the JIT settings. For an existing user, it skips this step. In both cases, the KeeperPAM Gateway adds the JIT role or group to that user, unless the user already has it.

2

A temporary access key is created

The KeeperPAM Gateway creates a temporary access key (a token) on the user's account. AWS won't issue a console login link without one.

3

STS Credentials are generated in AWS

The KeeperPAM Gateway uses that access key to get STS credentials from AWS.

4

A one-time modal is shown

The KeeperPAM Gateway puts the STS credentials into a new record and shares it with the user. For an ephemeral account, the record also includes the new AWS account's password.

The credentials expire after the elevation time set in the JIT settings, or after 1 hour if it isn't set. AWS only accepts durations between 15 minutes and 36 hours, so anything outside that range gets moved to the closest limit.

The credentials also stop working as soon as the workflow ends, even if they haven't expired yet.

AWS console showing the newly created ephemeral user after generating credentials
In this example, an ephemeral user account has been created in the AWS IAM instance when credentials have been requested.

Fields in the STS credential record

Field
Description

Title

Temporary AWS access token - <username>

Login

The AWS username

Password

The ephemeral account's AWS console password. Empty for existing users.

privatePEMKey (secret field)

The STS credentials, as JSON: accessKeyId, secretAccessKey, and sessionToken

Provider

aws

Notes

When the credentials expire

To use the credentials with the AWS CLI, set them as environment variables:

When the workflow ends

The gateway removes what it created:

  • Ephemeral user: the user is deleted from AWS, and its access key and permissions go with it.

  • Existing user: the gateway deletes the access key it created and takes away the JIT role or group it added. The user account, its other access keys, and anything it had before the workflow started are left alone.

Troubleshooting

The user already has two access keys

AWS caps each user at two access keys. If an existing user already has two, the gateway can't add the temporary one, so credential generation fails with this error:

Can't issue session credentials: this launch credential's AWS user is already at the maximum of 2 access keys, so a temporary access key can't be created. Remove an unused access key on that IAM user and try again.

To fix it, delete one of the user's access keys in AWS (IAM > Users > select the user > Security credentials > Access keys), then try again. Check that nothing still depends on the key before you delete it. Deactivating the key isn't enough, because AWS counts inactive keys toward the limit.

Ephemeral users don't run into this. They start with no access keys.

"No elevation group or role found for the resource."

The record's JIT settings don't have an AWS role or group. Add one, then generate credentials again.

Last updated