Search code examples
amazon-s3amazon-amiamazon-cognito

When using S3 in AWS, how do you manage access to specific images?


I am developing image server through S3 in AWS(Amazon Web Service) but i should solve the management issue What i mean is that end user should be able to specific images in S3 For that, i am thinking about IAM(Identity access management) for allowing some users to access specific images.

What i want to know is that whether there is other solutions or not. Actually, i have found about cognito but unfortunately cognito is supported in only 2 regions....

If you have a good idea, please give me explanation thank you


Solution

  • Unfortunately there is nothing in the suite of AWS services that fits your use case 100%.

    While Amazon Cognito is only available in 2 regions, this does not restrict you to accessing S3 from only those 2 regions with credentials vended from the service. You could Amazon Cognito and IAM roles to define a policy that would allow for limited permissions to a set of files based on the prefix. However, at the current time, role policies would allow you to restrict access to 2 classes of files:

    • "Public files" - files accessible via all identities in your pool.
    • "Private files" - files accessible only to a specific identity in your pool.

    If you wanted to support restricting access to specific files to specific users in your application you would need to handle this through a backend application that would proxy the access to the files in S3.