You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use google-cloud-python to get the content of my bucket and save in a S3 bucket using an aws lambda function.
I've been having issues with the SSL certificate validation and after trying few things I have zero results.
My script is:
from google.cloud import storage
def lambda_handler(event, context):
# Instantiates a client
storage_client = storage.Client()
# The name for the new bucket
bucket_name = 'xxx'
# Creates the new bucket
bucket_data = storage_client.get_bucket(bucket_name)
blobs = bucket_data.list_blobs()
for blob in blobs:
print(blob.name)
and the error I get is:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): TransportError
Traceback (most recent call last):
File "/var/task/doubleclick_ingestor.py", line 25, in lambda_handler
bucket_data = storage_client.get_bucket(bucket_name)
File "/var/task/google/cloud/storage/client.py", line 173, in get_bucket
bucket.reload(client=self)
File "/var/task/google/cloud/storage/_helpers.py", line 99, in reload
_target_object=self)
File "/var/task/google/cloud/_http.py", line 299, in api_request
headers=headers, target_object=_target_object)
File "/var/task/google/cloud/_http.py", line 193, in _make_request
return self._do_request(method, url, headers, data, target_object)
File "/var/task/google/cloud/_http.py", line 223, in _do_request
body=data)
File "/var/task/google_auth_httplib2.py", line 187, in request
self._request, method, uri, request_headers)
File "/var/task/google/auth/credentials.py", line 118, in before_request
self.refresh(request)
File "/var/task/google/oauth2/service_account.py", line 310, in refresh
request, self._token_uri, assertion)
File "/var/task/google/oauth2/_client.py", line 143, in jwt_grant
response_data = _token_endpoint_request(request, token_uri, body)
File "/var/task/google/oauth2/_client.py", line 104, in _token_endpoint_request
method='POST', url=token_uri, headers=headers, body=body)
File "/var/task/google_auth_httplib2.py", line 119, in __call__
raise exceptions.TransportError(exc)
TransportError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Any help would be appreciated.
Thanks,
Isaura
The text was updated successfully, but these errors were encountered:
@isdefic We've seen this quite a bit because httplib2 is not threadsafe (see #1214).
I'm closing this for now, with the assumption that you are sharing a Client across multiple threads. If that isn't the case, let us know and I'll re-open and we can discuss. (As it turns out I am very close to ripping out httplib2 as a dependency.)
Assuming you are using this library in multiple threads, create a thread-local Client.
Hi all,
I'm trying to use google-cloud-python to get the content of my bucket and save in a S3 bucket using an aws lambda function.
I've been having issues with the SSL certificate validation and after trying few things I have zero results.
My script is:
and the error I get is:
Any help would be appreciated.
Thanks,
Isaura
The text was updated successfully, but these errors were encountered: