Unlike the CLI, credentials are not cached on disk under ~/.aws/cli/cache and as such I have to type in my MFA every time I run a python script using boto. This is even more annoying with codes only usable once because I now have to wait 30 seconds between script executions.
Please have the credentials cached on disk like the awscli does.
Marking this as a feature request.
@jamesls , I see back in 2014 you added the persistently cached credentials to awscli and not botocore intentionally ( https://github.com/aws/aws-cli/commit/22932e53c7085bd8e53b22904b326c426e2e60fc ).
Have you had any further thought on adding this to botocore? I currently use a patched version of botocore and boto3 to introduce your persistent cached credentials from awscli into botocore so that awscli and boto3 share the cached credentials store. If you'd like I can make a PR that introduces this functionality into botocore.
I cannot understand why we wouldn't want cached MFA credentials when using boto3 (or any of the SDKs for that matter). MFA = human interaction = I want SOME level of caching.
I created a PR to fix this bug ( #1157 ) a couple weeks back. I've been using it locally since then and it works great. Any guidance on what would be needed to get this merged? Any additions or changes?
This issue has been resolved with the merge of PR https://github.com/boto/botocore/pull/1338. Closing the issue.
Here is the final disposition of PR #1157 and how it relates to #1338 including how to use the botocore cache.
Most helpful comment
I created a PR to fix this bug ( #1157 ) a couple weeks back. I've been using it locally since then and it works great. Any guidance on what would be needed to get this merged? Any additions or changes?