Using Privileged Cloud to Generate AWS STS Credentials
Remove standing privilege and provide programmatic credentials for use in AWS

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


Generating Credentials
As a user who is eligible to receive elevated access:
If a workflow is active, the credentials will expire automatically when the workflow expires.


What happens behind the scenes
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.
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.

Fields in the STS credential record
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

