S3 Connector Works in Local Environment but Fails in Mendix Cloud (ACCP)
0
Hi everyone, I’m trying to integrate Amazon S3 using the Amazon S3 Connector module, and I’m running into an issue where the connection works perfectly in my local environment, but fails in the Mendix ACCP (acceptance) environment. In ACCP I get the following error: Unable to execute HTTP request: Connect to xxx(endpoint path) failed: connect timed out (SDK Attempt Count: 4) This is the error message in full: java.net.SocketTimeoutException com.mendix.systemwideinterfaces.MendixRuntimeException: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connect to rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com:443 [rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.134.102, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.241, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.218, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.137.121, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.226, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.194, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.68, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.136.102] failed: connect timed out (SDK Attempt Count: 4) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Connect to rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com:443 [rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.134.102, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.241, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.218, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.137.121, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.226, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.194, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.68, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.136.102] failed: connect timed out (SDK Attempt Count: 4) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: Unable to execute HTTP request: Connect to rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com:443 [rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.134.102, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.241, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.218, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.137.121, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.226, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.194, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.68, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.136.102] failed: connect timed out (SDK Attempt Count: 4) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: Connect to rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com:443 [rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.134.102, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.241, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.218, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.137.121, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.226, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/52.219.169.194, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.138.68, rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com/3.5.136.102] failed: connect timed out at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: connect timed out at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) This is a TCP connection timeout, so the Mendix Cloud environment cannot even establish an HTTPS connection to the S3 endpoint. AWS never receives the request. What I already checked Bucket region is correct (eu-central-1) No issue with credentials (works locally) No CORS issue (not REST/JS) Not an AWS AccessDenied — it fails before TLS handshake I simply need my Mendix ACCP environment to reach this S3 endpoint on port 443. Any experience or guidance would be super appreciated. Thanks so much in advance!
asked
Elif Erzincan
5 answers
0
Elif,
Are you also using the AWS Authentication Connector module? Also, what version of the Amazon S3 and AWS Authentication Connector modules are you using?
Thanks,
Mike
answered
Mike Kumpf
0
Hi Mike,
Yes I am using AWS Authentication Connector module as well. The AmazonS3Connector module has version 4.2.1 and AWSAuthentication module has version 3.2.3. Looking forward to your response, and thanks so much in advance!
answered
Elif Erzincan
0
Elif,
I just created a small test project, installed AWS Authentication Connector and Amazon S3 Connector modules. I was able to create and validate credentials and retrieve a list of buckets from my AWS instance. This project is deployed as a free node in the Mendix Cloud. I used static credentials.
Do you get the error message when you try to validate credentials? Are there differences between the configuration you are trying to use and the one in my test project?
Mike
answered
Mike Kumpf
0
Hey Mike,
I’m also using static credentials, and when I run the microflow locally everything works as expected: the S3 connector retrieves the objects without any issues. However, when I deploy the same app to the Acceptance environment in Mendix Cloud, the microflow fails at the ListObjects step:
The error that I get from the ListObjects activity in my Cloud environment is:
ERROR Amazon S3 Connector: PutObject: Unable to execute HTTP request: Connect to rossum-idp-s3bucket.s3.eu-central-1.amazonaws.com:443 [...] failed: connect timed out (SDK Attempt Count: 4)
ERROR Error: S3 connection failed in ACT_S3Read_UpdateMatchingPOs: connect timed out
Since the exact same credentials work locally but time out only in the Cloud environment, I’m starting to suspect this may be related to network restrictions. For example, the Mendix Cloud outbound IP ranges may need to be whitelisted on the AWS side for this S3 bucket.
Does this kind of timeout typically indicate that the Mendix Cloud environment cannot reach the endpoint, and that AWS-side whitelisting is required? I am not an expert at all but I thought as my local environment is being run on the corporate network this would be a feasible explanation. Thank you so much again!
answered
Elif Erzincan
0
Dear Elif Erzincan,
If it's working locally and not on cloud because of timeout, it is mostly because of IP whitelisting.
1. Check if Mendix outboud IP address is whitelisted in AWS (https://docs.mendix.com/developerportal/deploy/mendix-ip-addresses/#accessing-aws-services-in-mendix-cloud).
2. Check if AWS inboud IP address is whitelisted in Mendix Cloud (Network tab) (PFA).
The issue will solve if above is done. Let me know, if not we can dig in deep.
Hope my answer helps. Reach me out for any queries.