-
-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing require for aws-sdk? #181
Comments
Yes. This has been a problem for anybody using OpsWorks ever since Amazon went to the new version of aws-sdk. I haven't been using this cookbook (or any dependent on it) ever since that happened, due to the uninitialized constant error. Been using the awscli cookbook from awslabs for S3 gets instead. However, there is another cookbook for tagging OpsWorks instances that I'd like to use, and it's dependent on the ec2 tagging LWRP in this cookbook as well (which has the same problem). So if the issue can be fixed, I'm all for it. |
@zanzan42 glad i am not the only one haha |
The aws-sdk gem namespace was being called before it was required. Solves sous-chefs#181
I'm experiencing the same issue using aws-sdk 2.2.0.
Is there a workaround that can be used for the short term? |
@doitagain see the PR above |
@shortdudey123 thanks for responding so quickly. I see the PR, but I'm new to chef and don't understand how to reference that branch in my Berksfile or metadata.rb. If you have time, would you mind providing an example? This is what I've tried: Berksfile
metadata.rb
|
look at the |
Clear now... thank you! |
+1 |
I've tested the above but keep get the same error. What is the last known stable version for s3 file? 2.7.2 seems unusable. |
@doitagain error output? |
I think this is part of a larger problem where we shouldn't require the aws::default recipe in order to install / load the SDK gem. Instead we should dynamically install the gem when needed and require the sdk as needed. The fix in #183 partially fixes it, but as @miketheman pointed out the real fix is more complex and should probably be done. I'm still a bit partial to getting the mini-fix in place now, but I'm going to look into what it will take to refactor things the right way. |
@tas50 Thanks! |
@shortdudey123 my error output is the same that you reported.
|
I apologize for being so confused over usage of s3_file. I've read through the docs, the above PR, this issue, and the OpsWorks docs repeatedly and can't figure out how to add the aws recipe to the run_list on OpsWorks. I've tried executing aws::default directly and still result in the "uninitialized constant Aws" error. I realize this may be out of scope, but clarification on use of the aws cookbook on OpsWorks would be greatly appreciated. |
@doitagain downgrade to 2.5.0. There seems to be too much confusion over the use of anything more recent. |
We have a fix on master for this. It'll go out with the next release. |
This is still a problem for OpsWorks recipes which use aws as a dependency. While I punted and use a different s3_file cookbook (which has been included in the OpsWorks base set since about November), tagging recipes which depend on aws still continue to fail with the uninitialized constant Aws error. For instance, this one: |
When using the
aws_s3_file
LWRP, I get an error sayinguninitialized constant Aws
. Looks like this is because stuff from theAws
namespace is used before the gem is required.Anyone else seeing this? If so, I can put in a PR
Gem versions
The text was updated successfully, but these errors were encountered: