'Using mobile app using Flutter/Firebase to securely upload and read files from AWS S3

Am writing an instagram type image/video sharing app in flutter that uses Firebase for auth (Google/Facebook/Apple/Twitter). As Firebase storage services are very pricey, I want to use cheaper option of AWS S3. So, once the user is authenticated, the app should be able to -

  1. Uplaod the AWS S3 bucket - but in a secure manner. If I use pre-signed URL, I'll still need to store access key Id in the app, which is not very secure IMO
  2. Read the files from the S3 - same issue as above
  3. One user should not be able to see other user's file or manipulate them in any way - I guess signed URL will help here too

In short - how to securely access S3 bucket via a mobile app when the user has been authenticated using Firebase



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source