I am new to Amazon S3. I need some help with S3 storage solution. Here is my problem.
I have created a bucket in Amazon S3. Now everyone can access my bucket URL (e.g. https://BUCKET_NAME.s3.amazonaws.com) and they could see all the files inside the bucket. I want only my mobile apps users to be able to view/see/download the files in the bucket. But if I block the files/set the files in the bucket as private, my mobile apps users would not be able to view his/her files.
So the question:
If you have any idea how it can be done, can you show me an example? Thanks :)
NOTE: I am using Parse JavaScript SDK, AWS S3, AWS EC2, Elastic beanstalk and Ionic 2 with Angular 2.
If you think I have missed out any details, please let me know so I can add it :)
There are multiple options available to secure access for specific users.
You can S3 bucket access to specific IAM role. So create a new user and attach an IAM policy to that user. Configure your Lambda with that role. If you want you can create multiple roles depends on each user type (Example :- Role uniquely for mobile users, another role for desktop users etc.)
Please read more about how to restrict Amazon S3 Bucket access to a specific IAM Role here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With