core-aws#
This project/library contains common elements related to AWS services…
Documentation Contents#
Features#
AWS Service Clients: High-level wrappers for S3, SQS, SNS, Kinesis, SSM, DynamoDB, ECS, and CloudFormation with improved error handling and type safety.
ETL Base Classes: Reusable base classes for building ETL pipelines on AWS (base, S3 bucket-based, SQS-based).
Decorators: Framework-agnostic decorators including
cache_s3_based()(in-memory LRU + S3) andcache_dynamo_based()(in-memory LRU + DynamoDB with native TTL), both sharing computed results across processes and machines.Lambda Decorators: Event processing decorators for SQS, SNS, and Kinesis with automatic batch failure handling.
Comprehensive Type Hints: Full type definitions for Lambda contexts, events (SQS, SNS, Kinesis), SSM parameters, Cognito identity, and mobile clients.
CDC Targets: Change Data Capture targets for streaming data to SQS, SNS, and Kinesis.
KMS Cipher: Utilities for encryption/decryption using AWS KMS.
Testing Utilities: Base classes and helpers for testing AWS-based applications.
Installation#
Install from PyPI using pip:
pip install core-aws
uv pip install core-aws # Or using UV...
pip install -e ".[dev]" # For development...
Setting Up Environment#
Install required libraries:
pip install --upgrade pip
pip install virtualenv
Create Python virtual environment:
virtualenv --python=python3.12 .venv
Activate the virtual environment:
source .venv/bin/activate
Install packages#
pip install .
pip install -e ".[dev]"
Check tests and coverage#
python manager.py run-tests
python manager.py run-tests --test-type integration
python manager.py run-coverage
# Having proper AWS credentials...
python manager.py run-tests --test-type functional --pattern "*.py"
Contributing#
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Write tests for new functionality
Ensure all tests pass:
pytest -n autoRun linting:
pylint core_awsRun security checks:
bandit -r core_awsSubmit a pull request
License#
This project is licensed under the MIT License. See the LICENSE file for details.
Links#
Documentation: https://core-aws.readthedocs.io/en/latest/
Repository: bytecode-solutions/core/core-aws
Changelog: bytecode-solutions/core/core-aws/-/blob/master/CHANGELOG.md
Support#
For questions or support, please open an issue on GitLab or contact the maintainers.