Created
March 22, 2012 23:22
-
-
Save masui/2165433 to your computer and use it in GitHub Desktop.
RubyでAmazon S3アクセス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'aws/s3' | |
include AWS::S3 | |
Base.establish_connection!( | |
:access_key_id => 'ABCDEFG', | |
:secret_access_key => 'abcdefg' | |
) | |
DEFAULT_HOST.replace "s3-ap-northeast-1.amazonaws.com" # 東京を指定 | |
# buckets = Service.buckets | |
b = Bucket.find('backup.pitecan.com') | |
b.each { |obj| | |
p obj | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment