-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
boto3 Region: Frankfurt - botocore.exceptions.ClientError #983
Comments
If I change the bucket to Seems like a Europe only issue. Does anyone know how to solve this? |
Frankfurt only supports For some reason that environment you have is defaulting to You can force it to use |
I see, don't know why that is. I haven't changed a single value. I just installed boto3==1.4.4 with pip.
But I will and fix it. |
Guys, i'm having the same error using exactly this sample code from the docs. All libs are up to date. My python code is: AWS_ACCESS_KEY_ID = '...'
AWS_SECRET_ACCESS_KEY = '...'
AWS_STORAGE_BUCKET_NAME = 'my_bucket'
AWS_AUTO_CREATE_BUCKET = False
AWS_S3_REGION_NAME = 'eu-central-1'
AWS_QUERYSTRING_AUTH = True
AWS_S3_FILE_OVERWRITE = True
AWS_S3_HOST = 's3.eu-central-1.amazonaws.com'
AWS_S3_CUSTOM_DOMAIN = '{bucket}.s3.amazonaws.com'.format(bucket=AWS_STORAGE_BUCKET_NAME)
AWS_LOCATION = ''
AWS_S3_SIGNATURE_VERSION = 's3v4'
S3_USE_SIGV4 = True
os.environ['S3_USE_SIGV4'] = 'True'
#### TEST
from botocore.signers import CloudFrontSigner
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import padding
# First you create a cloudfront signer based on a normalized RSA signer::
def rsa_signer(message):
with open('config/pk-cloudfront.pem', 'rb') as key_file:
private_key = serialization.load_pem_private_key(
key_file.read(),
password=None,
backend=default_backend()
)
signer = private_key.signer(padding.PKCS1v15(), hashes.SHA1())
signer.update(message)
return signer.finalize()
key_id = '...'
cf_signer = CloudFrontSigner(key_id, rsa_signer)
# To sign with a canned policy::
import datetime
signed_url = cf_signer.generate_presigned_url(
'...', date_less_than=datetime.datetime(2020, 12, 1))
print(signed_url) My [default]
output = json
region = eu-central-1
s3 =
signature_version = s3v4 This post says that the issue can't be solved on the code side. Is there a solution? |
I'm using boto3 / django-storages together with Heroku, but when I deploy the app I get this AWS4-HMAC-SHA256 error:
requirements.txt
How do I fix this?
Full build log:
The text was updated successfully, but these errors were encountered: