amazon-archives/awscli-cookbook

[v1.1.0] Wrong number of arguments (0 for 1)

Closed this issue · 1 comments

I get an error when I try to use the awscli_s3_file function: `Wrong number of arguments (0 for 1)

It seems to be related to the key property of the awscli_s3_file function.

================================================================================^[[0m
^[[31mRecipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb^[[0m
================================================================================^[[0m

^[[0m
ArgumentError^[[0m
-------------^[[0m
wrong number of arguments (0 for 1)^[[0m

^[[0m
Cookbook Trace:^[[0m
---------------^[[0m
  /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:16:in `key'
  /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:16:in `block (2 levels) in from_file'
  /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:11:in `block in from_file'
  /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:1:in `each'
  /var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:1:in `from_file'^[[0m

^[[0m
Relevant File Content:^[[0m
----------------------^[[0m
/var/lib/aws/opsworks/cache.stage2/cookbooks/deploy-java/recipes/default.rb:

  9:    end
 10:
 11:    awscli_s3_file "#{node.deploy_java.dir}/#{app.name}/app.jar" do
 12:            aws_access_key_id "#{app.access_key}"
 13:            aws_secret_access_key "#{app.secret_key}"
 14:            region "eu-west-1"
 15:            bucket "#{app.bucket}"
 16>>           key "#{app.key}"
 17:    end

Sorry, my fault. I didn't know ruby well enough to know about this function: http://ruby-doc.org/core-2.0.0/Hash.html#method-i-key