Comments (12)
I want to add support for this. It might be easiest by supplying some sort of monkey patch to aws-sdk to allow it, but that is not ideal.
from fake-s3.
Actually you might be able to do it by overriding their dns hostnames by using dnsmasq or /etc/hosts.
from fake-s3.
ooh great idea with using /etc/hosts! let me try..
from fake-s3.
i tried adding a /etc/resolver/s3.amazonaws.com file with nameserver 127.0.0.1 and port 10001 but it seems to just hang when i ping the domain after. any ideas?
this is the method http://pow.cx/ uses to route all 'dev' top level domains to localhost:20560.
from fake-s3.
I am looking into this. you can pass in s3_endpoint (used to be :server) and :s3_port (was :port) in a config yml.
However, it is timing out for me. I'll report back when I know more.
from fake-s3.
It would be nice to see a workaround for this.
s3_endpoint and s3_host is giving me timeout also.
Anyone found something else?
from fake-s3.
I added a snippet to the "Supported Clients" page showing how to set this up. The major caveat is DNS entries/redirects.
If you have set your s3_endpoint
to myfakes3.local
and you wish to push data to a bucket named bucket
then the host bucket.myfakes3.local
should be defined. For myself, the easiest way to take care of this was to make DNS entries for fakes3.domain.tld
and *.fakes3.domain.tld
and set my s3_endpoint
to fakes3.domain.tld
. This lets me use any bucket name without worrying about creating new hosts/resolver entries, but requires some existing infrastructure to set up.
from fake-s3.
This is documented enough IMO. FWW I have no trouble using fake-s3 with AWS SDK. Consider closing.
from fake-s3.
This is how I connect to fake-s3 inside a docker container. The thing to take extra note of is s3ForcePathStyle: true
which makes specifying an ip in the endpoint
okay, since it force the use of http://host:port/bucket-name/...
instead of http://bucket-name.host:port/...
.
return new AWS.S3({
apiVersion: '2006-03-01',
sslEnabled: false,
accessKeyId: 'x',
secretAccessKey: 'x',
endpoint: resolveEnv('http://$S3_PORT_4569_TCP_ADDR:$S3_PORT_4569_TCP_PORT'),
s3ForcePathStyle: true
});
from fake-s3.
I was running into the timeout issue as well. I thought it was aws-sdk, but it was a problem in my paperlip config. The paperclip initializer expects s3_host_name
instead of s3_endpoint
.
from fake-s3.
About a month ago I added an example to the wiki, for any future searchers.
from fake-s3.
Closing because this is being discussed in multiple places, and this particular discussion is old.
For future reference, it should work if you spoof your /etc/hosts to point s3.amazonaws.com to localhost, and make sure you're using the latest versions of Fake S3 and the aws-sdk. If it doesn't, please open a new issue with an example of what you tried.
from fake-s3.
Related Issues (20)
- [Feature] Add support of payer option, to allow usage with ansible s3_bucket library
- fakes3 error
- [Bug] Error message "undefined method `gsub' for nil:NilClass" when attempting to store something.
- [Bug] Multipart Upload Fails for Large Files
- Incorrect behavior when using Prefix HOT 1
- [Other] LoadError: load error: jopenssl/load -- java.lang.IncompatibleClassChangeError: Implementing class
- [Bug] X-Amz-Content-Sha256 is not allowed for upload
- [Feature] Multipart upload more descriptive error message for uploading one part HOT 2
- License timebomb should be a major version HOT 3
- [Question] Next release? HOT 1
- [Feature] Support GET Bucket requestPayment
- [QUESTION] Where I can find the CI service? HOT 1
- [Bug] Deleting "fake" directories
- [Bug] Licensing does not work for certain valid email addresses HOT 5
- [Bug] Cannot upload files with size > 2GB
- [Question]: Are files actually created when uploading or is file creation simulated?
- [Bug] Prevent directory traversal
- "rake test_sever" not working in windows. is there any way to resolve this ? HOT 1
- Ruby 3.1 compatibility HOT 1
- [Feature] Support for AWS v3 SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fake-s3.