AWS S3 Directory#

Amazon Simple Storage Service (Amazon S3) is an object storage service

This covers how to load document objects from an AWS S3 Directory object.

#!pip install boto3
from langchain.document_loaders import S3DirectoryLoader
loader = S3DirectoryLoader("testing-hwc")

Specifying a prefix#

You can also specify a prefix for more finegrained control over what files to load.

loader = S3DirectoryLoader("testing-hwc", prefix="fake")
[Document(page_content='Lorem ipsum dolor sit amet.', lookup_str='', metadata={'source': '/var/folders/y6/8_bzdg295ld6s1_97_12m4lr0000gn/T/tmpujbkzf_l/fake.docx'}, lookup_index=0)]