具有正确密钥和算法的S3的boto3密钥错误

时间:2017-02-09 08:11:54

标签: python amazon-s3 boto3 aws-kms

我有以下模块:

def get_details(N, bucket_path):

    s3 = boto3.resource('s3')
    files = recent_N(str(N), bucket_path)
    bucket = s3.Bucket(bucket_path)

    for obj in bucket.objects.all():
        key = obj.key
        if key in files:
            body = obj.get(SSECustomerAlgorithm='AES256', SSECustomerKey='')['Body'].read()
            s3.Bucket('bucket_2').put_object(Key=key, Body=body)

我一直收到以下错误:

botocore.exceptions.ClientError: An error occurred (InvalidRequest) when calling the GetObject operation: The encryption parameters are not applicable to this object.

我做错了什么吗?

Boto版本:boto3==1.4.4

PS:是的,关键是正确的。我多次检查过。

0 个答案:

没有答案