Fake S3 for offline development and saving money

Curtis Spencer (Curtis Spencer) with colleagues from the Spool, the company has developed a lightweight server Fake S3, which behaves like a real Amazon S3 and helps you test your projects, not chasing data to the cloud and not spending money on traffic. Besides, for testing Fake S3 is safer, because it works locally. Spencer said that the Fake S3 they saved about $1000 in the last month alone, the traffic payment.

/ > Installation

the
gem install fakes3

To start the server you need to specify the host and port

the
fakes3 -r /mnt/fakes3_root -p 4567

Example client code

the
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 a possibility to emulate network conditions, for example, the maximum width of the channel.

the
fakes3 -r ~/fakes3_root -p 10001 --limit=50K

This command will limit the bandwidth for GET requests stripe 50K/s for each query.

The developers emphasize that their server is intended for testing, not to replace S3. If you want to replace the S3, then they rekomenduyut to use other tools: Ceph, ParkPlace (supports bitorrent), Boardwalk (interface S3 before MongoDB) and RiakCS.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Car navigation in detail

PostgreSQL: Analytics for DBA

Google has launched an online training course advanced search