Problem
The SDK's IdentityClient lets customers exchange tokens and manage credential providers at runtime, but the IAM prerequisites that make these features work have no SDK support. Before @requires_access_token, @requires_iam_access_token, or get_token() can function, customers must:
- Enable AWS IAM Outbound Web Identity Federation at the account level — an obscure one-time IAM API call (
enable_outbound_web_identity_federation) that isn't documented alongside the SDK's identity features
- Configure the agent's execution role with the correct trust policy (
bedrock-agentcore.amazonaws.com as trusted principal) and inline policies for workload token exchange, Secrets Manager access, and JWT signing permissions
Without this, customers follow the SDK docs, try @requires_access_token, get cryptic auth failures, and have to reverse-engineer the IAM setup themselves. The starter toolkit automates this with setup_aws_jwt_federation() and ensure_identity_permissions() — the SDK should provide the same so that identity features work out of the box.
Acceptance Criteria
Relevant Links
Problem
The SDK's
IdentityClientlets customers exchange tokens and manage credential providers at runtime, but the IAM prerequisites that make these features work have no SDK support. Before@requires_access_token,@requires_iam_access_token, orget_token()can function, customers must:enable_outbound_web_identity_federation) that isn't documented alongside the SDK's identity featuresbedrock-agentcore.amazonaws.comas trusted principal) and inline policies for workload token exchange, Secrets Manager access, and JWT signing permissionsWithout this, customers follow the SDK docs, try
@requires_access_token, get cryptic auth failures, and have to reverse-engineer the IAM setup themselves. The starter toolkit automates this withsetup_aws_jwt_federation()andensure_identity_permissions()— the SDK should provide the same so that identity features work out of the box.Acceptance Criteria
Relevant Links
setup_aws_jwt_federation()get_aws_jwt_federation_info()ensure_identity_permissions()ensure_aws_jwt_permissions()