New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 release store: `The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.z` #249

Open
InteNs opened this Issue Nov 15, 2017 · 13 comments

Comments

Projects
None yet
4 participants
@InteNs

InteNs commented Nov 15, 2017

Environment

  • Edeliver version edeliver v1.4.4 | https://github.com/boldpoker/edeliver
  • Elixir version (elixir -v):
Erlang/OTP 20 [erts-9.0.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.5.1
  • Build tool and version (distillery|exrm): distillery
  • Operating system (on build / deploy hosts): ubuntu 16.04 LTS
  • Are you using an umbrella project (yes|no): no

Verbose output

  • Are there more information when running with --verbose?
-----> Copying release 0.0.1+20171115-988f37c to s3 release store
bash: line 3497: warning: here-document at line 4 delimited by end-of-file (wanted `EOF#!/usr/bin/perl')
+----------------+----------------------------------------------------------------------------------------------+------------------+
|      Code      |                                           Message                                            |    RequestId     |
+----------------+----------------------------------------------------------------------------------------------+------------------+
| InvalidRequest | The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. | D6F8B4529E4FC417 |
+----------------+----------------------------------------------------------------------------------------------+------------------+
400 Bad Request
  • Can you narrow down the code line causing the issue when running with --debug?
    bash: line 3497: warning: here-document at line 4 delimited by end-of-file (wanted 'EOF#!/usr/bin/perl')

  • Please remove any private data from the output before pasting it here (login credentials, ip addresses user names etc.)

Current behavior

Include executed edeliver command, error output etc.
mix edeliver build release production --verbose --debug
fails on moving the build to the s3 release store.

Expected behavior

I expected the build to be copied to the s3 bucket.

The bucket is located on the frankfurt (eu-central-1) server. This server doesn't support the v2 authorization mechanism, only v4

@lessless

This comment has been minimized.

Member

lessless commented Feb 3, 2018

@InteNs It seems to be s3cmd problem https://stackoverflow.com/questions/35758317/s3cmd-put-the-authorization-mechanism-you-have-provided-is-not-supported-plea

Feel free to reopen the issue if that doesn't help, but from looking on S3 strategy I don't see where edeliver can be responsible for that https://github.com/edeliver/edeliver/blob/master/strategies/s3

@lessless lessless closed this Feb 3, 2018

@gpad

This comment has been minimized.

Contributor

gpad commented Apr 26, 2018

@lessless I think that the bug is present because I'm checking that edeliver doesn't use s3cmd to upload the tar.gz` but a perl script that return that error. https://github.com/edeliver/edeliver/blob/master/libexec/aws

@lessless

This comment has been minimized.

Member

lessless commented Apr 29, 2018

@gpad yes, my bad, it uses aws script. Does this bug bite you?

@lessless lessless reopened this Apr 29, 2018

@gpad

This comment has been minimized.

Contributor

gpad commented May 4, 2018

@lessless yes a lot .
I'm trying to fix it in my config using s3cmd but I get an error when edeliver try to check if package is present in store.
I think that edeliver should use s3cmd that is a maintained package instead of a pearl script.

@joskar

This comment has been minimized.

joskar commented Oct 25, 2018

Does anyone have a work around for this? I have the exact problem.

@joskar

This comment has been minimized.

joskar commented Oct 29, 2018

@gpad @InteNs I have made a fork that use the s3cmd I have been using it for some days now without problems, obviously you would have to install s3cmd in your systems.
You can find my modifications here https://github.com/joskar/edeliver.

@lessless Do you think that edeliver should use s3cmd instead of this perl script?
My concern is that s3cmd is an external dependency while this perl script is shipped with edeliver that way it's really nice.

@lessless

This comment has been minimized.

Member

lessless commented Oct 29, 2018

@joskar thanks for the update! I'll take a look at it - seems that it's a Python script that can be similarly included.

@lessless

This comment has been minimized.

Member

lessless commented Nov 6, 2018

@joskar both are external dependencies - I don't see quite a lot of difference in that respect, but there are few advantages in s3cmd: it focuses on the the interaction with storage providers, which are not run by Amazon exclusively and seems to work.

@gpad @InteNs did you folks have to try it out? I don't use S3 and will be happy to merge this into upstream if it does the job properly.

@joskar

This comment has been minimized.

joskar commented Nov 7, 2018

@lessless What I wanted to point out is that I didn't put the s3cmd script in the libexec directory and I assuming that the user has already installed it in his/her systems (staging, production, build).
I thought that this is what is called an "external dependency". If it's not please correct me, so I would use the correct term/phrase next time :)

@gpad

This comment has been minimized.

Contributor

gpad commented Nov 8, 2018

@lessless I'm not able to test the fork of @joskar because I'm not actively working on it now... What I suggest is to not put the s3cmd in the libexec directory but put a check in the code to verify if it's installed the first time that is necessary and advice the user if it's not installed.

@lessless

This comment has been minimized.

Member

lessless commented Nov 15, 2018

@joskar is it something that you would like to tackle?

  • remove libexec/aws
  • add s3cmd check presence with a missing dependency notice
  • update README
@joskar

This comment has been minimized.

joskar commented Nov 20, 2018

@lessless I would happily:

  • Remove libexec/aws
  • Add check for s3cmd
@lessless

This comment has been minimized.

Member

lessless commented Nov 24, 2018

@joskar that works! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment