Forum: Ruby on Rails access EC2 from web console without email ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6af47f6f8659cffca8a527f6f75b4e65?d=identicon&s=25 Jedrin (Guest)
on 2014-01-02 22:12
(Received via mailing list)
I've used the various amazon cloud stuff a bit but don't totally
understand it ..
I have a test program below that prints out files and directories I have
on
the cloud which has worked fine for me.

 When I go to the amazon console, I have to log in using an email
address,
then it shows me my buckets on the cloud.

 A guy I started working for at a company emailed me my user name, ID,
and
secret access key for their cloud stuff .. Using my program I can see
the
stuff on the cloud but how can I log into it from the amazon web based
console ? Since he did not send me an email or password but only a user
name, ID and secret access key .. I am not sure how I can log in through
amazon to look at it ?


require 'rubygems'
require 'fog'

AWS_ACCESS_KEY_ID = "****************"
AWS_SECRET_ACCESS_KEY = "******"



# create a connection
@con = Fog::Storage.new({
  :provider                 => 'AWS',
  :aws_access_key_id        => AWS_ACCESS_KEY_ID,
  :aws_secret_access_key    => AWS_SECRET_ACCESS_KEY
})

cnt = 0
@con.directories.each do|dir|
  puts '-------------'
  puts dir.inspect
  puts "\n\n"
  puts dir.files.inspect
  cnt += 1
  sleep 2
  puts cnt.to_s
  exit if cnt > 25
end
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2014-01-03 08:09
(Received via mailing list)
On Thursday, January 2, 2014 9:11:39 PM UTC, Jedrin wrote:
> I've used the various amazon cloud stuff a bit but don't totally understand it
..
> I have a test program below that prints out files and directories I have on the
cloud which has worked fine for me.
>
>
> When I go to the amazon console, I have to log in using an email address, then
it shows me my buckets on the cloud.
>
>

An amazon account has several sets of credentials. One is a
username/password that allows you to login to the console, and another
is an api key/secret key that allows you to make api calls (this is what
fog uses). If you log into the amazon web console then it can show you
your api key (from memory the account menu in the top right has a link
to something like security credentials)

It is also possible to create users that can only access the console or
only make api requests (and if you do embed credentials in a script best
practice is to create a user with restricted access). You're best off
asking the person that sent you the credentials

Fred
This topic is locked and can not be replied to.