From 8ad3ab23285a2865a0e1455081a5ece5e8104c7a Mon Sep 17 00:00:00 2001 From: Igor Ilic Date: Wed, 10 Sep 2025 15:06:37 +0200 Subject: [PATCH] fix: Allow S3 usage without token --- .env.template | 10 ++++++++++ cognee/infrastructure/files/storage/S3FileStorage.py | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.env.template b/.env.template index 28980de74..b90ad7525 100644 --- a/.env.template +++ b/.env.template @@ -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 ------------------------------- diff --git a/cognee/infrastructure/files/storage/S3FileStorage.py b/cognee/infrastructure/files/storage/S3FileStorage.py index 078d5fe2a..4284dcac2 100644 --- a/cognee/infrastructure/files/storage/S3FileStorage.py +++ b/cognee/infrastructure/files/storage/S3FileStorage.py @@ -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,