I needed access to SNS for a personal project and couldn’t quite figure out how to bend that into the MBS CURL S3 example, so I ended up writing some AWS classes in pure Xojo code. I have it working for SNS (sending SMS via Xojo!) and figured I should see what all services anyone else uses to test and get working before offering the code to the public.
The classes have the benefit of being pure Xojo code, however you have to (and I know this is hard for some) read the AWS Documentation to know what parameters you need. The classes take care of the authorization and signing of the HTTP POST request, and setting up the Xojo.Net.HTTPSocket, and waiting for a response.
I do plan to get an example for S3 working, so I’m looking specifically for requests on other services to make sure the classes work in general.
As a little teaser, look how easy it is to send a SMS with AWS SNS in Xojo!
[code]oReq = new clsAWSRequest
oReq.AWS_Access_Key = kAWS_ACCESS
oReq.AWS_Secret_Key = kAWS_SECRET
oReq.Endpoint = “sns.us-east-1.amazonaws.com”
oReq.Region = “us-east-1”
oReq.Service = “sns”
oReq.Parameters.Value(“Action”) = “Publish”
oReq.Parameters.Value(“Message”) = “Test SMS from Xojo!”
oReq.Parameters.Value(“PhoneNumber”) = “+PHONENUMBER”