Skip to content

Unable to start opencode with AWS Bedrock as provider when config includes a ca_certificate #8052

Closed

Description

@neshreve

EDIT TO ADD: As mentioned in the comments, I resolved this by explicitly setting the SSL_CERT_BUNDLE and REQUESTS_CA_BUNDLE environment variables to the location of my company-provided cert bundle.

I would no longer characterize this as a bug, but as needing a descriptive error message.

Description

Due to a recent change, I must now include a ca_bundle in my ~/.aws/config to authenticate awscli on my work machine. Since making this change, I am unable to start opencode with Bedrock as the provider.

AWS config snippet

[profile default]
role_arn = <role_arn>
source_profile = root
region = us-east-2
role_session_name = <session_name>
ca_bundle = /path/to/my-cert-bundle.pem

BunInstallFailedError when running opencode

$ AWS_PROFILE=default opencode
{
  "name": "BunInstallFailedError",
  "data": {
    "pkg": "@aws-sdk/credential-providers",
    "version": "latest"
  }
}

Plugins

None

OpenCode version

1.1.10

Steps to reproduce

Require & provide a CA bundle with AWS CLI profile config and launch opencode with Bedrock as the provider

$ AWS_PROFILE=default opencode
{
  "name": "BunInstallFailedError",
  "data": {
    "pkg": "@aws-sdk/credential-providers",
    "version": "latest"
  }
}

Screenshot and/or share link

N/A

Operating System

macOS Sequoia 15.6.1

Terminal

wezterm

Activity

  1. dpclark4 commented on Jan 13, 2026

    @dpclark4

    I'm also seeing this:

    ❯ which opencode
    opencode: aliased to AWS_PROFILE=<some specific profile name> opencode
    
    ❯ opencode
    {
      "name": "BunInstallFailedError",
      "data": {
        "pkg": "@aws-sdk/credential-providers",
        "version": "latest"
      }
    }
    

    I noticed this issue a day or two ago. I tried on both 1.1.14 and 1.1.18

  2. neshreve commented on Jan 14, 2026

    @neshreve
    Author

    Hi @dpclark4, I ran into some other SSL-related issues that coincided with this problem. I ultimately resolved by explicitly setting the SSL_CERT_BUNDLE and REQUESTS_CA_BUNDLE environment variables to point at the cert bundle I mentioned in my initial post, which also resolved the problem with opencode. Hopefully this is helpful.

  3. alexsandiiarov commented on Jan 14, 2026

    @alexsandiiarov

    I found a workaround for this one:

    cd ~/.cache/opencode && bun i @aws-sdk/credential-providers@latest
  4. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions