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

SignatureDoesNotMatch when putting file #9236

Open
1 task done
D0wn3r opened this issue Jan 20, 2025 · 4 comments
Open
1 task done

SignatureDoesNotMatch when putting file #9236

D0wn3r opened this issue Jan 20, 2025 · 4 comments
Labels
bug This issue is a bug. potential-regression Marking this issue as a potential regression to be checked by team member s3

Comments

@D0wn3r
Copy link

D0wn3r commented Jan 20, 2025

Describe the bug

Hi!
I have a machine with 0 problem with aws (aws-cli/1.27.47 Python/3.8.10 Linux/5.4.0-189-generic botocore/1.29.47) and this machine have the same config/cred but different aws cli version and OS version (aws-cli/1.37.1 Python/3.12.3 Linux/6.8.0-51-generic botocore/1.36.1)

On the machine with the latest aws cli, I have a problem of SignatureDoesNotMatch when I put file on my s3 (with aws s3 cp)

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

To cp my file without issue

Current Behavior

Error SignatureDoesNotMatch when aws s3 cp

Reproduction Steps

Put the same version as me and aws s3 cp a file with enough cred

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/1.37.1 Python/3.12.3 Linux/6.8.0-51-generic botocore/1.36.1

Environment details (OS name and version, etc.)

Ubuntu 24.04

@D0wn3r D0wn3r added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 20, 2025
@D0wn3r
Copy link
Author

D0wn3r commented Jan 20, 2025

With --debug, I have this

2025-01-20 11:17:27,897 - ThreadPoolExecutor-0_0 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <function _update_status_code at 0x7ee20cc3afc0>
2025-01-20 11:17:27,897 - ThreadPoolExecutor-0_0 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <botocore.retryhandler.RetryHandler object at 0x7ee20b7f6930>
2025-01-20 11:17:27,898 - ThreadPoolExecutor-0_0 - botocore.retryhandler - DEBUG - No retry needed.
2025-01-20 11:17:27,898 - ThreadPoolExecutor-0_0 - botocore.hooks - DEBUG - Event needs-retry.s3.PutObject: calling handler <bound method S3RegionRedirectorv2.redirect_from_error of <botocore.utils.S3RegionRedirectorv2 object at 0x7ee20b7f6660>>
2025-01-20 11:17:27,898 - ThreadPoolExecutor-0_0 - botocore.hooks - DEBUG - Event after-call.s3.PutObject: calling handler <function enhance_error_msg at 0x7ee20c379c60>
2025-01-20 11:17:27,899 - ThreadPoolExecutor-0_0 - s3transfer.tasks - DEBUG - Exception raised.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/s3transfer/tasks.py", line 135, in __call__
    return self._execute_main(kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/s3transfer/tasks.py", line 158, in _execute_main
    return_value = self._main(**kwargs)
                   ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/s3transfer/upload.py", line 796, in _main
    client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
  File "/usr/local/lib/python3.12/dist-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/botocore/client.py", line 1023, in _make_api_call
    raise error_class(parsed_response, operation_name)

If it can help

@D0wn3r
Copy link
Author

D0wn3r commented Jan 20, 2025

with aws-cli/1.36.0 Python/3.12.3 Linux/6.8.0-51-generic botocore/1.35.59 it works fine so it's a regession

@github-actions github-actions bot added the potential-regression Marking this issue as a potential regression to be checked by team member label Jan 20, 2025
@Terminator100500
Copy link

An error occurred (SignatureDoesNotMatch) when calling the PutObject operation: The request signature we calculated does not match the signature you provided. Check your key and signing method

I had the same problem, fixed by using previously version awscliv2...

@finndev
Copy link

finndev commented Jan 21, 2025

Same issue here:

aws-cli/2.23.2 Python/3.12.6 Linux/6.8.0-51-generic exe/x86_64.ubuntu.24
2025-01-21 02:56:17,174 - ThreadPoolExecutor-0_0 - s3transfer.tasks - DEBUG - Exception raised.
Traceback (most recent call last):
  File "awscli/s3transfer/tasks.py", line 139, in __call__
  File "awscli/s3transfer/tasks.py", line 162, in _execute_main
  File "awscli/s3transfer/upload.py", line 798, in _main
  File "awscli/botocore/client.py", line 364, in _api_call
  File "awscli/botocore/client.py", line 733, in _make_api_call
  File "awscli/botocore/hooks.py", line 228, in emit
  File "awscli/botocore/hooks.py", line 211, in _emit
  File "awscli/customizations/s3errormsg.py", line 39, in enhance_error_msg
  File "awscli/customizations/s3errormsg.py", line 57, in _is_sigv4_error_message
TypeError: argument of type 'NoneType' is not iterable
2025-01-21 02:56:17,175 - ThreadPoolExecutor-0_0 - s3transfer.utils - DEBUG - Releasing acquire 0/None
upload failed: ./test.txt to s3://redacted/test.txt argument of type 'NoneType' is not iterable

Solution available in #9214

@khushail khushail added s3 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. potential-regression Marking this issue as a potential regression to be checked by team member s3
Projects
None yet
Development

No branches or pull requests

4 participants