sous-chefs / aws

Development repository for the aws cookbook
https://supermarket.chef.io/cookbooks/aws
Apache License 2.0
612 stars 554 forks source link

LoadError: cannot load such file -- aws-sdk-secretsmanager #432

Open prat23k opened 3 years ago

prat23k commented 3 years ago

Hi,

I have installed aws-sdk-secretsmanager using gem install, I can see its available but when I try do require 'aws-sdk-secretsmanage' got the following issue

chef_version=16.2.73
         platform=redhat
         platform_version=7.9
         ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
         program_name=/opt/chef/bin/chef-client
         executable=/opt/chef/bin/chef-client

         Running handlers:
     ERROR: Running exception handlers
         Running handlers complete
  ERROR: Exception handlers complete
         Chef Infra Client failed. 2 resources updated in 10 seconds
      Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
      Please provide the contents of the stacktrace.out file if you file a bug report
FATAL: LoadError: cannot load such file -- aws-sdk-secretsmanager

thanks

ramereth commented 3 years ago

Did the gem get installed into the Chef Infra Client environment or the system gem environment? Do you have some example recipes or some steps we can do to replicate the issue?

Thanks!

prat23k commented 3 years ago

Please use the following steps to replicate

  1. Launched ec2 instance from the kitchen yaml

2.gem Install aws-sdk-secretsmanager and it installed successfully

3. please provide require " aws-sdk-secretsmanager" in the recipe,

Thanks
ramereth commented 3 years ago

What does which gem return on your system?

prat23k commented 3 years ago

which gem returns nothing, can you help me to install gem from the cookbook on the ec2 instance

thanks

ramereth commented 3 years ago

We don't really provide support like that however you should use chef_gem to install it at compile time so that it works.