drone-plugins / drone-s3

Drone plugin for publishing artifacts to Amazon S3
http://plugins.drone.io/drone-plugins/drone-s3
Apache License 2.0
37 stars 65 forks source link

AWS keys with special characters break the upload and create a misleading error #6

Closed thyming closed 8 years ago

thyming commented 8 years ago

When using aws access keys that have non-alphanumeric characters, I get the following error from the aws cli tool:

A client error (SignatureDoesNotMatch) occurred when calling the CreateMultipartUpload operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.

This is a misleading error but goes away when I use access keys that do not contain special characters. Not sure whether the fix has to do with some kind of escaping here or this is just a bug in the aws cli app.

bradrydzewski commented 8 years ago

marking as help wanted. If someone is able to identify the root cause (drone issue vs s3 cli issue, etc) and issue a pull request I'll be happy to review and merge

thyming commented 8 years ago

Seems to be because of this: https://github.com/aws/aws-cli/issues/602 They've closed the issue but people are reporting the same thing that I experienced, namely that a plus sign blows things up.

thyming commented 8 years ago

FWIW I just regenerated keys until I got one without special characters :(((

thyming commented 8 years ago

If I get a chance this week I'll make a PR that uses the aws sdk instead of the cli.

bradrydzewski commented 8 years ago

@thyming thanks that would be great! A community member has also been migrating the s3-sync plugin to use the native Go sdk. You can see this branch for reference https://github.com/drone-plugins/drone-s3-sync/tree/native

thyming commented 8 years ago

In the use case of drone exporting an artifact, it seems like drone-s3-sync and this module can be collapsed into one. This module with the recursive option does the same thing as sync, no?

bradrydzewski commented 8 years ago

closing since we've updated to use the native Go client. Not sure yet if we'll merge s3 and s3 sync into a single repository, but this should be solved in 0.5 version of drone