Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to use local folder as mocked S3? #8362

Open
HWiese1980 opened this issue Dec 4, 2024 · 1 comment
Open

Possible to use local folder as mocked S3? #8362

HWiese1980 opened this issue Dec 4, 2024 · 1 comment
Labels

Comments

@HWiese1980
Copy link

Just a quick question: is it possible to specify a local folder to be used as a S3 bucket mock?

Currently I'm uploading the files in the folder itertatively to the mocked S3 bucket, but it's tedious and takes time because there are so many. I would like to just tell Moto to serve the folder as contents of the mocked S3 bucket.

@bblommers
Copy link
Collaborator

Hi @HWiese1980, no, that is not possible. S3 objects that are 'uploaded' are kept in memory (except for very large files), and are closely tied to the metadata, so it's not possible to simply point to a folder on disk.

The question has come up before, and I shared an example how you could use the internal API to upload S3 files for better performance:
#7226 (comment)

The caveats mentioned there before still exist - it's an internal API, so it may break without warning, and will not work when running the MotoServer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants