Trouble using langchain doc loaders in AWS Sagemaker nbks

I am trying to build a custom-knowledge GPT-based chatbot for my company. To augment the knowledge base of the GPT chatbot with my custom data, I am using langchain’s S3DirectoryLoader to load the PDF and Word files containing all the information. While my code is working perfectly fine in my local Jupyter notebook, I am getting a FileNotFoundError when running the same code in AWS SageMaker.

Here is the code:

from langchain.document_loaders import S3DirectoryLoader
loader = S3DirectoryLoader("chatbotknowledgebase2")
loader.load()

This is the error I am getting when I run this code: