terricain / aioboto3

Wrapper to use boto3 resources with the aiobotocore async backend
Apache License 2.0
719 stars 74 forks source link

S3 ChecksumAlgorithm #265

Closed notmeta closed 2 years ago

notmeta commented 2 years ago

Description

S3's new ChecksumAlgorithm doesn't seem to be implemented within aioboto3.

What I Did

async with session.client('s3') as s3_client:
    with open('my_file', 'rb') as data:
        await s3_client.put_object(Bucket="bucket_name", Body=data, Key="my_file", ChecksumAlgorithm="SHA256")  # works without ChecksumAlgorithm

Stacktrace

This also happens using upload_fileobj and passing 'ChecksumAlgorithm': 'SHA256' in ExtraArgs, although with a different stacktrace

The equivalent operations using boto3 work just fine, I suspect the new functionality just hasn't been implemented on aioboto3's side despite dependencies being updated.

terricain commented 2 years ago

So upload/download fileobj are custom functions replicating S3Transfer's sync stuff. put_object on the other hand I would have expected to work. I suspect aiobotocore needs to be updated here, I'll have a look.

terricain commented 2 years ago

Will move this to aiobotocore, as that needs to support this. Will have a look if its an easy fix there though.