Although the AWS S3 node supports Custom API call through the HTTP Request node, I couldn’t find a working example on how to do so.
For instance, I’d like to do a HEAD operation on a file in a bucket, I’ve added an HTTP Request node, selected the predefined credential for AWS, set the URL as the file https://<BUCKET>.s3.amazonaws.com/<PATH_TO_FILE>, expecting that the signature parameters would be magically appended to the URL, but I just get a simple “400 rejected - Bad request - please check your parameters”.
If I switch method to GET, I get a different error:
`AuthorizationHeaderMalformed`The authorization header is malformed; the region 's3' is wrong; expecting 'us-east-1'
My credential has the region properly filled in.
I’m probably missing something obvious here.
I tried to use /<BUCKET>/<PATH_TO_FILE> in the URL, but then I get Invalid URL from the HTTP node.
I understand that the URL in the format https://<BUCKET>.s3.amazonaws.com/<PATH_TO_FILE> is correct, however there’s still something missing.
Good news!
So I’ve finally managed to do a HEAD request to an object on S3:
Essentially, what I was getting wrong is the URL, which worked using https://s3.amazonaws.com/<bucket_name>/<object_key>, which was a bit counter intuitive because path-style requests on AWS is deprecated: Virtual hosting of buckets - Amazon Simple Storage Service
I tested the above example with GET and HEAD, both worked properly.
I’d love to understand how to use Custom API Call on the AWS S3 node. Would you please point me to a working example?