The Error has to do with your certificate and how you are uploading it.
Also are you making the bucket public or is it private ?
I think the default plugin forces it to upload to public buckets etc.
Again the error comes down to your SSL certificate etc.
Adding a note here:
You can also try set the NODE_TLS_REJECT_UNAUTHORIZED=0