Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Ultra-Lazy-Load #18

Open
naftulikay opened this issue Dec 27, 2021 · 0 comments
Open

Implement Ultra-Lazy-Load #18

naftulikay opened this issue Dec 27, 2021 · 0 comments

Comments

@naftulikay
Copy link
Owner

Presently with #16, we support lazy-loading of credential files when a qualified profile URI is used. If you have a profile named dev in ~/.aws/credentials.d/92-something.gpg, the profile URI will be dev/92-something; if stg exists in ~/.aws/credentials, then the profile URI will be /stg.

Currently, lazy-loading works for root URIs, but if a non-root profile URI is used, we load all profiles rather than incrementally try to load by the file stem. The most optimal solution would be to lazy load like this:

  • ✔️ If passed a root URI:
    1. Load the root credentials file and return profile if found.
    2. Load all credentials and return profile if found.
  • 🚫 If passed a non-root URI:
    1. Load files matching the profile URI prefix as a file stem, and return profile if found.
    2. Load all credentials and return profile if found.
  • ✔️ If passed a profile name and not a URI, load all files and return profile if found.

Implementing the non-root URI lazy-loading is what is required by this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant