{"id":20805631,"url":"https://github.com/devrico003/aws-profile-loader","last_synced_at":"2026-04-21T15:37:39.995Z","repository":{"id":183950052,"uuid":"671052411","full_name":"DevRico003/aws-profile-loader","owner":"DevRico003","description":"This repository contains a bash function that helps to load AWS CLI profiles stored in your environment variables. The function prompts for a profile name, then sets up the AWS CLI to use the credentials associated with that profile.","archived":false,"fork":false,"pushed_at":"2023-08-05T09:08:46.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T03:33:38.815Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DevRico003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-26T12:38:29.000Z","updated_at":"2023-09-03T19:35:57.000Z","dependencies_parsed_at":"2025-03-12T03:29:58.951Z","dependency_job_id":"a10b995e-b9e3-4ed8-a5d5-0129833ec745","html_url":"https://github.com/DevRico003/aws-profile-loader","commit_stats":null,"previous_names":["devrico003/aws-profile-loader"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DevRico003/aws-profile-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRico003%2Faws-profile-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRico003%2Faws-profile-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRico003%2Faws-profile-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRico003%2Faws-profile-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevRico003","download_url":"https://codeload.github.com/DevRico003/aws-profile-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevRico003%2Faws-profile-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32098373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T19:15:46.813Z","updated_at":"2026-04-21T15:37:39.973Z","avatar_url":"https://github.com/DevRico003.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CLI Profile Loader\n\nThis repository contains a bash function that helps to load AWS CLI profiles stored in your environment variables. The function prompts for a profile name, then sets up the AWS CLI to use the credentials associated with that profile.\n\n## Setup\n\n1. Clone the repository:\n\n    ```\n    git clone https://github.com/yourusername/aws-cli-profile-loader.git\n    cd aws-cli-profile-loader\n    ```\n\n2. Edit your `.bashrc`:\n\n    Open your `.bashrc` file in your favourite text editor:\n\n    ```bash\n    vi ~/.bashrc\n    ```\n\n    Then, add the following bash function at the end of the file:\n\n    ```bash\n    load_profile() {\n        echo \"Enter the profile name: \"\n        read profile_name\n\n        if [ ! -f ~/.env/\"$profile_name\" ]; then\n            echo \"Profile '$profile_name' not found!\"\n            return 1\n        fi\n\n        source ~/.env/\"$profile_name\"\n\n        # Update the PS1 prompt with the current profile name and export the variable\n        export AWS_PROFILE=$profile_name\n        PS1=\"[$profile_name] $PS1\"\n    }\n    ```\n\n    Finally, call the function at the end of the `.bashrc`:\n\n    ```bash\n    load_profile\n    ```\n\n3. Save and close the file.\n\n    Your changes will take effect the next time you start a new shell. If you want them to take effect immediately in your current shell, you can run:\n\n    ```bash\n    source ~/.bashrc\n    ```\n\n## Usage\n\nWhenever you open a new terminal, the function will automatically prompt you to enter the name of the AWS profile that you want to use. After you enter the name, the function will load the environment variables for that profile and set up the AWS CLI to use those credentials.\n\nIf you want to switch profiles, just call the `load_profile` function:\n\n```bash\nload_profile\n```\n\n## Note\n\nThe `.bashrc` file is one of the shell configuration files where you can define functions, aliases, and environment variables, and it is run whenever you start a new shell. Depending on your system setup, you may need to add the function to other files such as `.bash_profile`, `.profile`, or `.zshrc` (if you're using Zsh). If you want the function to run for all users, you could consider adding it to `/etc/profile` or `/etc/bash.bashrc` instead. \n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrico003%2Faws-profile-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevrico003%2Faws-profile-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrico003%2Faws-profile-loader/lists"}