AppWorx, Dollar Universe and Sysload Community

 View Only
  • 1.  Connect to Amazon Rest Api (S3 Bucket)

    Posted Jul 23, 2019 03:53 AM

    Hi all,

    we are working on a solution to connect to the Amazon Rest API via Rest Webservice Agent 12.2.3. We will use this to handle files on an S3 Bucket.
    In the moment we collapse to build the connection.

    We recieved the error Message 
    <Error><Code>AuthorizationHeaderMalformed</Code><Message>The authorization header is malformed; the region 's3.eu-central-1' is wrong; expecting 'eu-central-1'</Message><Region>eu-central-1

    Have someone experience with Amazon Rest Api? 
    Must we give some special Request Headers or Query Parameters?

    Thanks

    Cheers

    Jens



  • 2.  RE: Connect to Amazon Rest Api (S3 Bucket)

    Posted Jul 24, 2019 01:16 AM
    Have you tried the actionpack on the marketplace already?

    https://marketplace.automic.com/details/amazon-aws-action-pack

    ------------------------------
    Swisscom & WorkflowCommander
    ------------------------------



  • 3.  RE: Connect to Amazon Rest Api (S3 Bucket)

    Posted Jul 24, 2019 02:38 AM
    yes and this connection will be no problem, but the Action Pack works with the AWS Client on OS Level, so we need an OS Agent. But our customer prefered a soloution with an Rest Agent:-)


  • 4.  RE: Connect to Amazon Rest Api (S3 Bucket)

    Posted Jul 24, 2019 06:22 PM
    Hi Jens,

    I just ran a quick test on my V12 REST WS Agent and got a download of an S3 file to work.
    Here are the key parts (I think). 1. In the connection object I have a URL Endpoint of https://s3.amazonaws.com. I have the Authentication set to AWS Signed URL V4 and provided the access key and secret access key. 2.In the REST job I have the resource defined as (example): automic-database-backups-bucket/automic/test.bak. In the Response Definition and Parsing tab I put a path and file name that exists on the server where my REST WS agent resides (example) /tmp/test.bak. 3. I have no other header or query parameters in the connection or the job.

    One thing I noticed is that your region is s3.eu-central-1. Mine is us-east-1 which is the default for s3.amazonaws.com. I tested including the region in the URL such as https://s3.us-east-1.amazonaws.com and got an error very similar to yours. After much googling and trial and error I was not able to get the 'region style' url to work. Hopefully that is not the problem, and  method 1 above works for you.

    I hope that's helpful,
    George