Giter Club home page Giter Club logo

Comments (12)

jubos avatar jubos commented on September 4, 2024

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.

jubos avatar jubos commented on September 4, 2024

Actually you might be able to do it by overriding their dns hostnames by using dnsmasq or /etc/hosts.

from fake-s3.

ksheurs avatar ksheurs commented on September 4, 2024

ooh great idea with using /etc/hosts! let me try..

from fake-s3.

ksheurs avatar ksheurs commented on September 4, 2024

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.

dreamr avatar dreamr commented on September 4, 2024

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.

kitop avatar kitop commented on September 4, 2024

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.

cjc343 avatar cjc343 commented on September 4, 2024

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.

ddossot avatar ddossot commented on September 4, 2024

This is documented enough IMO. FWW I have no trouble using fake-s3 with AWS SDK. Consider closing.

from fake-s3.

LinusU avatar LinusU commented on September 4, 2024

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.

gabrielle27 avatar gabrielle27 commented on September 4, 2024

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.

cesarandreu avatar cesarandreu commented on September 4, 2024

About a month ago I added an example to the wiki, for any future searchers.

from fake-s3.

pickhardt avatar pickhardt commented on September 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.