Reputation: 137
We have S3 buckets which is private. s3 bucket is created manually and files in it uploaded by our .net server (files are also private) And we want to access these private files securely in android app. We did not have any login/sigup in app.
I am using following approach for it
1. Created identity pool and enabled access to unauthenticated identities as there is no any login in our app
2. Configured IAM role. for unAuth role, added inline policy to have full aceess to s3 bucket
And i am using following aws sample to test approach
https://github.com/awslabs/aws-sdk-android-samples/tree/master/S3TransferUtilitySample
My question is that
Thanks in advance.
Upvotes: 1
Views: 2345
Reputation: 847
Using unauth identities might not be the best way in this case. Since unauth identities are can be obtained by anyone. You should ideally have your own authorizer to do this. It could be done in multiple ways like API Gateway and Lambda which gives you a pre-signed URL in the app which can be used to fetch S3 files.
Thanks, Rohan
Upvotes: 1