Skip to content

Commit 5461d12

Browse files
committed
fix signature version
1 parent 0d2640a commit 5461d12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ocrworker/s3.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import uuid
22
import logging
33
import boto3
4+
from botocore.client import Config
45
import asyncio
56
from httpx import AsyncClient
67

@@ -33,7 +34,8 @@ def get_client() -> BaseClient:
3334
aws_secret_access_key=settings.aws_secret_access_key,
3435
region_name=settings.aws_region_name,
3536
)
36-
client = session.client("s3")
37+
# https://stackoverflow.com/questions/26533245/the-authorization-mechanism-you-have-provided-is-not-supported-please-use-aws4 # noqa
38+
client = session.client("s3", config=Config(signature_version="s3v4"))
3739

3840
return client
3941

0 commit comments

Comments
 (0)