Public and Private files access
So far we have assigned a role to our authenticated users, who can List the files inside the configured document bucket.
Now let's restrict this access further to only allow to /public-files/
folder and their own folder. The below policy will ensure that the application can only have default read access to the public-files folder.
After updating the policy users can now read the public files and get full access to their own folders.
We are using the Cognito variables inside the IAM Policies to have dynamic permissions.
After applying the above policy if you continue seeing the Access Denied error then logout and login again. This will create a new session with an updated policy token.
Upload a new file and confirm the access.
Last updated