By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Can we provide temporary access key,ID and session token in AWS Credentials File

0

While creating a aws credentials file in windows can we provide temporary access keys and id and session tokens..!?

Would be really great if you could help with this..

Thanks.

asked 6 months ago229 views
2 Answers
1

Hello.

I hope the steps in the document below will be helpful.
The steps in the document below use "aws sts assume-role" to obtain temporary credentials from an IAM role.
Rather than creating an authentication file, it is registered in an environment variable.
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html#using-temp-creds-sdk-cli

profile picture
EXPERT
answered 6 months ago
profile pictureAWS
EXPERT
reviewed 6 months ago
0

Hello,

The official documentation states that storing temporary credentials in credential files is acceptable [1]. However, instead of updating the file each time the short-term credentials expire, consider exporting them as environment variables [2]. This avoids repeatedly editing the credential file.

[1] https://docs.aws.amazon.com/cli/v1/userguide/cli-authentication-short-term.html

[2] https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html#using-temp-creds-sdk-cli

AWS
answered 6 months 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