# S3 File or Directory Loader
This loader parses any file stored on S3, or the entire Bucket (with an optional prefix filter) if no particular file is specified. When initializing `S3Reader`, you may pass in your [AWS Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html). If none are found, the loader assumes they are stored in `~/.aws/credentials`.
All files are parsed with `SimpleDirectoryReader`. Hence, you may also specify a custom `file_extractor`, relying on any of the loaders in this library (or your own)!
## Installation
```bash
pip install llama-index-readers-s3
```
## Usage
To use this loader, you need to pass in the name of your S3 Bucket. After that, if you want to just parse a single file, pass in its key. Note that if the file is nested in a subdirectory, the key should contain that, so like `subdirectory/input.txt`.
Otherwise, you may specify a prefix if you only want to parse certain files in the Bucket, or a subdirectory. AWS Access Key credentials may either be passed in during initialization or stored locally (see above).
```python
loader = S3Reader(
bucket="scrabble-dictionary",
key="dictionary.txt",
aws_access_id="[ACCESS_KEY_ID]",
aws_access_secret="[ACCESS_KEY_SECRET]",
)
documents = loader.load_data()
```
This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-readers-s3",
"maintainer": "thejessezhang",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "amazon web services, aws s3, bucket",
"author": null,
"author_email": "Your Name <you@example.com>",
"download_url": "https://files.pythonhosted.org/packages/e8/f6/82e325604d941d13871d591e966b33c4606618470519d26d56963dc5f82a/llama_index_readers_s3-0.5.0.tar.gz",
"platform": null,
"description": "# S3 File or Directory Loader\n\nThis loader parses any file stored on S3, or the entire Bucket (with an optional prefix filter) if no particular file is specified. When initializing `S3Reader`, you may pass in your [AWS Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html). If none are found, the loader assumes they are stored in `~/.aws/credentials`.\n\nAll files are parsed with `SimpleDirectoryReader`. Hence, you may also specify a custom `file_extractor`, relying on any of the loaders in this library (or your own)!\n\n## Installation\n\n```bash\npip install llama-index-readers-s3\n```\n\n## Usage\n\nTo use this loader, you need to pass in the name of your S3 Bucket. After that, if you want to just parse a single file, pass in its key. Note that if the file is nested in a subdirectory, the key should contain that, so like `subdirectory/input.txt`.\n\nOtherwise, you may specify a prefix if you only want to parse certain files in the Bucket, or a subdirectory. AWS Access Key credentials may either be passed in during initialization or stored locally (see above).\n\n```python\nloader = S3Reader(\n bucket=\"scrabble-dictionary\",\n key=\"dictionary.txt\",\n aws_access_id=\"[ACCESS_KEY_ID]\",\n aws_access_secret=\"[ACCESS_KEY_SECRET]\",\n)\ndocuments = loader.load_data()\n```\n\nThis loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/).\n",
"bugtrack_url": null,
"license": null,
"summary": "llama-index readers s3 integration",
"version": "0.5.0",
"project_urls": null,
"split_keywords": [
"amazon web services",
" aws s3",
" bucket"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ccf4aea3f89d8b1ed644fdeb51ba9b6d192e1067473dc5aa26d6db10c25c757f",
"md5": "40e269d1ea80eab4a96ab132bc51b59a",
"sha256": "2724f5de0e5e0b834821845cb993d27a3a6b3789209753fb07da9f352094d01f"
},
"downloads": -1,
"filename": "llama_index_readers_s3-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "40e269d1ea80eab4a96ab132bc51b59a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 5373,
"upload_time": "2025-07-31T02:38:53",
"upload_time_iso_8601": "2025-07-31T02:38:53.679652Z",
"url": "https://files.pythonhosted.org/packages/cc/f4/aea3f89d8b1ed644fdeb51ba9b6d192e1067473dc5aa26d6db10c25c757f/llama_index_readers_s3-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e8f682e325604d941d13871d591e966b33c4606618470519d26d56963dc5f82a",
"md5": "2b148ea75585551fd1fb1768feef523b",
"sha256": "df0cf17ca930842e187d460f05afd72aa21943accb801f5248747ebcf870cce0"
},
"downloads": -1,
"filename": "llama_index_readers_s3-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "2b148ea75585551fd1fb1768feef523b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 5885,
"upload_time": "2025-07-31T02:38:54",
"upload_time_iso_8601": "2025-07-31T02:38:54.691066Z",
"url": "https://files.pythonhosted.org/packages/e8/f6/82e325604d941d13871d591e966b33c4606618470519d26d56963dc5f82a/llama_index_readers_s3-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 02:38:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-readers-s3"
}