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

S3 upload logs script doesn't support IRSA #994

Open
v-novytskyi opened this issue Apr 29, 2024 · 1 comment
Open

S3 upload logs script doesn't support IRSA #994

v-novytskyi opened this issue Apr 29, 2024 · 1 comment

Comments

@v-novytskyi
Copy link

boto library does not support IRSA authentication, logs are not loaded into the bucket:

Traceback (most recent call last):
  File "/scripts/upload_pg_log_to_s3.py", line 111, in <module>
    main()
  File "/scripts/upload_pg_log_to_s3.py", line 102, in main
    if upload_to_s3(compressed_log):
  File "/scripts/upload_pg_log_to_s3.py", line 43, in upload_to_s3
    conn = boto.connect_s3(host=os.getenv('LOG_AWS_HOST'))
  File "/usr/lib/python3/dist-packages/boto/__init__.py", line 141, in connect_s3
    return S3Connection(aws_access_key_id, aws_secret_access_key, **kwargs)
  File "/usr/lib/python3/dist-packages/boto/s3/connection.py", line 188, in __init__
    super(S3Connection, self).__init__(host,
  File "/usr/lib/python3/dist-packages/boto/connection.py", line 568, in __init__
    self._auth_handler = auth.get_auth_handler(
  File "/usr/lib/python3/dist-packages/boto/auth.py", line 1018, in get_auth_handler
    raise boto.exception.NoAuthHandlerFound(
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

After upgrade script for using boto3 library script started to work.
Can you update the script for using the boto3?

@v-novytskyi
Copy link
Author

Okay, after deploying last version with boto3 script works but only manually. It not upload log automatically

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

No branches or pull requests

1 participant