Registry / aws / awsebcli

awsebcli

JSON →
library3.27.1pypypiunverified

The AWS Elastic Beanstalk Command Line Interface (EB CLI) is an open-source tool that simplifies the deployment and management of AWS Elastic Beanstalk applications and environments directly from the command line. It provides an intuitive interface, integrates with Git, and supports all key Elastic Beanstalk operations. The current version is 3.27.1, with a frequent release cadence that often includes new region support, features, and bug fixes.

pip install awsebcli
INSTALL
IMPORT
SIG · AWSEBCLI
A
awsebcli
awspythonv3.27.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart guides you through initializing a new Elastic Beanstalk application, creating an environment, deploying a simple 'Hello World' web application, updating it, and finally terminating the environment. Ensure AWS credentials are configured (e.g., via `aws configure` or environment variables) before running `eb init`.

# 1. Create a new project directory and navigate into it mkdir my-hello-app cd my-hello-app # 2. Create a simple index.html file echo "Hello World" > index.html # 3. Initialize your directory with EB CLI and configure Elastic Beanstalk eb init # Follow the prompts to select region, application, platform (e.g., Python, Docker), and set up SSH. # You will be prompted for AWS credentials (access key ID and secret access key). # 4. Create your running environment and deploy the application eb create # Follow the prompts to create an environment. This can take several minutes. # 5. Open your application in a browser once the environment is healthy eb open # 6. Make a change to your application and deploy an update (requires Git commit) echo " to you!" >> index.html git init git add . git commit -m "Updated message" eb deploy # 7. Terminate the environment when no longer needed eb terminate
eb --version
Debug
Known issues
gotchaDirect `pip install awsebcli` can lead to dependency conflicts with other Python packages, especially `awscli`, due to shared underlying dependencies like `botocore`. This is a common source of breakage.
fix
Always install `awsebcli` into a dedicated Python virtual environment (e.g., using `python -m venv .venv` then `pip install`) or use the official `aws-elastic-beanstalk-cli-setup` script, which automates virtual environment creation.
affects: All versions
gotchaAfter installation, especially if not using the setup script or on specific operating systems (e.g., Linux/macOS, Git Bash on Windows), the `eb` executable might not be in your system's PATH, resulting in 'command not found' errors.
fix
Ensure the directory containing the `eb` executable (e.g., `~/.ebcli-virtual-env/executables` or `~/Library/Python/X.Y/bin`) is added to your shell's PATH environment variable. The `ebcli_installer.py` script usually prompts you to do this.
affects: All versions
breakingThe EB CLI requires AWS security credentials (access key ID and secret access key) to interact with your AWS account. Operations will fail with authentication errors if not configured.
fix
Configure your AWS credentials using `aws configure` (requires AWS CLI to be installed and configured), by setting environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`), or by using an IAM role if running on an EC2 instance.
affects: All versions
gotcha`eb deploy` deploys the code that is under Git source control. It uses the Git commit ID and message as the application version label and description, respectively. Changes not committed to Git will not be deployed.
fix
Always commit your changes (`git add .`, `git commit -m "Message"`) before running `eb deploy` to ensure the desired application version is uploaded and correctly labeled.
affects: All versions
gotchaOn Windows, especially with usernames containing spaces or when using Git Bash, the `eb` command might not be found or may fail due to incorrect path handling in generated `.bat` files.
fix
Manually edit the `eb.bat` and `path_exporter.bat` files (typically found in `C:\Users\YOUR_USERNAME\.ebcli-virtual-env\executables`) to wrap paths containing spaces in double quotes. For Git Bash, explicitly add the Python Scripts directory (e.g., `C:\Users\XXXX\AppData\Roaming\Python\Python37\Scripts`) to your PATH.
affects: All versions
Errors
Common errors & fixes
Command 'eb' not found
The 'eb' command is not in the system's PATH, possibly due to an incomplete or incorrect installation of the EB CLI.
fix
Ensure the EB CLI is installed correctly and that its installation directory is added to the system's PATH.
ERROR: OSError - [Errno 2] No such file or directory
The EB CLI cannot locate a required file or directory, often due to misconfigured paths or missing files.
fix
Verify that all necessary files and directories exist and are correctly referenced in the configuration.
pkg_resources.DistributionNotFound: The 'awsebcli==3.10.0' distribution was not found and is required by the application
The specified version of the 'awsebcli' package is not installed or is inaccessible.
fix
Install the required version of 'awsebcli' using pip: 'pip install awsebcli==3.10.0'.
ImportError: cannot import name '__version__'
The EB CLI is unable to import the '__version__' attribute, possibly due to a corrupted or incomplete installation.
fix
Reinstall the EB CLI to ensure all components are correctly installed.
ERROR: MissingServiceIdError - The model being used for the service elasticbeanstalk is missing the serviceId metadata property, which is required.
The EB CLI is using an outdated or incompatible model that lacks the required 'serviceId' metadata.
fix
Update the EB CLI to the latest version to ensure compatibility with the current AWS service models.
Upgrade
Version history
3.27.1latest on PyPI · released Mar 25, 2026
Audit
Dependencies
pythonrequiredThe EB CLI is a Python package; Python 3.6+ is recommended.
piprequiredRequired to install the Python package.
gitrequiredIntegral for version control features and source bundle creation; also needed if installing via the setup script.
botocorerequiredUnderlying AWS SDK for Python dependency for interacting with AWS services.
virtualenvoptionalUsed by the recommended setup script to create an isolated environment.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
awsebcli — pip install awsebcli · libregistry