Skip to content

Implement Ultra-Lazy-Load #18

@naftulikay

Description

@naftulikay

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions