I want to create temporary credentials that last about 30 days, and will only have access to a specific directory in a specific S3 bucket (I have figured out what the policy to do this would look like). Note that the specific directory is determined by the username. (so its somewhat dynamic)
I have seen some potential options but they all have pitfalls:
- Amazon Cognito: For my use case, this will become too complex, as it will need some work on the client side.
- GetFederatedToken: This seemed like the best option, but only allows a max expiration time of 36 hours (3 days) for my use case, I would need something that lasts longer.
AssumeRole
and GetSessionToken
also have the same issue as GetFederatedToken
.
If there is some way that I could give the temporary credentials the permission to renew themselves via an API request, (but not change the policy attached to them), that would be perfect for my use case. Any thoughts on how I could achieve my desired result?
I don't want to use IAM's, as some of the users may be outside of my organization, and this number could grow really large.