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

The provided 'x-amz-content-sha256' header does not match what was computed #1

Open
axtrace opened this issue Jan 29, 2025 · 0 comments

Comments

@axtrace
Copy link

axtrace commented Jan 29, 2025

Добры день! Скопировал файл main.py в функцию. Настроил хранилище и сервисный аккаунт как описано (даже выдал ему админские права на каталоге), но при вызове функции возникает ошибка:

Object upload failed: An error occurred (XAmzContentSHA256Mismatch) when calling the PutObject operation: The provided 'x-amz-content-sha256' header does not match what was computed.

Возникает в момент вызова этой функции

def write_process_status(key, data):
    json_data = json.dumps(data)
    try:
        s3.put_object(Bucket=config['s3_bucket'], Key=key, Body=json_data)
        logging.info("Object process status was written: {}".format(key))
        return True
    except ClientError as e:
        logging.error("Object upload failed: {}".format(e))
        return None

Не подскажете, в чем может быть дело? Это на моей стороне ошибка или в скрипте?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant