[Amazon S3] How to retrieve the list of files - secret and access key

[Amazon S3] How to retrieve the list of files - secret and access key

  
Forge Component
(4)
Published on 6 Apr by Formiga
4 votes
Published on 6 Apr by Formiga

Hello,


I already have an AWS account but I´m not from infra team. 

So it is not clear for me how to get the access key and secret key from my AWS account.

Those keys are input parameters for the function "ListFiles"

Could you help me to find out how to obtain those values form my AWS account?

Thank you

Hi Leo,

You can get the info from the https://console.aws.amazon.com.

Of course you would need username/password to access your account.

The click in the right upper menubar on your account name to open a menu and choose My Security Credentials.

On the page then shown select Access key.

However be aware you can find your access key there but can not have the secret key. So if your Ifra team didn't save the secret key some where you( (or infra team) will have to generate a new acces key and secret key.

This is all explained on the page that shows the access keys created previously.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Leo,

You can get the info from the https://console.aws.amazon.com.

Of course you would need username/password to access your account.

The click in the right upper menubar on your account name to open a menu and choose My Security Credentials.

On the page then shown select Access key.

However be aware you can find your access key there but can not have the secret key. So if your Ifra team didn't save the secret key some where you( (or infra team) will have to generate a new acces key and secret key.

This is all explained on the page that shows the access keys created previously.

Regards,

Daniel


Hello Daniel!


Thank you for your answer.

I was able to retrieve my access key from AWS Console.

I will do a test now.

Do you have an Outsystems Project Sample that uses this S3 component?

Solution

Hi again

I don't have a sample project, I only used the component in a customer project.

But the process is pretty straight forward:

  1. Add a local parameter AmazonToken of type Amazon Token to your action
  2. Assign the AmazonToken.AccessKey and AmazonToken.SecretKey
  3. Use the ListFiles Action, set properties according your use case
  4. The ListFiles output is a list of files
  5. Use a foreach flow element to iterate the list of files
  6. For each file call the FetchFile action with parameter OutputFileList.Current.S3File.Key
  7. The output of FetchFiles is the binary content of the file.

Regards,

Daniel

Solution

Daniël Kuhlmann wrote:

Hi again

I don't have a sample project, I only used the component in a customer project.

But the process is pretty straight forward:

  1. Add a local parameter AmazonToken of type Amazon Token to your action
  2. Assign the AmazonToken.AccessKey and AmazonToken.SecretKey
  3. Use the ListFiles Action, set properties according your use case
  4. The ListFiles output is a list of files
  5. Use a foreach flow element to iterate the list of files
  6. For each file call the FetchFile action with parameter OutputFileList.Current.S3File.Key
  7. The output of FetchFiles is the binary content of the file.

Regards,

Daniel


Daniel,

I succeed to access AWS !


Thank you very much for your help !!

Great, good to read