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

Cv2 4126 video #54

Merged
merged 14 commits into from
Feb 22, 2024
Merged

Cv2 4126 video #54

merged 14 commits into from
Feb 22, 2024

Conversation

DGaffney
Copy link
Collaborator

No description provided.

from lib.logger import logger
def upload_file_to_s3(bucket: str, filename: str):
"""
Generic upload helper for s3. Could be moved over to helpers folder...
"""
s3_url = os.getenv('S3_ENDPOINT')
access_key = os.getenv('AWS_ACCESS_KEY_ID')
Copy link
Contributor

Choose a reason for hiding this comment

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

In timpani, we did access using the roles, vs access key, so maybe this is not needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll let @sonoransun weigh in on this - this is how I've usually done this sort of thing, but maybe its not needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FWIW I would prefer leaving it this way as currently written as it interfaces nicely with minio locally - no biggie if that's a problem though!

lib/s3.py Outdated
else:
# Other errors like permissions issues
logger.error(f'Error in accessing bucket {bucket}: {e}, {bucket} {filename}')
return
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this still raise the error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair enough - I'll raise

@DGaffney DGaffney merged commit 735836f into master Feb 22, 2024
2 checks passed
@DGaffney DGaffney mentioned this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants