AWS Library: Some Basic Questions [RESOLVED]

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

AWS Library: Some Basic Questions [RESOLVED]

Post by sritcp » Wed Jan 29, 2020 4:28 am

I am trying to learn the basics of using AWS S3 for data storage and retrieval through LiveCode scripting.

The dictionary provides the command

Code: Select all

AWSSetCredentials kAccessID, kSecret, "us-east-1"
and notes that all requests must include an authorization header that contains a scoped signature …., etc.

So, how do I provide this information with each request? (I have the accessID, secret, etc).
Suppose I want a list of objects in a bucket by using the command

Code: Select all

AWSS3GetBucket pBucket,pParameters,pCallback
how would I include the authorization header? How would I combine these two sets of information? Could you provide an example?

Thanks,
Sri
Last edited by sritcp on Thu Jan 30, 2020 12:32 am, edited 1 time in total.

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: AWS Library: Some Basic Questions

Post by sritcp » Thu Jan 30, 2020 12:32 am

Here’s what I have figured out:

1. Setting credentials is simply sending the command AWSSetCredentials. Nothing is returned (both “it” and “the result” are empty).

2. Once your credentials are set, according to AWS REST API reference documents, the signing key and signature are valid for up to 7 days (unless you restrict them further setting the s3:signatureAge option of the policy keys).

3. Now you can use the other commands in the LiveCode AWS library, such as AWSGetBucket ….

4. Some commands, e.g., AWSGetService refer to AWS commands that have been archived since Sep 30, 2019. “Get Service” seems to have been replaced by “List Buckets” or something like that. I wonder if LC AWS library is being kept pace with the changes in AWS.

I haven’t yet figured out how I would know if the authentication has failed (AWSSetCredentials doesn’t seem to return anything)

Regards,
Sri

Post Reply