{"id":15710343,"url":"https://github.com/aws/aws-elastic-beanstalk-cli-setup","last_synced_at":"2025-04-11T11:40:34.093Z","repository":{"id":36069919,"uuid":"179166234","full_name":"aws/aws-elastic-beanstalk-cli-setup","owner":"aws","description":"Simplified EB CLI installation mechanism.","archived":false,"fork":false,"pushed_at":"2024-06-03T02:49:18.000Z","size":534,"stargazers_count":532,"open_issues_count":70,"forks_count":229,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-04T05:28:56.609Z","etag":null,"topics":["aws","awsebcli","eb-cli","ebcli","elastic-beanstalk","elasticbeanstalk","installation","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-04-02T22:09:33.000Z","updated_at":"2025-03-26T08:05:17.000Z","dependencies_parsed_at":"2022-07-13T01:40:33.039Z","dependency_job_id":"f4a8909e-b38c-4b9f-84cc-4ef0c15f9dd6","html_url":"https://github.com/aws/aws-elastic-beanstalk-cli-setup","commit_stats":{"total_commits":79,"total_committers":12,"mean_commits":6.583333333333333,"dds":0.2784810126582279,"last_synced_commit":"e30f36303e22a868cf512eca246a0d001af9a19e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-elastic-beanstalk-cli-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-elastic-beanstalk-cli-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-elastic-beanstalk-cli-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-elastic-beanstalk-cli-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/aws-elastic-beanstalk-cli-setup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248385360,"owners_count":21094871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","awsebcli","eb-cli","ebcli","elastic-beanstalk","elasticbeanstalk","installation","python"],"created_at":"2024-10-03T21:06:23.259Z","updated_at":"2025-04-11T11:40:34.064Z","avatar_url":"https://github.com/aws.png","language":"Python","readme":"# Elastic Beanstalk CLI Installer\n- [1. Overview](#1-overview)\n  - [1.1. Prerequisites](#11-prerequisites)\n- [2. Quick start](#2-quick-start)\n  - [2.1. Clone this repository](#21-clone-this-repository)\n  - [2.2. Install/Upgrade the EB CLI](#22-installupgrade-the-eb-cli)\n    - [MacOS/Linux](#macoslinux)\n    - [Windows](#windows)\n  - [2.3. After installation](#23-after-installation)\n- [3. Usage](#3-usage)\n  - [3.1 Advanced usage](#31-advanced-usage)\n  - [3.2 Options](#32-options)\n- [4. Troubleshooting](#4-troubleshooting)\n- [5. Frequently asked questions](#5-frequently-asked-questions)\n  - [5.1. For the **experienced Python developer**, what's the advantage of this mode of installation instead of regular `pip` inside a `virtualenv`?](#51-for-the-experienced-python-developer-whats-the-advantage-of-this-mode-of-installation-instead-of-regular-pip-inside-a-virtualenv)\n  - [5.2. On macOS (or Linux systems with `brew`), is this better than `brew install awsebcli`?](#52-on-macos-or-linux-systems-with-brew-is-this-better-than-brew-install-awsebcli)\n  - [5.3. I already have the EB CLI installed. Can I still execute `ebcli_installer.py`?](#53-i-already-have-the-eb-cli-installed-can-i-still-execute-ebcli_installerpy)\n  - [5.4. How does `ebcli_installer.py` work?](#54-how-does-ebcli_installerpy-work)\n  - [5.5. Are there dependency problems that this mode of installation doesn't solve?](#55-are-there-dependency-problems-that-this-mode-of-installation-doesnt-solve)\n- [6. License](#6-license)\n\n## 1. Overview\n\nThis repository hosts scripts to generate self-contained installations of the [EB CLI](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html).\n\n### 1.1. Prerequisites\n\nYou will need to have the following prerequisites installed before running the install script.\n\n* **Git**\n  * If not already installed you can download git from the [Git downloads page](https://git-scm.com/downloads).\n* **Python**\n  * We recommend that you install Python using the [pyenv](https://github.com/pyenv/pyenv) Python version manager. Alternately, you can download Python from the [Python downloads page](https://www.python.org/downloads/).\n* **virtualenv**\n  * Follow the [virtualenv documentation](https://virtualenv.pypa.io/en/latest/installation.html) to install virtualenv.\n\n## 2. Quick start\n\n### 2.1. Clone this repository\n\nUse the following:\n\n```\ngit clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git\n```\n\n### 2.2. Install/Upgrade the EB CLI\n\n#### MacOS/Linux\nOn **Bash** or **Zsh**:\n\n```\npython ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py\n```\n\n#### Windows\nIn **PowerShell** or in a **Command Prompt** window:\n\n```\npython .\\aws-elastic-beanstalk-cli-setup\\scripts\\ebcli_installer.py\n```\n\n### 2.3. After installation\n\nOn Linux and macOS, the output contains instructions to add the EB CLI (and Python) executable file to the shell's `$PATH` variable, if it isn't already in it.\n\n## 3. Usage\n\nThe `ebcli_installer.py` Python script will install the [awsebcli](https://pypi.org/project/awsebcli/) package in a virtual environment to prevent potential conflicts with other Python packages.\n\nFor most use cases you can execute the `ebcli_installer.py` script with no arguments.\n\n```\npython ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py\n```\n\n### 3.1 Advanced usage\n\n  - To install a **specific version** of the EB CLI:\n\n    ```shell\n    python scripts/ebcli_installer.py --version 3.14.13\n    ```\n\n  - To install the EB CLI with a specific **version of Python** (the Python version doesn't need to be in `$PATH`):\n\n    ```shell\n    python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer\n    ```\n\n  - To install the EB CLI **from source** (Git repository, .tar file, .zip file):\n    ```shell\n    python scripts/ebcli_installer.py --ebcli-source /path/to/awsebcli.zip\n\n    python scripts/ebcli_installer.py --ebcli-source /path/to/EBCLI/codebase/on/your/computer\n    ```\n  - To install the EB CLI at a **specific location**, instead of in the standard `.ebcli-virtual-env` directory in the user's home directory:\n\n    ```shell\n    python scripts/ebcli_installer.py --location /path/to/ebcli/installation/location\n    ```\n### 3.2 Options\n\n```\noptions:\n  -h, --help            show this help message and exit\n  -e VIRTUALENV_EXECUTABLE, --virtualenv-executable VIRTUALENV_EXECUTABLE\n                        path to the virtualenv installation to use to create the EBCLI's virtualenv\n  -i, --hide-export-recommendation\n                        boolean to hide recommendation to modify PATH\n  -l LOCATION, --location LOCATION\n                        location to store the awsebcli packages and its dependencies in\n  -p PYTHON_INSTALLATION, --python-installation PYTHON_INSTALLATION\n                        path to the python installation under which to install the awsebcli and its\n                        dependencies\n  -q, --quiet           enable quiet mode to display only minimal, necessary output\n  -s EBCLI_SOURCE, --ebcli-source EBCLI_SOURCE\n                        filesystem path to a Git repository of the EBCLI, or a .zip or .tar file of\n                        the EBCLI source code; useful when testing a development version of the EBCLI.\n  -v VERSION, --version VERSION\n                        version of EBCLI to install\n```\n\n## 4. Troubleshooting\n\n- **Linux**\n\n    Most installation problems have been due to missing libraries such as `OpenSSL`.\n\n  - On **Ubuntu and Debian**, run the following command to install dependencies.\n\n    ```shell\n    apt-get install \\\n        build-essential zlib1g-dev libssl-dev libncurses-dev \\\n        libffi-dev libsqlite3-dev libreadline-dev libbz2-dev\n    ```\n\n  - On **Amazon Linux and Fedora**, run the following command to install dependencies.\n\n    ```shell\n    yum group install \"Development Tools\"\n    yum install \\\n        zlib-devel openssl-devel ncurses-devel libffi-devel \\\n        sqlite-devel.x86_64 readline-devel.x86_64 bzip2-devel.x86_64\n    ```\n\n- **macOS**\n\n  Most installation problems on macOS are related to loading and linking OpenSSL and zlib. The following command installs the necessary packages and tells the Python installer where to find them:\n\n    ```\n    brew install zlib openssl readline\n    CFLAGS=\"-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include\" LDFLAGS=\"-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib\"\n    ```\n    Run `brew info` to get the latest environment variable export suggestions, such as `brew info zlib`\n\n- **Windows**\n\n    - In PowerShell, if you encounter an error with the message \"execution of scripts is disabled on this system\", set the [execution policy](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-6) to `\"RemoteSigned\"` and then rerun `bundled_installer`.\n\n      ```ps1\n      Set-ExecutionPolicy RemoteSigned\n      ```\n    - If you encounter an error with the message \"No module named 'virtualenv'\", use the following commands to install `virtualenv` and the EB CLI:\n      ```ps1\n      pip uninstall -y virtualenv\n      pip install virtualenv\n      python .\\aws-elastic-beanstalk-cli-setup\\scripts\\ebcli_installer.py\n      ```\n## 5. Frequently asked questions\n\n### 5.1. For the **experienced Python developer**, what's the advantage of this mode of installation instead of regular `pip` inside a `virtualenv`?\n\nEven within a `virtualenv`, a developer might need to install multiple packages whose dependencies are in conflict. For example, at times the AWS CLI and the EB CLI have used conflicting versions of `botocore`. [One such instance](https://github.com/aws/aws-cli/issues/3550) was particularly egregious. When there are conflicts, users have to manage separate `virtualenvs` for each of the conflicting packages, or find a combination of the packages without conflicts.\n\nBoth of these workarounds become unmanageable over time, and as the number of packages that are in conflict increases.\n\n### 5.2. On macOS (or Linux systems with `brew`), is this better than `brew install awsebcli`?\n\n**Yes**, for these reasons:\n\n  - The AWS Elastic Beanstalk team has no control over how `brew` operates.\n  - The `brew install ...` mechanism doesn't solve the problem of dependency conflicts, which is a primary goal of this project.\n\n### 5.3. I already have the EB CLI installed. Can I still execute `ebcli_installer.py`?\n\n**Yes**.\n\nConsider the following two cases:\n\n- `ebcli_installer.py` was previously run, creating `.ebcli-virtual-env` in the user's home directory (or the user's choice of a directory indicated through the `--location` argument). In this case, the EB CLI will overwrite `.ebcli-virtual-env` and attempt to install the latest version of the EB CLI in the `virtualenv` within it.\n\n- `eb` is in `$PATH`, however, it wasn't installed by `ebcli_installer.py`. In this case, the installer will install `eb` within `.ebcli-virtual-env` in the\nuser's home directory (or the user's choice of a directory indicated through the `--location` argument), and prompt the user to prefix\n`/path-to/.ebcli-virtual-env/executables` to `$PATH`. Until you perform this action, the older `eb` executable file will continue to be referenced when you type `eb`.\n\n### 5.4. How does `ebcli_installer.py` work?\n\nWhen executing the Python script, `ebcli_installer.py` does the following:\n\n- Creates a `virtualenv` exclusive to the `eb` installation.\n- Installs `eb` inside that `virtualenv`.\n- In the `\u003cinstallation-location\u003e/executables` directory, it generates:\n  - A `.py` wrapper for `eb` on Linux or macOS.\n  - `.bat` and `.ps1` wrappers for `eb` on Windows.\n- When complete, you will be prompted to add `\u003cinstallation-location\u003e/executables` to `$PATH`, only if the directory is not already in it.\n\n### 5.5. Are there dependency problems that this mode of installation doesn't solve?\n\nUnfortunately, **yes**.\n\nSuppose the dependencies of `eb`, say `Dep A` and `Dep B`, are in conflict. Because `pip` lacks dependency management capabilities, the resulting `eb` installation might not work.\n\n## 6. License\n\nThis library is licensed under the Apache-2.0 License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-elastic-beanstalk-cli-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Faws-elastic-beanstalk-cli-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-elastic-beanstalk-cli-setup/lists"}