Some time ago I needed help for similar behavior for Google Compute Engine. But at the moment I need to do the same, getting the authorization token for the AWS API. This behavior is not yet implemented by the library explicitly.
The previous ask was: Manual authentication for Google API in jclouds
EDIT:
Actually, I'd like to get this session token in an earlier step somehow:
Token token = methodGetToken(<temp_access_key>, <temm_access_secret>);
SessionCredentials credentials = SessionCredentials.builder()
.sessionToken( token.toString() )
.build();
ContextBuilder.newBuilder("aws-ec2")
.credentialsSupplier(Suppliers.ofInstance(credentials))
...
Do you mean authenticating to AWS using a session token you already have? If that is the case, you can build a
SessionCredentialsobject and pass it to the jcloudsContextBuilderwhen creating the context. Something like: