Can I explicitly expire session tokens acquired from AWS STS service using AWS Java SDK?
No, it is not possible to expire tokens issued by STS.
However, if the STS token was based based a role, you can change the permissions associated with the role, which will then impact users who are using the STS credentials.
The AWSRevokeOlderSessions
does this by checking the login time, denying permissions if the session is older than a particular time. This affects the role, but does not in itself expire the STS credentials.