If your bucket name contains one or more periods and it
is hosted in a non-US region, you should make requests
against the bucket using the S3 endpoint specific to the
region in which your bucket resides. For example:

The
location where the bucket should be created. Defaults to
the classic US region; however, if you configure a regional
endpoint for Amazon S3 this option will default to the
appropriate location constraint for the endpoint. For
example:

# File 'lib/aws/s3/bucket_collection.rb', line 91defcreatebucket_name,options={}# convert the symbolized-canned acl into the string version
ifacl=options[:acl]options[:acl]=acl.to_s.tr('_','-')end# 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,
unlessconfig.s3_endpoint=='s3.amazonaws.com'oroptions[:location_constraint]thenconstraint=guess_constraintoptions[:location_constraint]=constraintifconstraintendclient.create_bucket(options.merge(:bucket_name=>bucket_name))bucket_named(bucket_name)end