Question

I'm having issues integrating the AWS iOS SDK (authentication specifically) along with download of a simple URL from a bucket.

I'm using StackMob to store my data, and files are managed through AWS in S3 storage. When querying for an object, the link to the S3 object is given.

I have implemented the Anonymous bucket token registration, and it works fine in the demo application, I can see all the buckets as well as the files in the buckets but here's the big question:

How do I authenticate with AWS using the iOS SDK, and use that authentication to download a URL to an object in my bucket that I already have the link to?

Going directly to that link brings up an access denied error. Also, some of the files are private and not distributed, so I do not want to just make the entire bucket public for people to access with the link.

Any suggestions? I think I read somewhere that you can manipulate the URL to include your access key and secret key, but that you should never include that in a binary as it could get stolen, so maybe having it on a private server and pulling that key to temporarily use it?

Any help would be great! Thanks

Was it helpful?

Solution

I contacted Amazon support, and it turns out that what I'm looking to do is currently impossible with the SDK.

The only way to generate a URL is having the bucket name, key, and use the "getPreSignedURL" API call to get a signed link to it.

I'll leave this up, hopefully someone will learn from this and not have to pay $50/month for support for this one question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top