GetSecretValueResponse not working to retrieve secret values

0

I am manually uploading the aws credentials file which contains access key , secret key, session token and many more. I am trying to fetch the secret values in my secret manager through java code. Currently i am using GetSecretValueResponse for fetching the values and AWSCredsProvider(access key, secret key) as my credentials provider. It is expecting it to be instanceof AwsSessionCredentials( access key , secret key, session token) but this is a final class, So how can I make my java code utilize the session token that is being provided in the file that I uploaded initially?

<dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>secretsmanager</artifactId> <version>2.20.22</version> </dependency>

dependancy that i have used.

ERROR: The security token included in the request is invalid. (Service: SecretsManager, Status Code: 400, Request ID: 7b4d76ea-389f-4068-8fde-577224a67f5c)

posta un anno fa538 visualizzazioni
1 Risposta
0

Hi,

Thank you for contacting us. Please note that this error message can appear if the expected credentials are not used appropriately. As an example, if your intention is to use temporary credentials, but you have configured your system to use only the access key and secret access key, without the session token value.

Please feel free to refer to the following documentation to identify how you may pass temporary credentials for use with AWS Java SDK:

The documentation contains details for specifying a credential provider or provider chain.

Feel free to reach back with any questions!

AWS
TECNICO DI SUPPORTO
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande