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

Error "A header you provided implies functionality that is not implemented." with boto3 1.36 #765

Open
sdiemer opened this issue Jan 22, 2025 · 2 comments

Comments

@sdiemer
Copy link

sdiemer commented Jan 22, 2025

Hello,

Since the release 1.36 of boto3, we are not able to use s3proxy for at least the put_object and delete_objects API calls.
In the examples below, the version 1.36.3 of boto3 was used.

The errors are:

put_object:

  File "/opt/src/tests/unit/storage/conftest.py", line 218, in object_storage_dir
    client.put_object(Bucket=bucket, Key=f'resources/{name}/file.txt', Body=b'Test content')
  File "/opt/venv/lib/python3.11/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/botocore/client.py", line 1023, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (NotImplemented) when calling the PutObject operation:
A header you provided implies functionality that is not implemented.

delete_objects:

  File "/opt/src/tests/unit/storage/conftest.py", line 266, in _delete_files
    client.delete_objects(Bucket=bucket, Delete={'Objects': [{'Key': key1}, {'Key': key2}], 'Quiet': True})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.11/site-packages/botocore/client.py", line 1023, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (NotImplemented) when calling the DeleteObjects operation:
A header you provided implies functionality that is not implemented.

The client was defined as follows:

    client = boto3.client(
        's3',
        aws_access_key_id='remote-identity',
        aws_secret_access_key='remote-credential',
        endpoint_url='s3-dev-bucket',
        region_name='us-east-1')

From what I have found, the problem is caused by this change:
boto/boto3#4392

Regards

@sdiemer
Copy link
Author

sdiemer commented Jan 22, 2025

PS:

I tried to add this configuration to avoid the problem;

    s3_config = Config(
        request_checksum_calculation='when_required',
        response_checksum_validation='when_required',
    )
    client = boto3.client(
        's3',
        aws_access_key_id='remote-identity',
        aws_secret_access_key='remote-credential',
        endpoint_url='s3-dev-bucket',
        region_name='us-east-1',
        config=s3_config,
    )

It solves the put_object API call but not the delete_objects one.

@gaul
Copy link
Owner

gaul commented Jan 22, 2025

Partially overlaps with #760.

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

2 participants