Open maheshmadhusudanan opened 4 years ago
Hey I am getting a similar error. I've setup a config and credentials file in the default path ~/.aws/files, but still didn't work.
Possibly, packaged botocore version 1.14.8 has got too old?
After a Zappa redeployment in another region, I am getting now this message in the zappa tail
:
botocore.exceptions.SSLError: SSL validation failed for https://sts.amazonaws.com/ [Errno 2] No such file or directory
Further observations so far:
I will try to deploy back to previous region, theoretically environments could differ. UPD: same issue on previous region.
Assumption: AWS has updated Lambda execution environment which triggers that botocore bug.
This seems to provide a temporary Fix
I have the same error with command: zappa manage development "collectstatic --noinput"
using django-storages.... very weird stuff
I have the same error with command:
zappa manage development "collectstatic --noinput"
using django-storages.... very weird stuff
Check out this StackOverflow answer https://github.com/Miserlou/Zappa/issues/2127#issuecomment-683217734
@jaywonder20 I saw that... In fact, I changed that part in my code with no solution yet
boto3.client('s3', verify=False, config=Config(signature_version='s3v4'))
@adosaa did you copy the cacert.pem file and set the REQUESTS_CA_BUNDLE
environment variable
Yep it's works @jaywonder20 ! putting cacert.pem in the root of the project and pointing it with the env. variable, a bit ugly but functional.
Great @adosaa it a bit ugly but that's a workaround until a better option is found
I tried the solution they propose but it gives me the following error:
[ERROR] ClientError: An error occurred (InvalidToken) when calling the PutObject operation: The provided token is malformed or otherwise invalid
.
This is my condig:
{
"dev": {
"aws_region": "us-east-1",
"django_settings": "my_app.settings",
"profile_name": "default",
"project_name": "my_app",
"runtime": "python3.8",
"s3_bucket": "zappa-my_app",
"environment_variables": {
"USE_S3": "TRUE",
"AWS_ACCESS_KEY_ID": "***",
"AWS_SECRET_ACCESS_KEY": "***",
"AWS_STORAGE_BUCKET_NAME": "my_app",
"REQUESTS_CA_BUNDLE": "/var/task/cacert.pem"
}
}
}
Also experiencing a similar issue with Zappa 0.51.0 and python 3.6:
botocore.exceptions.SSLError: SSL validation failed for https://secretsmanager.us-east-1.amazonaws.com/ [Errno 2] No such file or directory
[packages] boto3 = "==1.16.7" botocore = "==1.19.17" psycopg2-binary = "==2.8.5" redis = "==3.5.2" zappa = "==0.51.0"
My temporary workaround was to disable SSL verification on the boto call.
verify=false
I had the same problem both with django-storages and django-s3-storage. @jaywonder20 's solution with the cacert.pem file (see stack overflow) solved the issue for me for now.
Getting the below error while trying to access remote_env from an s3 bucket
My Environment
Zappa version used: 0.51.0 Operating System and Python version: Ubuntu , Python 3.8 Output of pip freeze
Your
zappa_settings.json
:I have confirmed that my S3 file is accessible from my local ubuntu machine however does not work on aws