
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
awscli-local
Advanced tools
This package provides the awslocal command, which is a thin wrapper around the aws
command line interface for use with LocalStack.
You can install the awslocal command via pip:
pip install awscli-local[ver1]
If you're on macOS or use ZSH, please use the following command to install awslocal via pip:
pip install "awscli-local[ver1]"
Note that the command above also installs the latest version of the underlying AWS CLI version 1 (awscli) package. Use this command if you prefer to manage your own version of awscli (e.g., v1/v2) and install the wrapper script only:
pip install awscli-local
Note: Automatic installation of AWS CLI version 2 is currently not supported yet (at the time of writing there is no official pypi package for v2 available), but the awslocal technically also works with AWS CLI v2 (see this section for more details).
The awslocal command has the same usage as the aws command. For detailed usage, please refer to the manual pages of aws help.
Instead of the following command ...
aws --endpoint-url=http://localhost:4566 kinesis list-streams
... you can simply use this:
awslocal kinesis list-streams
You can use the following environment variables for configuration:
AWS_ENDPOINT_URL: The endpoint URL to connect to (takes precedence over USE_SSL/LOCALSTACK_HOST below).
Useful when you have LocalStack bound to a different host (e.g., within docker-compose).LOCALSTACK_HOST (deprecated): A : variable defining where to find LocalStack (default: localhost:4566).USE_SSL (deprecated): Whether to use SSL when connecting to LocalStack (default: False).awscli provides a neat command completion feature which is compatible with most modern shells which can also be used with awslocal.
The command completion will automatically suggest commands and parameters when using the completion key (which is typically the Tab key):
$ awslocal dynamodb d<TAB>
delete-backup describe-global-table
delete-item describe-global-table-settings
delete-table describe-limits
describe-backup describe-table
describe-continuous-backups describe-table-replica-auto-scaling
describe-contributor-insights describe-time-to-live
describe-endpoints
Follow the official guide on setting up the command completion for the aws CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html
While enabling the command completion for your shell, make sure to register the completion for awslocal as well.
For example, if you are using bash, you would add the following commands to your ~/.bashrc:
complete -C '/usr/local/bin/aws_completer' aws
complete -C '/usr/local/bin/aws_completer' awslocal
Follow the instructions for the shell you are using. For some shells you might need to register a different command or enable certain compatibility plugins (like zsh).
Please note that there is a known limitation for using the cloudformation package ... command with the AWS CLI v2. Currently it is not possible to specify the S3 endpoint URL, and this issue is not yet resolved on AWS side. The problem is that the AWS CLI v2 is not available as a package on pypi.org, but is instead shipped as a binary package that cannot be easily patched from awslocal. To work around this issue, you have 2 options:
virtualenv .venv
. .venv/bin/activate
pip install https://github.com/boto/botocore/archive/v2.zip https://github.com/aws/aws-cli/archive/v2.zip
--debug mode; non-debug runs now show concise error messages, consistent with awscli behavior.Unable to find LocalStack endpoint for service ...data- host prefixes to endpoint URLsSYSTEMROOT env variable to fix "_Py_HashRandomization_Init" error on Windowsawscli installation--s3-endpoint-url by default to fix "cloudformation package" commandDEFAULT_REGION environment variable--s3-endpoint-url CloudFormation parameteraws CLI command in-memory instead of calling external processThis package can be replaced by a single bash alias, except for cloudformation package ... as this command requires an additional --s3-endpoint-url parameter:
alias awslocal="AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_DEFAULT_REGION=${DEFAULT_REGION:-$AWS_DEFAULT_REGION} aws --endpoint-url=http://${LOCALSTACK_HOST:-localhost}:4566"
This software library is released under the Apache License, Version 2.0 (see LICENSE).
FAQs
Thin wrapper around the "aws" command line interface for use with LocalStack
We found that awscli-local demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.