Expand description
AWS credentials for a container agent’s SDK or CLI, as AWS’s standard credential_process.
Spec: docs/specs/SPEC_CONTAINER_AGENT_AWS_CREDENTIALS_2026_10_31.md §12.
aws-credentials --profile <grant> is what each profile of the container’s AWS config runs (srv writes the
config). It asks POST /api/v1/aws/credentials; who is asking is decided by srv from the agent’s token
(AGENTMUX_AGENT_TOKEN), never from the request. The reason for a write grant rides in AGENTMUX_AWS_REASON
(the SDK process inherits it from the agent’s command line), and an optional lifetime in AGENTMUX_AWS_DURATION.
Stdout is the credentials as credential_process JSON on success and empty on every failure, so a broken answer
can never be read as credentials. A failure is one sentence on stderr, which the AWS CLI shows after “Error when
retrieving credentials from custom-process”.
Enums§
- Answer
- What the route answered.
Constants§
- ASK_
TIMEOUT 🔒 - srv may wait on the host’s AWS for 50 seconds (
RECIPE_TIMEOUTinidentity::aws_broker::mint), and a slow mint of 20 to 26 seconds is real. This waits longer than srv does, so srv’s answer, credentials or the reason there are none, is always the one the SDK sees; a stuck call still must not hold a deploy forever.
Functions§
- answer_
of - srv’s answer as the SDK should see it: only the five fields of
credential_process, and only when all are there. - ask
- Ask srv for the grant
profile. - request_
body - The request body: the grant, and what the agent said about why and for how long, if anything.
- run_
aws_ credentials aws-credentials --profile <name>: exit 0 with the JSON on stdout, or exit 1 with a sentence on stderr.