Put/Get Files from AWS S3
- How-to
- Brian O'Malley
- PowerBuilder
- Friday, 7 May 2021 07:39 PM UTC
I would like to start using AWS S3 for storing files, which can be retrieved as needed. I am using PB 2019 R3 and I downloaded and installed the AWS S3 SDK and used the .NET DLL Importer to bring in a whole bunch of NVOs.
On my S3 I setup an IAM User, Role and Policy which should grant List, Put and Get from my bucket. I am just not sure what to do next. I can see one of the objects imported to PB was nvo_transferutility, which has an of_upload method. This method takes a filepath and bucketname as arguments, but how to I tell it what user to use, so that it will invoke the policy and let me do an upload (since the bucket is not open to the public)?
Does anyone have a small sample of PB code which just shows which NVOs objects to instantiate, and which functions to call in which order to do either a PUT or a GET?
Thanks!
Brian
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.