Jump to content
  • 0

Amazon AWS S3 permissions



Does anyone know how to use Amazon AWS S3 for files (pdf in this case) that are not public but that can be accessed by an authenticated Caspio datapage?

I'm using Google Docs Viewer to display uploaded pdf files but it only works if the directory that the pdf file is in is Filestor enabled. The pdf files are proprietary to my users and cannot be public so I cannot use Filestor.

I tested out an Amazon AWS solution (putting the pdf file in an S3 Bucket) and storing the S3 file url in a Caspio table, then using that file url with Google Docs Viewer to display the pdf. This does work but of course the S3 file has to be set to 'public' in order to display, which of course is the same issue as with a non-Filestor Caspio file folder.

I was hoping to somehow set the AWS S3 bucket to have permissions (and a password) that I could reference in the datapage script that opens the pdf viewer. This way the pdf file wouldn't be public but would still be accessible from a Caspio datapage (the datapage would be authenticated so only the owner of the file would have access to it). 

It'd be so much easier if Caspio had a pdf viewer (pdf viewed in the browser or a datapate) instead of just downloading to the local computer.  But an AWS solution might also work, I just don't know how to get/set permissions to use my specific AWS S3 buckets. Any help would be very much appreciated!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

What you are looking for is possible with the AWS S3 API, there is a method to create a signed URL to your file and you can set the live time to 1minute for example so links are valid only for that time frame, anyone using the link out of that frame will get an error message from aws. 

It is not necessary to set your bucket public and the user get a more natural experience since it is secure without having to put in a password everytime he wants to view a file. 

Process starts from putting the initial file since it has to somehow relate to your Caspio record, it could be a complex process but it is a completely doable integration. 

This is not, unfortunately, a do yourself task if you do not have the technical knowledge about APIs. I recommend you to hire a developer for that, or if you want to give it a try, AWS has good documentation on using their API. 

I hope this can help you solving your issue. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...