Skip to main content

A utility for watching and syncing AWS SAM local development files

Project description

SAM Local Watcher

A utility for watching and syncing AWS SAM local development files.

Overview

SAM Local Watcher monitors your AWS SAM project files and automatically syncs changes to the .aws-sam/build directory. This eliminates the need to rebuild your SAM application after every code change, making local development faster and more efficient.

Installation

pip install sam-local-watcher

Usage

Command Line

# Watch the current directory using the default template.yaml
sam-watcher

# Watch a specific directory
sam-watcher --path /path/to/sam/project

# Use a different template file
sam-watcher --template sam-template.yaml

Python API

from sam_local_watcher import watch_folder

# Watch the current directory
watch_folder(".", "template.yaml")

# Watch a specific directory with a custom template
watch_folder("/path/to/sam/project", "/path/to/template.yaml")

How It Works

  1. SAM Local Watcher parses your SAM template to identify all Lambda functions
  2. It creates a mapping between your source code directories and the corresponding functions
  3. When a file is modified, it automatically copies the changes to the appropriate location in the .aws-sam/build directory

Supported File Types

Currently, the watcher syncs files with the following extensions:

  • .py (Python)
  • .js (JavaScript)
  • .json (JSON)
  • .txt (Text)

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

sam_local_watcher-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.

sam_local_watcher-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sam_local_watcher-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for sam_local_watcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e19bcc7a769a3396839ca9630dc22b4c35d262e7e424d540f6b7335124811f5
MD5 8aae72026f7fa25c5eedf02e080e7d5c
BLAKE2b-256 5a8e44f5fa2075b1928d21deadfe2a5dbefec1c431da55df0ef83c7e74567abf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sam_local_watcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc09a0eb7010ab125cd15b1c1b239564d0abf8e115acdfcf99aec40354a76687
MD5 eab68e399fabc49d5f7e666ed5cc2d38
BLAKE2b-256 3314174397c31546e9d3604fb8db105e14be99d07100512d1b41dc2bfcd57227

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