0

ok so total aws noobie here trying to build an app using s3. as far as I could search all the docs for mobile sdks now point to the latest aws amplify framework which is shit because they don't allow iam based access but rather some cognito shit based auth login and i don't want that?

So anyone knows ways by which i could use a private s3 bucket in android without the user login but rather access key based login?

Comments
  • 2
    Use the rest API would be the other option. Look into signed urls.

    Ideally, you should put a facade service in front of your app that abstracts the s3 access and secure it using your user's identity. Letting users directly manipulate s3 on your account is a very bad idea.
  • 0
    @SortOfTested i only needed to give a read access to the logged in users . But i am not using the amzon cognito based authentication but rather a firebase based auth.

    As of now i am not using the amplify's classes directly but rather its parent(?) classes of aws s3 sdk ( which i guess is deprecated by the aws but somehow still accessible if we just add the amplify storage library

    I have also created an iam user which can read s3 buckets whose access keys i will be bundling with the app. So is that a correct approach? Or it can be done in a better manner?
  • 0
    @2Large
    Like I said, write a service that will be able to request signed urls from s3 and forward them to your users. That's how you're supposed to give random access.

    https://docs.aws.amazon.com/AmazonC...
  • 0
    @SortOfTested hey this helped , thanks. After searching through a million urls, i was finally able to get my videos working.

    I am using something called presigned urls, so that the urls are not sending the iam keys directly but rather the encryption algo, some timestamp , some public hash and other stuff. It was my first time using aws services, nd its so complicated yet so dope!

    I am still bundling the iam user keys within app, so i guess that could use a better alternative .
Add Comment