Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object_storage: remove access denied warning for s3 buckets #162

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rohmu/object_storage/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ def check_or_create_bucket(self) -> None:
if status_code == HTTPStatus.MOVED_PERMANENTLY:
raise InvalidConfigurationError(f"Wrong region for bucket {self.bucket_name}, check configuration")
elif status_code == HTTPStatus.FORBIDDEN:
self.log.warning("Access denied on bucket check, assuming write permissions")
# Access denied on bucket check, most likely due to missing s3:ListBucket, assuming write permissions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Access denied on bucket check, most likely due to missing s3:ListBucket, assuming write permissions
# Access denied on bucket check, most likely due to missing s3:ListBucket, assuming we have write permissions

pass
elif status_code in {HTTPStatus.BAD_REQUEST, HTTPStatus.NOT_FOUND}:
create_bucket = True
else:
Expand Down
Loading