Skip to main content

Run local Python scripts with AWS profiles - perfect for local testing with different AWS environments

Project description

localaws

Run local Python scripts with different AWS profiles - perfect for local testing and development.

Installation

pip install localaws

Usage

Basic usage:

localaws script.py -p dev-profile

Full options:

localaws script.py --profile dev-profile --region us-west-2 --verbose

Short options:

localaws script.py -p dev-profile -r us-west-2 -v

Features

  • 🚀 Quick switch between AWS profiles for local testing
  • ✅ AWS profile validation before execution
  • 🌎 AWS region support
  • 📦 Proper Python path handling
  • 🔍 Verbose logging option
  • ❌ Clean error handling with helpful messages
  • 🔄 Cross-platform compatibility

Common Use Cases

  1. Testing AWS Lambda functions locally with different profiles:
localaws lambda_function.py -p test-profile
  1. Running scripts against different AWS environments:
localaws deploy_script.py -p staging-profile
localaws deploy_script.py -p production-profile
  1. Local development with different AWS accounts:
localaws dev_script.py -p personal-aws -r us-east-1

Requirements

  • Python 3.7+
  • boto3
  • click

Development

Clone and install in development mode:

git clone https://github.com/heysouravv/localaws.git
cd localaws
pip install -e .

Run tests:

pytest tests/

License

MIT License - See LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localaws-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localaws-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file localaws-0.1.1.tar.gz.

File metadata

  • Download URL: localaws-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for localaws-0.1.1.tar.gz
Algorithm Hash digest
SHA256 044c56717d3f664d5665a2c174b6d30dcdd9f74c09daf8a56b71c315f4b31a82
MD5 53cedc7d7e85b18d310d060882ce5f50
BLAKE2b-256 18e0abc33e728adc4c4370347217328903bb764bc81c90e476f83f86e44993f8

See more details on using hashes here.

File details

Details for the file localaws-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: localaws-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for localaws-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0bdcb149d40586608407f456b6bf8de23841cf6fbd2c818e66edd89f661606
MD5 6a567b091d9ae2be1eb71b3471bd6f3e
BLAKE2b-256 ffce1082ac4ceed37a29d45b7e919478cdb9e2830568a657a7bce24f110fce1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page