Nicholas Muir
Nicholas Muir

Reputation: 3104

AWS Ruby SDK V2: Aws error command not found

I am using cloud9 with ruby on rails, I have just installed the AWS-SDK and was following the amazon documents to set it up (Listed below).

http://docs.aws.amazon.com/sdk-for-ruby/latest/DeveloperGuide/aws-ruby-sdk-getting-started.html#aws-ruby-sdk-credentials-client

But on the second step which is just to run Aws.config I am getting a Aws command not found error.

I tried with capital letter ect but it is not recognizing AWS.

I was thinking it may possibly be the directory I am in but there is nothing saying I should be in anything but the root directory for my applications. None of he other gems have this problem byt since I am using cloud9 I thought I would check. I have included the director for the gem below if you think this may be the issue:

/usr/local/rvm/gems/ruby-2.3.0/gems/aws-sdk-2.3.1

This is the output from my console with the top line showing aws-sdk-core 2.3.1 is installed and the errors at the bottom when I try to enter aws into the console.

Using aws-sdk-core 2.3.1
    Using rails-deprecated_sanitizer 1.0.3
    Using globalid 0.3.6
    Using activemodel 4.2.5
    Using jbuilder 2.4.1
    Using rails-html-sanitizer 1.0.3
    Using aws-sdk-resources 2.3.1
    Using rails-dom-testing 1.0.7
    Using activejob 4.2.5
    Using activerecord 4.2.5
    Using aws-sdk 2.3.1
    Using actionview 4.2.5
    Using actionpack 4.2.5
    Using actionmailer 4.2.5
    Using railties 4.2.5
    Using sprockets-rails 3.0.4
    Installing aws-sdk-rails 1.0.1
    Using coffee-rails 4.1.1
    Using jquery-rails 4.1.1
    Using rails 4.2.5
    Using sass-rails 5.0.4
    Using web-console 2.3.0
    Using turbolinks 2.5.3
    Bundle complete! 15 Gemfile dependencies, 65 gems now installed.
    Use `bundle show [gemname]` to see where a bundled gem is installed.
    discoveredfm:~/workspace $ aws
    bash: aws: command not found
    discoveredfm:~/workspace $ Aws
    bash: Aws: command not found
    discoveredfm:~/workspace $ AWS
    bash: AWS: command not found
    discoveredfm:~/workspace $ bundle show aws-sdk
    /usr/local/rvm/gems/ruby-2.3.0/gems/aws-sdk-2.3.1
    discoveredfm:~/workspace $ 

Thanks for your help.

Upvotes: 0

Views: 437

Answers (2)

Sergi Case
Sergi Case

Reputation: 226

You can use irb it's pretty cool for check fast things with ruby.

% irb
>> require 'aws-sdk'
=> true
>> aws = Aws.new()

Just play with aws-sdk , you will need to create credentials and more for the aws resources.

Upvotes: 1

Frederick Cheung
Frederick Cheung

Reputation: 84114

The aws-sdk gem (that allows you to access aws services from inside your ruby programs) and the aws cli (which provides command line access to aws) are two completely separate pieces of software. Installing the gem doesn't install the cli for you

Upvotes: 3

Related Questions