-
Confirm by changing [ ] to [x] below:
Issue is about usage on:
Platform/OS/Hardware/Device Describe the question I can see (is that even the right place?) that it does a sha1 hash of some arguments but which? aws-cli/awscli/botocore/credentials.py Line 744 in 43679b4 |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
Hi @rehanvdm, this function and the method for hashing to generate the cache file is not really intended to be public facing and is subject to change. If you provide some more details about your use case maybe we can provide some guidance or a feature request that can help you solve your problem. |
Beta Was this translation helpful? Give feedback.
-
Well I guess(know) I am doing something that I am not suppose to. I want to write to the cache. I have an external program that handles the MFA and SSO logins. Currently I am exporting the STS tokens back to the profile under a different profile name so that they can be used by any other program as well. But it would not be needed if I could just write to the cache. |
Beta Was this translation helpful? Give feedback.
-
I see - using the cache outside of the AWS CLI is not recommended, and as previously noted those are implementation details that may change, the interface is not intended to be public. By "used by any other program" do you mean another program that uses an AWS SDK? If that's the case, wouldn't the credentail process be a possible solution? https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html |
Beta Was this translation helpful? Give feedback.
-
Since this is a guidance question, I'm moving this to GitHub Discussions. Thanks! |
Beta Was this translation helpful? Give feedback.
-
For the time being, it's a SHA1 digest of a JSON string with
|
Beta Was this translation helpful? Give feedback.
-
Thanks @raymondchen625, I came to a similar conclusion debugging the source, but I figured I don't want to misuse the AWS CLI and make use of non public info/functionality. FYI @kdaily this is what I meant with "used by any other program", this is that program https://cloudglance.dev/ 😁 |
Beta Was this translation helpful? Give feedback.
-
This is relevant for a use case I'm trying to fill... we have several tools that must have credentials set in the environment (e.g. We can easily script around ensuring that a given profile has been accessed at least once to make sure a set of credentials exists in I'm happy to use the bash snippet that @raymondchen625 shared above - but I don't see a consistent way to determine the values for the SerialNumber. (I can get the account ID and role from Any suggestions? |
Beta Was this translation helpful? Give feedback.
Hi @rehanvdm, this function and the method for hashing to generate the cache file is not really intended to be public facing and is subject to change. If you provide some more details about your use case maybe we can provide some guidance or a feature request that can help you solve your problem.