I'm working on a flask backend app. There are some profile images coming in from the android frontend to the flask API endpoint. I want to store these images.
Tech stack : Android app, Flask API/backend, Postgres, AWS services.
What would be the best idea?
I thought of the following ideas. Do let me know if any of these ideas make sense!
Storing the images directly in the Postgres database. ( i think this is bad as it will put a load on the database).
Storing the images in Amazon S3 buckets and S3 file paths as one of the values in the Postgres table.
An improvement for 2 i thought would be - Have the arrangement like 2, and have a CDN such as Amazon Cloudfront for CDN and faster distribution to other services requesting the images.
How does it sound? Any other ideas?
Thanks! :)