# File lib/aws/s3/bucket_collection.rb, line 79 def create bucket_name, options = {} # auto set the location constraint for the user if it is not # passed in and the endpoint is not the us-standard region. don't # override the location constraint though, even it is wrong, unless config.s3_endpoint == 's3.amazonaws.com' or options[:location_constraint] then constraint = case config.s3_endpoint when 's3-eu-west-1.amazonaws.com' then 'EU' when /^s3-(.*)\.amazonaws\.com$/ then $1 end options[:location_constraint] = constraint if constraint end client.create_bucket(options.merge(:bucket_name => bucket_name)) bucket_named(bucket_name) end