Hi Reshma,
There is no PB system object providing specific Amazon access so you have to write code doing the actual Amazon access.
So, you need to create C# object with a "DownloadFileFromAmazon" method taking/returning combination of numeric, string, and BLOB values - or any other "interop compatible data type".
For interop in PowerScript to this C# object you have two choices:
- Legacy COM Callable Wrapper using OLEObject
- Upcoming C# interop using CSharpObject (requires upcoming PB 2019 R2!)
You may find online code examples accessing Amazon from PowerScript from Chilkat. Beware! These code samples require your app uses proprietary component created by Chilkat. That component requires paid license!
Code sample in case you use upcoming C# interop and your C# object has functions like I call them to set all the values required by AWS S3.
// PREREQUISITES:
// Expect: of_DownloadFile returns "length of downloaded file"
// - or - Returns negative value when error occurs
function Boolean of_DownloadFromAWS(string as_bucketName, string as_awsPath, string as_downloadFilePath)
long ls_status
n_AWS_S3 lnv_download
lnv_download = n_AWS_S3
lnv_download.of_SetIdentity(this.is_accessKey, this.is_secretKey)
lnv_download.of_SetLocation(this.is_regionID, this.is_endpointURL)
ls_status = lnv_download.of_DownloadFile(as_bucketName, as_awsPath, as_downloadFilePath)
return (ls_status >= 0)