{"id":2399,"library":"awscli-local","title":"awscli-local","description":"awscli-local is a thin Python wrapper around the standard 'aws' command-line interface (CLI) that enables seamless interaction with LocalStack, a cloud service emulator. It allows developers to execute AWS CLI commands against their local LocalStack instance without needing to explicitly specify the `--endpoint-url` parameter. The current version is 0.22.2, and it is actively maintained by the LocalStack team, receiving regular updates.","status":"active","version":"0.22.2","language":"en","source_language":"en","source_url":"https://github.com/localstack/awscli-local","tags":["aws","cli","localstack","testing","development","cloud","emulator","awslocal"],"install":[{"cmd":"pip install awscli-local[ver1]","lang":"bash","label":"Recommended (includes AWS CLI v1)"},{"cmd":"pip install awscli-local","lang":"bash","label":"Wrapper only (manage AWS CLI separately)"}],"dependencies":[{"reason":"Core functionality; awscli-local is a wrapper around the AWS CLI. The `[ver1]` extra specifically installs AWS CLI v1.","package":"awscli","optional":false},{"reason":"Used internally by the `awslocal` script for configuration and endpoint detection.","package":"localstack-client","optional":false}],"imports":[],"quickstart":{"code":"# First, ensure LocalStack is running (e.g., via `localstack start` or Docker).\n# Then, use awslocal as you would aws, but interacting with your local services.\nawslocal s3 mb s3://my-local-bucket\nawslocal s3 ls","lang":"bash","description":"This quickstart demonstrates creating and listing an S3 bucket using the `awslocal` command, assuming LocalStack is already running on your machine. This eliminates the need for `--endpoint-url` on most commands."},"warnings":[{"fix":"Use `pip install awscli-local[ver1]` to install the wrapper with AWS CLI v1. If AWS CLI v2 is desired, install it separately (e.g., using the official AWS installer) and ensure `awslocal`'s PATH is correctly configured. Be aware of known limitations, particularly for CloudFormation.","message":"Automatic installation of AWS CLI version 2 (AWS CLI v2) is not directly supported via `pip install awscli-local[ver2]` because AWS CLI v2 is not officially available as a PyPI package. While `awslocal` can technically work with a manually installed AWS CLI v2, it's generally recommended to stick with AWS CLI v1 (installed via `awscli-local[ver1]`) to avoid potential issues and limitations.","severity":"breaking","affected_versions":"All versions"},{"fix":"Ensure the directory where `awslocal` is installed (e.g., `~/.local/bin` for user installs, or a virtual environment's `bin` directory) is included in your PATH. Reload your shell by sourcing its configuration file (e.g., `source ~/.bashrc` or `source ~/.zshrc`) or by opening a new terminal window.","message":"After installing `awscli-local` via pip, users might encounter 'awslocal: command not found'. This typically means the executable's location is not in the system's PATH environment variable, or the shell hasn't refreshed its PATH after installation.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use the `AWS_ENDPOINT_URL` environment variable (e.g., `export AWS_ENDPOINT_URL=http://localhost:4566`) instead of `LOCALSTACK_HOST` or `USE_SSL`.","message":"Environment variables `LOCALSTACK_HOST` and `USE_SSL` are deprecated for configuring the LocalStack endpoint. They have been replaced by `AWS_ENDPOINT_URL`.","severity":"deprecated","affected_versions":"All versions"},{"fix":"The recommended workaround is to downgrade to AWS CLI v1 for `cloudformation` commands by installing `awscli-local[ver1]`. Alternatively, for advanced use cases, consider directly interacting with LocalStack's S3 service for asset storage.","message":"There is a known limitation when using AWS CLI v2 for `cloudformation package` commands: it is not possible to specify the S3 endpoint URL. This issue affects deploying CloudFormation templates with S3 assets via `awslocal` when backed by AWS CLI v2.","severity":"breaking","affected_versions":"All versions (when using AWS CLI v2)"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}