Skip to main content
Question

Cannot read files saved in AWS S3

  • 26 June 2024
  • 5 replies
  • 87 views

We are testing an S3 bucket for our Thinkwise application in preparation for a possible migration away from on-prem file storage.

We are successfully able to upload a file to AWS S3, however we are unable to read it again in the GUI. If we open the file in AWS S3 itself, it is exactly the same as when we uploaded it.

Currently, the file column is defined as a NVARCHAR(max) column, in which we save the link to the file in AWS.

What is the behaviour in Thinkwise when it comes to downloading a file from S3? What column type should we use for this?

Thanks in advance!

5 replies

Userlevel 7
Badge +23

Hi Jeroen,

I see you use the Windows GUI tag, does that indicate you are using the Windows GUI? The Windows GUI may not be able to reach the AWS S3 bucket and therefore cannot read or download the file. Does that sound plausible?

When using external storage like AWS S3 you'll effectively create a link to the file. The file will be downloaded once you try to open it. The data type you can use for this is either varchar or nvarchar; it will store the location of where the file is located; I think a relative path as the base path can be modified in IAM.

Userlevel 3
Badge +2

Hi @Mark Jongeling,

Thanks for your reply!

The Windows GUI may not be able to reach the AWS S3 bucket and therefore cannot read or download the file. Does that sound plausible?

We are able to upload to AWS S3 from within the GUI without issue, so connectivity does not seem to be a problem.

I think a relative path as the base path can be modified in IAM.

What should we define as base path, and what should we then store in the varchar field? Currently all we did is configure AWS S3 file storage according to the docs and added an NVARCHAR column to an existing table. Is there any additional steps we might have missed or still need to take for this to work correctly?

Userlevel 7
Badge +23

Hey Jeroen,

We are able to upload to AWS S3 from within the GUI without issue, so connectivity does not seem to be a problem.

Are you using Indicium Basic or using system flows to upload files to AWS S3?

What should we define as base path, and what should we then store in the varchar field?

AWS doesn't work with base paths, my bafd. You define the bucket which weffectively is your base path. Using the file name you can steer where the file is stored I believe. I haven't worked with AWS myself yet.

You will need a column with a (n)varchar domain using the File upload control and a Storage location that points to AWS. That in turn will ensure that uploading the file will record the file name in the column and allow you to download it when pressing the control in the GUI.

Userlevel 6
Badge +10

@Jeroen de Klerk could it be that the AWS User doesn’t have all required Action permissions? See the Policy template here for some pointers: https://docs.thinkwisesoftware.com/docs/deployment/aws_bucket_as_file_cache#create-a-user-with-programmatic-access

Userlevel 5
Badge +8

@Jeroen de Klerk, do you still require assistance on this?

Reply