Skip to content

aws-sdk-kms package corrupted in jruby #3389

@HoneyryderChuck

Description

@HoneyryderChuck

Describe the bug

I have the following jruby installed:

jruby 10.1.0.0 (4.0.0) 2026-04-20 32f988b78c OpenJDK 64-Bit Server VM 24.0.1+9-30 on 24.0.1+9-30 +indy +jit [x86_64-darwin]

and I have a Gemfile containing aws-sdk-kms. I bundle install then open irb and:

require "aws-sdk-kms"
/user/.gem/jruby/4.0.0/gems/aws-sdk-kms-1.126.0/lib/aws-sdk-kms/customizations.rb:1:in '<main>': undefined local variable or method 'lib' for main (NameError)
        from org/jruby/RubyKernel.java:1211:in 'require'
        from org/jruby/RubyKernel.java:1235:in 'require_relative'
        from /user/.gem/jruby/4.0.0/gems/aws-sdk-kms-1.126.0/lib/aws-sdk-kms.rb:61:in '<main>'
        from org/jruby/RubyKernel.java:1211:in 'require'
        from /user/.rubies/jruby-10.1.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:144:in 'require'
        from (irb):1:in 'evaluate'

I do the same with CRuby and it works.

The aws-sdk-kms version is latest, 1.126.0. This difference is that the customizations.rb file downloaded by CRuby is empty, where for the jruby one, the top is clearly invalid ruby, and looks like bytecode gibberish:

ib/aws-sdk-kms/endpoint_parameters.                                                                                                                                                                        rb^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@0100644^@0000000^@0000000^@00000003707^@02263773600^@020632^@                 0^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@us tar^@00wheel^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@wheel^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@0000000^@0000000^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^ @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@# frozen_string_literal: true

 # WARNING ABOUT GENERATED CODE
# ...

indeed looks like an issue with generated code.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I'd expect requiring the gem to just work.

Current Behavior

As described above

Reproduction Steps

require "aws-sdk-kms"

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-kms

### Environment details (Version of Ruby, OS environment)

jruby 10.1.0.0 (4.0.0) 2026-04-20 32f988b78c OpenJDK 64-Bit Server VM 24.0.1+9-30 on 24.0.1+9-30 +indy +jit [x86_64-darwin]

Metadata

Metadata

Assignees

No one assigned

    Labels

    response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.third-partyThis issue is related to third-party libraries or applications.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions