fix: Allow S3 usage without token
This commit is contained in:
parent
b137d680e2
commit
8ad3ab2328
2 changed files with 11 additions and 5 deletions
|
|
@ -155,6 +155,16 @@ LITELLM_LOG="ERROR"
|
|||
# DEFAULT_USER_EMAIL=""
|
||||
# DEFAULT_USER_PASSWORD=""
|
||||
|
||||
################################################################################
|
||||
# 📂 AWS Settings
|
||||
################################################################################
|
||||
|
||||
#AWS_REGION=""
|
||||
#AWS_ENDPOINT_URL=""
|
||||
#AWS_ACCESS_KEY_ID=""
|
||||
#AWS_SECRET_ACCESS_KEY=""
|
||||
#AWS_SESSION_TOKEN=""
|
||||
|
||||
------------------------------- END OF POSSIBLE SETTINGS -------------------------------
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,11 +21,7 @@ class S3FileStorage(Storage):
|
|||
def __init__(self, storage_path: str):
|
||||
self.storage_path = storage_path
|
||||
s3_config = get_s3_config()
|
||||
if (
|
||||
s3_config.aws_access_key_id is not None
|
||||
and s3_config.aws_secret_access_key is not None
|
||||
and s3_config.aws_session_token is not None
|
||||
):
|
||||
if s3_config.aws_access_key_id is not None and s3_config.aws_secret_access_key is not None:
|
||||
self.s3 = s3fs.S3FileSystem(
|
||||
key=s3_config.aws_access_key_id,
|
||||
secret=s3_config.aws_secret_access_key,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue