Aws-sdk-ruby: gem install failure: aws-sdk-resources requires aws-sdk-sso (~> 1)

Created on 8 Nov 2019  路  10Comments  路  Source: aws/aws-sdk-ruby

Issue description

I've previously installed aws-sdk successfully, but it's stopped working today.

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

aws-sdk

Version of Ruby, OS environment

Amazon Linux 2018.03
Chef 12.22.5
default Ruby version

Code snippets / steps to reproduce

This Dockerfile shows the failure:

FROM amazonlinux:2018.03
RUN curl -L https://omnitruck-direct.chef.io/install.sh | bash -s -- -v 12.22.5
RUN /opt/chef/embedded/bin/gem install --no-ri --no-rdoc aws-sdk

Build it using a command similar to docker build -t awssdk-issue .

Error message

ERROR:  Error installing aws-sdk:
    aws-sdk-resources requires aws-sdk-sso (~> 1)
The command '/bin/sh -c /opt/chef/embedded/bin/gem install --no-ri --no-rdoc aws-sdk' returned a non-zero code: 1

Most helpful comment

I have yanked aws-sdk-resources 3.57.0.

Please try reinstalling and trying gem clean if necessary.

All 10 comments

I suspect the error is in the dependencies for aws-sdk-resources version 3.57.0

This Dockerfile builds successfully:

FROM amazonlinux:2018.03
RUN curl -L https://omnitruck-direct.chef.io/install.sh | bash -s -- -v 12.22.5
RUN /opt/chef/embedded/bin/gem install --no-ri --no-rdoc aws-sdk-resources --version "=3.56.0"
RUN /opt/chef/embedded/bin/gem install --no-ri --no-rdoc aws-sdk

I'm having a similar issue with cookbooks that require the aws-sdk gem. I was able to get around the issue temporarily by adding the following code snippet to my cookbook to install aws-sdk-sso directly.

chef_gem 'aws-sdk-sso' do
  compile_time true
end

Looks like there's an issue grabbing the aws-sdk-sso as a dependency of another gem but I'm able to grab the gem directly from https://rubygems.org.

aws-sdk-resources fails to install//find aws-sdk-sso

$ gem install --source https://rubygems.org aws-sdk-resources

ERROR:  Error installing aws-sdk-resources:
    aws-sdk-resources requires aws-sdk-sso (~> 1)

Able to grab aws-sdk-sso directly which allows aws-sdk-resources to install fine.

$ gem install --source https://rubygems.org aws-sdk-sso

Fetching: aws-sdk-sso-1.0.0.gem (100%)
Successfully installed aws-sdk-sso-1.0.0
Parsing documentation for aws-sdk-sso-1.0.0
Installing ri documentation for aws-sdk-sso-1.0.0
Done installing documentation for aws-sdk-sso after 0 seconds
1 gem installed

$ gem install --source https://rubygems.org aws-sdk-resources

Successfully installed aws-sdk-resources-3.57.0
Parsing documentation for aws-sdk-resources-3.57.0
Installing ri documentation for aws-sdk-resources-3.57.0
Done installing documentation for aws-sdk-resources after 0 seconds
1 gem installed

I am also facing a similar issue!
gem install failure: aws-sdk-resources requires aws-sdk-sso (~> 1).

commit: ccb68ade8ae33c783ffb7a0c121f9a476e754464 informs about added dependency of aws-sdk-sso which is causing Downloading aws-sdk-resources-3.57.0 revealed dependencies not in the API or the lockfile (aws-sdk-sso (~> 1))

tried installing aws-sdk-sso directly but the issue still persists during bundle update.

@cjyclaire

As a very ugly workaround we pinned the version of aws-sdk-resources to the last version prior to the aws-sdk-sso dependency was introduced.

We added the following to the metadata.rb of the cookbook with the aws-sdk gem dependency:

gem 'aws-sdk-resources', '= 3.56.0'

gem install aws-sdk fails with the same error. Workaround: gem install aws-sdk-sso aws-sdk

Same error, now install aws-sdk-sso gem before the base aws-sdk one.

I have yanked aws-sdk-resources 3.57.0.

Please try reinstalling and trying gem clean if necessary.

Thanks @mullermp. Confirming I'm no longer running into this issue.

We will be doing another release - targeting version 3.57.1. I will be testing post release to confirm.

3.57.1 has been released and works correctly bundled with aws-sdk-sso. Closing!

Was this page helpful?
0 / 5 - 0 ratings