eb platform create fails with Ruby SDK deprecated error

0

When trying to create a custom ElasticBeanstalk platform that uses Python3.10.5, I keep running across this error:

[2022-07-01T05:50:06.466Z] INFO  [5419]  - [CMD-PackerBuild/PackerBuild/PackerBuildHook/build.rb] : Activity execution failed, because: Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/
  'packer build' failed, the build log has been saved to '/var/log/packer-builder/Python3.10_Ubuntu:1.0.8-builder.log' (ElasticBeanstalk::ExternalInvocationError)
caused by: Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/
  'packer build' failed, the build log has been saved to '/var/log/packer-builder/Python3.10_Ubuntu:1.0.8-builder.log' (Executor::NonZeroExitStatus)

I'm not sure how to get around it, as none of my actual code for this uses ruby at all.

I have tried to SSH into the packer build box and run gem install aws-sdk to get the latest version, however the problem above still persists.

I'm really unsure of what to do at this point. Any advice?

jbrace
asked 2 years ago196 views
2 Answers
0

Hello,

The simplest path to upgrade to version 3 from 2 is;

gem 'aws-sdk', '~> 3'

If your gem-file uses the bundlers aws-sdk-core or aws-ask-resources, you will need to update these bundlers in your gem file, as well as any ruby require statements that call them:

Gem file

#gem 'aws-sdk-core', '~> 2'
#gem 'aws-sdk-resources', '~> 2'
gem 'aws-sdk', '~> 3'

Requires

#require 'aws-sdk-core'
require 'aws-sdk'

Please see Upgrading from Version 2 to Version 3 of the AWS SDK for Ruby for additional information

AWS
answered 2 years ago
  • Hi, as I have mentioned in my post, I did upgrade to the latest versions, however the files that are complaining about it are endemic to the default packer AMI provided by Amazon (AMI ID: ami-0428124429e0d6ae2).

    This means that every example listed on the https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html help page does not work. The AMI in question is provided directly by amazon, and is automatically selected when running eb platform create.

    The default version of ruby on that instance is also insufficient to run the latest version of the aws-sdk.

0

Hello,

Thanks for the feedback. I have reproduced this issue with the same AMI "ami-0428124429e0d6ae2" in us-east-1 and got the same error. This points to issues with the AMI.

Activity execution failed, because: Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/
  'packer build' failed, the build log has been saved to '/var/log/packer-builder/customplatform:1.0.0-builder.log' (ElasticBeanstalk::ExternalInvocationError)
caused by: Version 2 of the Ruby SDK will enter maintenance mode as of November 20, 2020. To continue receiving service updates and new features, please upgrade to Version 3. More information can be found here: https://aws.amazon.com/blogs/developer/deprecation-schedule-for-aws-sdk-for-ruby-v2/
  'packer build' failed, the build log has been saved to '/var/log/packer-builder/customplatform:1.0.0-builder.log' (Executor::NonZeroExitStatus)

In order to troubleshoot this further, please create a support case as we require information that is not public. This would enable us reach out to the Elastic Beanstalk service team.

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions