Fake S3 for offline development and saving money
Curtis Spencer and colleagues at Spool developed a lightweight Fake S3 server that behaves like a real Amazon S3 and helps test projects without dropping data into the cloud or spending money on traffic. In addition, for testing, Fake S3 is more reliable because it works locally. Spencer says that thanks to Fake S3 they saved about $ 1,000 over the past month on traffic alone.
Installation
To start the server, you need to specify the host and port
Client Code Example
There is even the ability to emulate network conditions, for example, the maximum channel width.
This command will limit the bandwidth for GET requests to 50K / s per request.
Developers emphasize that their server is designed specifically for testing projects, and not for replacing S3. If you want to make an S3 replacement, they recommend using other tools for this: Ceph , ParkPlace (supports bitorrent), Boardwalk (S3 interface before MongoDB) and RiakCS .
Installation
gem install fakes3
To start the server, you need to specify the host and port
fakes3 -r /mnt/fakes3_root -p 4567
Client Code Example
require 'rubygems'
require 'aws/s3'
include AWS::S3
AWS::S3::Base.establish_connection!(:access_key_id => "123",
:secret_access_key => "abc",
:server => "localhost",
:port => "10001")
Bucket.create('mystuff')
('a'..'z').each do |filename|
S3Object.store(filename, 'Hello World', 'mystuff')
end
bucket = Bucket.find('mystuff')
bucket.objects.each do |s3_obj|
puts "#{s3_obj.key}:#{s3_obj.value}"
end
Bucket.delete("mystuff",:force => true) # Delete your bucket and all its keys
There is even the ability to emulate network conditions, for example, the maximum channel width.
fakes3 -r ~/fakes3_root -p 10001 --limit=50K
This command will limit the bandwidth for GET requests to 50K / s per request.
Developers emphasize that their server is designed specifically for testing projects, and not for replacing S3. If you want to make an S3 replacement, they recommend using other tools for this: Ceph , ParkPlace (supports bitorrent), Boardwalk (S3 interface before MongoDB) and RiakCS .