Skip to content
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

[BUG] Missing required header X-Amz-Content-Sha256 on copy between bucket #542

Open
noiretr-cg opened this issue Jan 12, 2023 · 0 comments
Labels

Comments

@noiretr-cg
Copy link

noiretr-cg commented Jan 12, 2023

Hello,

I am trying to copy a file between two buckets using a public S3 endpoint (different AWS region) but but it seems that the header is missing. (This header seem required for authentification with AWS https://docs.aws.amazon.com/AmazonS3/latest/API/bucket-policy-s3-sigv4-conditions.html)

s5cmd version
v2.0.0-35bb2fa

s5cmd -r 1 --endpoint-url s3.eu-west-3.amazonaws.com --log debug cp --source-region eu-west-3 --destination-region eu-west-1 s3://bucket-source/xx[ABC].zip s3://bucket-dest

DEBUG retryable error: SerializationError: failed to unmarshal error message
	status code: 400, request id:
caused by: UnmarshalError: failed to unmarshal error message
	00000000  3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31  |<?xml version="1|
00000010  2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 55 54  |.0" encoding="UT|
00000020  46 2d 38 22 3f 3e 0a 3c  45 72 72 6f 72 3e 3c 43  |F-8"?>.<Error><C|
00000030  6f 64 65 3e 49 6e 76 61  6c 69 64 52 65 71 75 65  |ode>InvalidReque|
00000040  73 74 3c 2f 43 6f 64 65  3e 3c 4d 65 73 73 61 67  |st</Code><Messag|
00000050  65 3e 4d 69 73 73 69 6e  67 20 72 65 71 75 69 72  |e>Missing requir|
00000060  65 64 20 68 65 61 64 65  72 20 66 6f 72 20 74 68  |ed header for th|
00000070  69 73 20 72 65 71 75 65  73 74 3a 20 78 2d 61 6d  |is request: x-am|
00000080  7a 2d 63 6f 6e 74 65 6e  74 2d 73 68 61 32 35 36  |z-content-sha256|
00000090  3c 2f 4d 65 73 73 61 67  65 3e 3c 52 65 71 75 65  |</Message><Reque|
000000a0  73 74 49 64 3e 48 46 48  46 30 50 37 51 48 4d 4d  |stId>HFHF0P7QHMM|
000000b0  52 4b 46 46 33 3c 2f 52  65 71 75 65 73 74 49 64  |RKFF3</RequestId|
000000c0  3e 3c 48 6f 73 74 49 64  3e 52 56 79 4e 4c 45 6c  |><HostId>RVyNLEl|
000000d0  64 41 42 37 69 74 50 2b  59 63 72 46 63 32 4c 4f  |dAB7itP+YcrFc2LO|
000000e0  70 64 2b 47 76 59 76 58  33 32 43 76 4a 70 54 62  |pd+GvYvX32CvJpTb|
000000f0  4a 5a 37 59 6d 54 31 50  74 49 70 37 64 41 57 6c  |JZ7YmT1PtIp7dAWl|
00000100  53 49 6f 66 4d 63 71 41  4b 59 53 52 45 6c 6a 66  |SIofMcqAKYSREljf|
00000110  59 49 68 4d 3d 3c 2f 48  6f 73 74 49 64 3e 3c 2f  |YIhM=</HostId></|
00000120  45 72 72 6f 72 3e                                 |Error>|

Note : The command work without --endpoint-url argument and outside AWS network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants