4. What is S3?
A RESTful (or SOAP) data storage API
Supports HTTP and BitTorrent protocols
Control headers to serve content straight from S3
5. What is S3?
A RESTful (or SOAP) data storage API
Supports HTTP and BitTorrent protocols
Control headers to serve content straight from S3
Full access control per file or user
Preauthorize direct uploads by users
6. What is S3?
A RESTful (or SOAP) data storage API
Supports HTTP and BitTorrent protocols
Control headers to serve content straight from S3
Full access control per file or user
Preauthorize direct uploads by users
Billed by capacity stored and transfer rates
17. Your buckets:
Creating the bucket graysoftinc... Done.
Your buckets: graysoftinc
Creating/Listing Buckets
Globally unique “buckets” hold files on S3
28. #!/usr/bin/env ruby -KU
$VERBOSE = nil
require "rubygems"
require "aws" # sudo gem install aws
s3 = Aws::S3Interface.new(
"ACCESS_KEY_ID",
"SECRET_ACCESS_KEY",
:logger => Logger.new("/dev/null")
)
open("downloaded.rb", "w") do |f|
s3.get("graysoftinc", "ruby/upload.rb") do |chunk|
f << chunk
end
end
Downloading a File
You can stream files to and from S3
29. #!/usr/bin/env ruby -KU
$VERBOSE = nil
require "rubygems"
require "aws" # sudo gem install aws
s3 = Aws::S3Interface.new(
"ACCESS_KEY_ID",
"SECRET_ACCESS_KEY",
:logger => Logger.new("/dev/null")
)
open("downloaded.rb", "w") do |f|
s3.get("graysoftinc", "ruby/upload.rb") do |chunk|
f << chunk
end
end
Downloading a File
You can stream files to and from S3
30. #!/usr/bin/env ruby -KU
$VERBOSE = nil
require "rubygems"
require "aws" # sudo gem install aws
s3 = Aws::S3Interface.new(
"ACCESS_KEY_ID",
"SECRET_ACCESS_KEY",
:logger => Logger.new("/dev/null")
)
open("downloaded.rb", "w") do |f|
s3.get("graysoftinc", "ruby/upload.rb") do |chunk|
f << chunk
end
end
Downloading a File
You can stream files to and from S3
37. The Good
Scalable: effectively
“unlimited” storage
Reliable: 99.9%
guaranteed uptime and
very redundant
Inexpensive: rates for
GB in cents
Universal: everything
supports it
45. The Not-So-Good
Not quite worldly:
servers in the U.S.,
California, and Ireland
Simple, but not quite
curl/wget simple
46. The Not-So-Good
Not quite worldly:
servers in the U.S.,
California, and Ireland
Simple, but not quite
curl/wget simple
The service is
“eventually consistent”