How to get file from AWS S3?

0
I want to get this file from my S3 environment to Mendix.     for this I use to create object tool before I get object. however I have no idea to solve this.. there is members that I have to put information. But I can not understand to put what information should be input..    Thank you for your answer,  after I check my Mendix Micro flow like below. However, I have still trouble to connect to my AWS S3. In case of mine, I want to check my Get Static Credential action work properly or not. do you have any additional advise for this?   thank you for all. your support totally help me alot.    I have last question with you. I have no idea what expression should be used for this. could you help me out again? 
asked
5 answers
1

Hi KooHyun,

 

In order to retrieve an S3 Object from your S3 Bucket you need the following:

  1. The name of the S3 Bucket
  2. The name of the S3 Object

 

The way that the S3 connector currently is setup:

  1. You need to create a Bucket object
    1. Where you specify the S3 Bucket’s name to the Name attribute
  2. Then, you’d need to create a S3Object
    1. Where you specify the S3 Object’s name to the Key attribute as you already had done
    2. Additionally, you need to set the association from the S3Object object to the Bucket object you had created

 

We’re currently expecting an update to the Amazon S3 connector soon, where we changed this process.

 

How it will work in the Amazon S3 connector (2.0.0):

  1. You need to create a GetObjectRequest
    1. Where you specify the S3 Bucket’s name to the BucketName attribute
    2. Where you specify the S3 Object’s name to the Key attribute

 

I hope this helps, do feel free to reach out to me with further questions.

answered
0

Hi KooHyun,

 

Have you configured the two string parameters that reside within the Java Action that is named GetStaticCredentials? The two parameters that are required to generate a Credentials object are the following:

  1. accessKeyID (String)
  2. secretAccessKey (String)

 

 

For information regarding how to retrieve these two values for your AWS account, please refer to AWS Identity and Acess Management (User Guide).

 

I hope this helps.

answered
0

Hi KooHyun,

 

A couple of items I want to touch upon:

  1. Yesterday, we updated our Amazon S3 connector from 1.1.1 to 2.0.0. This update is an overhaul of the existing S3 connector, replicating the developer experience that Mendix has for its platform-supported AWS connectors. If you've worked with any of those connectors before, I strongly urge you to consider updating to the latest version.
  2. The easiest way, within Mendix, to test your credential set is to use an action where no request body is necessary. For S3, ListBuckets, would be one that does not require one. As such, you can pass the Credentials object as a parameter immediately and confirm or reject that your approach is working.
  3. Lastly, I see in the microflow that you share in your original post that the return type that is specified, is of the type Credentials. I'm not sure how the implementation looks, but if the credential set is correct, your Mendix application should have the S3 object in the type of a Document object.

 

I hope this helps.

answered
0

 

what information should I need to put in?… 

answered
0

Hi KooHyun,

 

To call the List Objects microflow you need a ListObjectsRequest object. Before calling the List Objects microflow you can create a ListObjectsRequest and fill out its attributes according to your query. The BucketName attribute is required and the others are optional.

 

I hope this helps.

 

answered