Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmschauer/aws-cdk-lambda-pytest
AWS CDK code written in Python to create an AWS Lambda function (also in Python) that does a basic ETL transformation. The project shows how to add pytest unit tests to the Lambda function within the CDK project.
https://github.com/dmschauer/aws-cdk-lambda-pytest
Last synced: 2 days ago
JSON representation
AWS CDK code written in Python to create an AWS Lambda function (also in Python) that does a basic ETL transformation. The project shows how to add pytest unit tests to the Lambda function within the CDK project.
- Host: GitHub
- URL: https://github.com/dmschauer/aws-cdk-lambda-pytest
- Owner: dmschauer
- Created: 2023-04-24T00:54:33.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-04-24T01:15:41.000Z (over 1 year ago)
- Last Synced: 2024-04-16T04:03:39.565Z (9 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
.
├── cdk_code
│ └── my_cdk_stack.py
├── src
│ └── lambdas
│ └── transformation
│ └── lambda_handler.py
└── tests
└── unit
└── lambdas
└── transformation
├── test_lambda_handler.py
├── sample_data.csv
└── test_event.json
```
---```
.
├── cdk_code
│ ├── __init__.py
│ └── my_cdk_stack.py
├── src
│ ├── __init__.py
│ └── lambdas
│ ├── __init__.py
│ └── transformation
│ ├── __init__.py
│ └── lambda_handler.py
└── tests
├── __init__.py
└── unit
├── __init__.py
└── lambdas
├── __init__.py
└── transformation
├── __init__.py
├── test_lambda_handler.py
├── sample_data.csv
└── test_event.json
```---
```
cdk init app --language python
.\.venv\Scripts\activate.ps1
pip install aws-cdk.aws-lambda aws-cdk.aws-s3 aws-cdk.aws-apigateway pandas boto3 pytest moto
```---
```
mkdir -p cdk_code
mkdir -p src/lambdas/transformation
mkdir -p tests/unit/lambdas/transformationNew-Item -ItemType File cdk_code/my_cdk_stack.py
New-Item -ItemType File src/lambdas/transformation/lambda_handler.py
New-Item -ItemType File tests/unit/lambdas/transformation/test_lambda_handler.py
New-Item -ItemType File tests/unit/lambdas/transformation/sample_data.csv
New-Item -ItemType File tests/unit/lambdas/transformation/test_event.json
```