Creating a Java API Session

0

I am trying to create a Java API, and I simply cannot make sense of the credentials. Years ago, I created an Access key, planning to create an API, but got busy and never used it. Now I am trying to move forward with this and I am having trouble creating the 'config' and 'credentials' files. I think I have created the config file, but I am not 100% sure it is correct. For the credentials file, I have the 'aws_access_key_id' and the 'aws_secret_access_key', which I saved years ago, but I don't know what the 'aws_session_token', how to create it, or how to find it.

When I try to test it, I found online it said to test it to run: aws sts get-caller-identity

Which generates: Error loading SSO Token: Token for MUA-API does not exist (obviously my Instance is 'MUA-API')

... I am completely confused.

Thanque!

asked 17 days ago148 views
1 Answer
0

Try to run aws sts get-caller-identity with --debug option. You will see more details about the error with debug option. you can generate session token using get-session-token command. https://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html But do you need temporary session token? It seems you have long term credentials.

profile pictureAWS
EXPERT
SriniV
answered 17 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions