# AWS ElastiCache temporary access

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

ElastiCache targets create a password-authenticated Redis OSS or Valkey RBAC user
through the AWS control plane and add it to an existing user group. The group
must already be attached to the intended cache. Configure the region, user group,
engine, and least-privilege access string:

```json
{
  "provider": "elasticache", "executor": "in_do", "region": "us-east-1",
  "userGroupId": "app-readers", "engine": "redis",
  "accessString": "on ~app:* -@all +get +mget", "maxTtlSeconds": 3600
}
```

Supply the management credential as encrypted JSON containing `accessKeyId`,
`secretAccessKey`, and optionally `sessionToken`. Its IAM policy needs
`elasticache:CreateUser`, `elasticache:DescribeUsers`,
`elasticache:ModifyUserGroup`, and `elasticache:DeleteUser` for the configured
resources. An expiring management session must remain usable for cleanup or be
replaced before it expires.

The lease returns a username, password, region, and user group ID. Use your
cache's existing TLS endpoint. User-group updates propagate asynchronously, so
new credentials may need a short wait before the cache accepts them. ACL password
directives and passwordless users are rejected; Seekrit generates the password.

ElastiCache users have no native lease expiry. At expiry or manual revocation,
Seekrit deletes the user; AWS removes it from its groups and caches. Cleanup stays
pending and retries until AWS confirms the user is absent. A manual revoke may
report that deletion is still pending. AWS propagation and active connections
can outlast the requested lease deadline.

See the [ElastiCache CreateUser](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateUser.html)
and [DeleteUser](https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DeleteUser.html) references.

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