Iris & Buckets
Hi, someone have connected Iris to a Bucket ? like aws, huawei, etc.
I try to use private Bucket as storage for files, and Iris as database & API interface to manage this files, but al SDKs are in another languages, no one have founded on COS.
I have tested some examples, but with bad results
Set request = ##class(%Net.HttpRequest).%New()
Set request.Server = "..."
Set request.Port = "443"
Set request.Https = $$$YES
Set request.SSLConfiguration="default"
Set request.Date = $zdt($h,2)
Set AccessKeyID = "..."
Set ExpiresValue = $ZDATETIME($HOROLOG,-2)+60
Set StringToSign =
"GET" _ "\n" _
"" _ "\n" _
"text/plain" _ "\n" _
ExpiresValue _ "\n"
Set signature =
$zconvert($system.Encryption.Base64Encode($system.Encryption.HMACSHA1(StringToSign,"...")),"O","URL")
Set tURL = "/ObjectKey?AccessKeyId="_ AccessKeyID _ "&Expires="_ ExpiresValue _ "&Signature="_ signature
Do request.Get("/files/" _ tFind _ ".ext")
And a have a 403 Error (is not the first test ... )
You can use AWS Adaptor.
Also calling @Anton Umnikov.
While the idea is essentially the same (REST API) - each cloud provider uses slightly different calls and signatures to access data in the storage bucket. So unlikely you'll find a single example that works for every provider.
IRIS External Table contains Object Script implementation of the storage bucket adapters for AWS, Azure and Google Cloud.
https://github.com/intersystems-community/IRIS-ExternalTable#using-cloud-adapters-outside-of-externaltable - would give you an idea on how to use adapters directly.
in my case, some fixes for Huawei (like Old version s3)
I use Credentials to save data.
Thanks !!