I am using the Amazon Java SDK, it is used to do the following:
- Create a group
- Create a policy
- Attach the policy to the group
- Add an existing user to the group
This is done to give a user temporary access to a location in an S3 bucket. The problem is that after step #4, if I initiate an operation on behalf of the user, I can receive a 403 Forbidden message, because the user doesn't have access. If I had a Thread.sleep()
call to delay things, and let them propagate, it seems to work. Sleeping for 1 second was too short, and 5 seconds was long enough.
Does anyone know if there is an official length of time required to let a new policy and group association propagate in AWS?
Thanks.