How to upload a file to the OpenAI assistant using an AWS S3 file path

full_path= r"s3://test/inputs/Q1-2021.pdf"

file = client.files.create(
file=open(full_path, “rb”),
purpose=‘assistants’,
)

getting bellow error:

OSError Traceback (most recent call last)
Cell In[61], line 4
1 full_path= r"s3://test/inputs/Q1-2021.pdf"
3 file = client.files.create(
----> 4 file=open(full_path, “rb”),
5 purpose=‘assistants’,
6 )

File ~\Anaconda3\envs\openai_1106\lib\site-packages\IPython\core\interactiveshell.py:286, in _modified_open(file, *args, **kwargs)
279 if file in {0, 1, 2}:
280 raise ValueError(
281 f"IPython won’t let you open fd={file} by default "
282 "as it is likely to crash IPython. If you know what you are doing, "
283 “you can use builtins’ open.”
284 )
→ 286 return io_open(file, *args, **kwargs)

OSError: [Errno 22] Invalid argument: ‘s3://test/inputs/Q1-2021.pdf’

Any suggestions will be highly appreciated. Thanks in advance.

Hello,
Did you you find how to do it?
Tanks