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/yourusername/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.0.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.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: localaws-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 baa917692c682acb6cdba926759598ff56fc5cc6b61f6abea3c2cfdd0c6dfb1b
MD5 49b72f7490d212f35cd4fdcc74cc7faa
BLAKE2b-256 5087f6a71e180c73101afa0fe6bb7660d57471810edd7024811462e7b5835343

See more details on using hashes here.

File details

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

File metadata

  • Download URL: localaws-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf7ec1bf87971b16853c5add8e86958dc6afdc20efdb2c6385c454fab78ea67
MD5 4c9dec6d98cb8a147a308828756e5bad
BLAKE2b-256 2de44fe34369fc1bd5eab1c5b36f0f9cca63e9af7f703cf3fe61d476e8918aac

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