AnsweredAssumed Answered

How to calculate hashed payload

Question asked by pokoraalex on Jan 8, 2019
Latest reply on Jan 8, 2019 by pokoraalex

Hello everyone!

 

 

I’m trying to send a PDF file from a container to amazon s3 using “Insert From URL” script step. To send successfully, I must calculate hashed payload. But all my attempts give me

 

 

<Error>

<Code>InvalidArgument</Code>

<Message>x-amz-content-sha256 must be UNSIGNED-PAYLOAD, STREAMING-AWS4-HMAC-SHA256-PAYLOAD, or a valid sha256 value.</Message>

<ArgumentName>x-amz-content-sha256</ArgumentName>

<ArgumentValue>null</ArgumentValue>

<RequestId>31BF022D4F37CE98</RequestId><HostId>IwviC49mZHyo7c0XDo9hnPaab7PgRa5bZ3dB/WmJJ9UuDEq8SfmsUKsEKEFoW4aePuk6OXuaU54=</HostId></Error>

 

 

I calculate hashed payload as follows:

 

 

Set Variable $data = Table :: container.

 

 

Set Variable $XAmzContentSha256 = Lower (HexEncode (CryptDigest ($ data; “SHA256"))).

 

 

In my cURL options:

 

 

“-X POST” &

 

 

“-H \” Host: “& $host &” \“” &

 

 

“-H \” Content-Type: “& $ContentType &” \“” &

 

 

“-H \” Authorization: “& $AuthorizationString &” \“” &

 

 

“-H \” x-amz-date: “& $XAmzDate &” \“” &

 

 

“-H \” x-amz-content-sha256: “& $XAmzContentSha256 &” \“” &

 

 

“--data @$data”

 

 

However, I do not succeed. I would be very grateful if someone more experienced would help me with advice. Please, tell me what I’m doing wrong!

 

Outcomes