Question: I tried to use aws-sdk + Paperclip gems with Ruby On Rails to use DigitalOcean Spaces to upload files

The problem i have is the result of configuration, i get "{name\_buncket}.s3.nyc3.amazonaws.com" instead of "{name\_buncket}.s3.nyc3.digitaloceanspaces.com", that last is the correct result to acces to DigitalOcean Spaces

The aws-sdk gem is exclusive for Amazon Services?, if that is the case, exist another gems similary to aws-sdk to use?

That is the configuration i use:

```
config.paperclip_defaults = {
    storage: :s3,
    url: '.....',
    s3_region: 'nyc3',
    s3_credentials: {
    bucket: '......',
    access_key_id: "......",
    secret_access_key: "........",
    s3_host_name: 'nyc3.digitaloceanspaces.com'
  }
}

```

Answer: 
I think you're out of luck at the moment, although not for the hostname problem you're currently having.

The `s3_host_name` key should be outside of your `s3_credentials` block. If you change your configuration to this:

```
config.paperclip_defaults = {
  storage: :s3,
  url: '.....',
  s3_region: 'nyc3',
  s3_credentials: {
    bucket: '......',
    access_key_id: "......",
    secret_access_key: "........"
  },
  s3_host_name: 'nyc3.digitaloceanspaces.com'
}

```

you should fix your hostname problem.

However, **at the moment** this is just going to lead you to another problem: Paperclip/aws-sdk authentication isn't currently working with DigitalOcean Spaces - see [this issue on GitHub](https://github.com/thoughtbot/paperclip/issues/2487).
I started the ticket for Paperclip and have one with Digital Ocean as well with no reply yet. The above example that drosboro entered should work in theory but it does not. Specifying s3\_host\_name does nothing and shows as the host name specified in the original post, though i do agree the issue must lie with a authentication issue somewhere. 

To test, I switched to storage: :fog from :s3. Specifying scheme: 'https' results in a 403 response, while switching to scheme: 'http' results in a 302 response. Interestingly, using shows a file size in the json output while uploading via http results in 0. Odd.

Thinking maybe there were some newer API options used, I switched to AWS-SDK v3 which caused issues of it's own which I was able to work around. Still no dice, though. If i receive an update from anyone on this, I'll gladly post the response here.