feat: Add AWS Web Identity Token File (EKS IRSA) support for Bedrock #5776

Closed
opened 2026-02-16 17:56:40 -05:00 by yindo · 0 comments
Owner

Originally created by @bainos on GitHub (Jan 14, 2026).

Originally assigned to: @thdxr on GitHub.

Feature Request: AWS Web Identity Token File (EKS IRSA) Support for Bedrock

Problem:
OpenCode cannot authenticate with Amazon Bedrock from Kubernetes/EKS environments using IAM Roles for Service Accounts (IRSA).

Proposed Solution:
Add support for AWS Web Identity Token File authentication by detecting AWS_WEB_IDENTITY_TOKEN_FILE environment variable and enabling the AWS credential chain when no bearer token is present.

Use Case:
Enable OpenCode to run in containerized workloads (Kubernetes/EKS) with IRSA, which is the standard AWS authentication method for pods.

Environment Variables:

  • AWS_WEB_IDENTITY_TOKEN_FILE - Path to token file (set by Kubernetes)
  • AWS_ROLE_ARN - IAM role to assume
  • AWS_REGION - AWS region
Originally created by @bainos on GitHub (Jan 14, 2026). Originally assigned to: @thdxr on GitHub. ### Feature Request: AWS Web Identity Token File (EKS IRSA) Support for Bedrock **Problem:** OpenCode cannot authenticate with Amazon Bedrock from Kubernetes/EKS environments using IAM Roles for Service Accounts (IRSA). **Proposed Solution:** Add support for AWS Web Identity Token File authentication by detecting `AWS_WEB_IDENTITY_TOKEN_FILE` environment variable and enabling the AWS credential chain when no bearer token is present. **Use Case:** Enable OpenCode to run in containerized workloads (Kubernetes/EKS) with IRSA, which is the standard AWS authentication method for pods. **Environment Variables:** - `AWS_WEB_IDENTITY_TOKEN_FILE` - Path to token file (set by Kubernetes) - `AWS_ROLE_ARN` - IAM role to assume - `AWS_REGION` - AWS region
yindo closed this issue 2026-02-16 17:56:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5776