{"id":27115,"library":"llama-index-readers-s3","title":"LlamaIndex S3 Reader","description":"A reader for loading documents from AWS S3 into LlamaIndex. Supports both individual files and entire buckets with glob/filter patterns. Current version: 0.6.1, requires Python >=3.10, <4.0. Release cadence is irregular; part of LlamaIndex's modular reader ecosystem.","status":"active","version":"0.6.1","language":"python","source_language":"en","source_url":"https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-s3","tags":["llama-index","s3","reader","aws"],"install":[{"cmd":"pip install llama-index-readers-s3","lang":"bash","label":"Default installation"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"S3Reader","correct":"from llama_index.readers.s3 import S3Reader"}],"quickstart":{"code":"import os\nfrom llama_index.readers.s3 import S3Reader\n\n# Configure AWS credentials via env vars or IAM role\n# os.environ['AWS_ACCESS_KEY_ID'] = 'your-key'\n# os.environ['AWS_SECRET_ACCESS_KEY'] = 'your-secret'\n\nreader = S3Reader(\n    bucket=\"my-bucket\",\n    key=\"path/to/file.pdf\",\n    aws_access_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n    aws_access_secret=os.environ.get('AWS_SECRET_ACCESS_KEY', ''),\n)\ndocuments = reader.load_data()\nprint(f\"Loaded {len(documents)} document(s)\")","lang":"python","description":"Minimal example: load a single file from S3 using explicit AWS credentials (or leave empty for IAM roles)."},"warnings":[{"fix":"Use `S3FilesReader` from `llama_index.readers.s3` if available, or pass a prefix via `key` (e.g., 'data/') and set `recursive=True`.","message":"To load multiple files (e.g., all PDFs in a prefix), you must use `S3Reader` with `key` omitted and optionally `file_extractor` or a filter. The `s3_reader` module also provides `S3FilesReader`? Check docs: as of 0.6.x, `S3Reader` with `key` as a pattern or directory prefix may not work; prefer `S3FilesReader` or manual iteration.","severity":"gotcha","affected_versions":">=0.6.0"},{"fix":"Set `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` env vars even for public buckets, or use boto3's `Config` with `signature_version=UNSIGNED` before instantiating reader.","message":"Credentials are required even for public buckets? `S3Reader` does not automatically assume anonymous access. If your bucket is public, you still need to provide dummy credentials or set `anon=True`? The constructor does not have `anon` parameter. Workaround: configure boto3 session manually via environment variables or pass dummy keys.","severity":"gotcha","affected_versions":"all"},{"fix":"Import from `llama_index.readers.s3.S3Reader`; if removed, use `llama_index`'s `SimpleDirectoryReader` with S3 URI support.","message":"The `llama-index-readers-s3` package may be merged into `llama-index` core or replaced by a new reader interface. Check for deprecation warnings in logs.","severity":"deprecated","affected_versions":">=0.6.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install llama-index-readers-s3`.","cause":"The package `llama-index-readers-s3` is not installed.","error":"ModuleNotFoundError: No module named 'llama_index.readers.s3'"},{"fix":"Set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, or configure IAM role / ~/.aws/credentials.","cause":"AWS credentials not provided. S3Reader requires valid AWS credentials.","error":"botocore.exceptions.NoCredentialsError: Unable to locate credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}