SSL Certificate validation issue when using AWS SDK Ruby library to access Digital Ocean Spaces

Posted October 21, 2019 427 views
DigitalOcean Spaces


Our Ruby on Rails 5 based production app is configured to use Active Storage with the “amazon” engine, to access files on Digital Ocean Spaces.

Since the Digital Ocean Spaces API is compatible with AWS S3 API, using Active Storage with “amazon” engine, which uses the AWS Ruby SDK ( behind the scenes, didn’t seem like a problem.

However, we have observed that Digital Ocean Spaces API calls are failing with the following error returned from the AWS Ruby SDK:

Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (ok))

Searching for the issue online resulted in a few sources that pointed to one solution of using the bundled AWS certificates. This solution is based on the assumption that the host machine may not have the required certificate to connect to AWS S3.

However, this solution will not work for us because we are using Digital Ocean Spaces and not AWS S3. Does your development team have suggestions on how to tackle this issue? Maybe Ruby experts who have run into this problem can suggest a fix.

Thanks in advance.

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!