Amazon S3 connection

Hi all,
I am trying to connect an S3 environment, for which the endpoint points relates to our internal url (e.g. https://s3-pl-north.xxx-company.com) and not the traditional AWS (https://xxx-bucket.s3.amazonaws.com). I do not see in the S3 connection any possibility to change that. Apart from that, the region we use (pl-north) is not listed in the node. Is it still possible to use this node or so I have another alternative (trying to avoid REST API)?

Thanks,
Matheus

Hello Matheus,
Unfortunately it is currently not possible to specify a custom S3 endpoint. We do have an internal development ticket open for it, though. It will not be in this release but I will add this forum post to the list of requestors so that it may be prioritised in the future.
Kind regards,
Alexander

1 Like

Hi Alexaner,

Thanks the for the information and the update on the development. I managed to find a workaround so I will post the solution here in case others need it. Here is a Java Snippet that allows you to list the buckets in a string (can be further developed but should give an idea on how to make the connection).

Module dependencies:
Capture

Code:

// Your custom imports:
import com.amazonaws.auth.*;
import com.amazonaws.services.s3.*;
import com.amazonaws.client.builder.*;
import java.util.List;
import com.amazonaws.services.s3.model.Bucket;

// Enter your code here:
AWSCredentials credentials = new BasicAWSCredentials(
  "ENTER YOUR ACCESS KEY HERE", 
  "ENTER YOUR SECRET KEY HERE"
);
try {
 AmazonS3 s3client = AmazonS3ClientBuilder.standard()
 .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(
      "ENTER CUSTOM ENDPOINT HERE",
      "ENTER REGION HERE"))
 .withCredentials(new AWSStaticCredentialsProvider(credentials))
 .build();

List<Bucket> buckets = s3client.listBuckets();

String name = "";
for(Bucket bucket : buckets) {
   name += bucket.getName() + ", ";
}
   out_result = name;
}
catch (Exception e) {
   out_result =  e.toString();
}
3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.