# AWS IAM temporary access

[Temporary access overview](/docs/concepts/temporary-access) covers target setup, connection methods, and credential handling.

AWS uses [client-encrypted delivery](/docs/concepts/temporary-access#provider-tiers) (tier 2). Unlike the databases and SSH — where the
consumer computes a verifier and the plaintext never leaves — AWS mints the
credential itself (an access key + secret + session token). So it can't be
verifier-only; instead the credential is **encrypted to the consumer before it
comes back**, which keeps it zero-knowledge at the control plane.

You register one **assumable IAM role** as a target. seekrit assumes it via STS
`AssumeRole` using a base IAM credential (the wrapped admin secret) whose only
required permission is `sts:AssumeRole` on that role. What the leased credential
can *do* lives entirely in IAM: the role's attached policies define its
permissions, optionally narrowed per target by an inline session policy.

Minting works like this:

1. The machine that will use the credential generates an **ephemeral P-256
   keypair locally** and sends seekrit **only the public key**, plus a TTL.
2. The broker calls STS `AssumeRole` with the base credential, decrypted
   transiently in the DO, and gets back the temporary credential.
3. The broker **wraps that credential to your public key** (the same `wd1.`
   envelope used for DEK grants) and returns only the ciphertext.
4. Your machine unwraps it with the private key it never shared:

```
eval "$(seekrit aws lease prod-deploy --ttl 1h)"
aws sts get-caller-identity
```

The control plane only ever relays ciphertext, and only your private key can
unwrap it — so, as with the other providers, what seekrit stores or returns is
never usable on its own. The broker sees the issued credential in plaintext
transiently (it does the STS call and the wrap), the scoped exception tier 2
makes — the same trade every dynamic-secrets engine makes for the provisioning
credential.

> **Note:** **Revocation is by expiry.** STS session credentials can't be revoked
>   individually, so — like SSH certificates — v1 relies on the short lifetime STS
>   itself enforces (`DurationSeconds`, 15 minutes to 12 hours; the requested TTL is
>   clamped to the role's `MaxSessionDuration`). Revoking a lease records the event
>   in the ledger and audit trail, but an issued credential stays valid until it
>   expires. Hosted execution and registered customer provisioners both support AWS.

See the [CLI reference](/docs/reference/cli) and [API reference](/docs/reference/api) for commands and endpoints.
