Not able to connect to S3 from locally running App

0
Hi,   I wrote a microflow which tries to get list of objects from an S3 bucket, but it is giving error   An error has occurred while handling the request. [User 'Anonymous_872c8c1a-0836-47c5-946d-1d6b4aad8f70' with session id '40745cb1-XXXX-XXXX-XXXX-XXXXXXXXa5d4' and roles 'Administrator'] Caused by: java.security.PrivilegedActionException: null Caused by: org.apache.http.client.ClientProtocolException: null Caused by: org.apache.http.ProtocolException: Target host is not specified     the value of the variable $SigV4Headers/EndpointUrl is ‘https://s3.eu-west-2.amazonaws.com’. Not sure why mendix is saying Target host is not specified I am able call S3 API to this host via postman though.   kind regards Arun  
asked
2 answers
0

@Ward, I am authenticating using SigV4Headers, my Microflow looks like this

I had followed this : https://docs.mendix.com/appstore/connectors/aws/aws-authentication/#signature-v4-headers

@Ganesh, I changed the log level to debug for REST. It does not yield much except one line saying “Using a timeout of 300 seconds” (screenshots below)



@Anita, yes I am passing the bucket name as the query parameter, as per above microflow. can be seen in below logs as well

Any idea what is happening? :)

@Disclaimer – less than a week old on the mendix platform :)

regards
Arun

answered
0

Hi Arun,

 

Have you tried getting the list of objects using the S3 Connector? This contains a List Object action that will return this without the need for implementing a REST service and setting up SigV4 headers. https://marketplace.mendix.com/link/component/120340

 

Is makes use of the same Authentication connector, except you only need use the Static Credential action for API and Secret Key or the Session Credential action when you use the IAM Roles Anywhere feature.

answered