Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/aws-lambda-python-template.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ A template for creating AWS Lambda functions with Python, using Docker images st
├── .github/workflows # Example GitHub Actions workflows
├── cloudformation # Example CloudFormation templates
├── models # Pydantic models for data validation
│ ├── event.py # API Gateway event model
│ ├── exceptions.py # Custom exceptions
│ └── response.py # Standardized response models
├── services # Business logic and external service integrations
│ ├── aws.py # AWS service wrappers (Secrets Manager)
│ ├── db.py # MySQL database driver
│ ├── migrations.py # Migration repository
│ ├── nasa.py # NASA API service
│ └── rest_api.py # Base REST API service
├── tests # Unit tests
│ └── test_lambda_function.py
├── utils # Utility functions (e.g., logger, config)
├── .pre-commit-config.yaml # Configuration for pre-commit hooks
├── debug_lambda.py # Script for running the Lambda function locally
Expand All @@ -33,6 +43,39 @@ A template for creating AWS Lambda functions with Python, using Docker images st
└── README.md # This file
```

## Testing

This template uses `pytest` and `unittest` for testing.

### Running Tests

To run the unit tests:

```bash
uv run python -m unittest discover tests
```

Or if you prefer `pytest`:

```bash
uv run pytest
```

## Code Review Challenge

This template is designed to test AI-powered code review tools (like Junie, Copilot, or Qodo). It includes:
- A modular structure that allows for architectural reviews.
- Strategic use of type hints.
- Centralized error handling.
- Placeholder tests and TODOs to see if they are flagged.
- A "Manager" pattern that can be critiqued.

### Areas for Reviewers to Focus On:
1. **Architecture:** Is the `LambdaManager` too heavy? Should the validation logic be more decoupled?
2. **Security:** Are secrets handled correctly? (Check `_validate_api_key` in `lambda_function.py`).
3. **Typing:** Are all `Any` types necessary?
4. **Testing:** Is the test coverage sufficient? Are the mocks appropriate?

## Getting Started

### Prerequisites
Expand Down
Loading
Loading