Skip to content

Commit e3e0879

Browse files
committed
readmne
1 parent 0fc050f commit e3e0879

File tree

1 file changed

+39
-10
lines changed

1 file changed

+39
-10
lines changed
Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
1-
# Welcome to your CDK TypeScript project
21

3-
This is a blank project for CDK development with TypeScript.
2+
# CodeCommitCloneStack
43

5-
The `cdk.json` file tells the CDK Toolkit how to execute your app.
4+
Deploys an AWS Lambda function that monitors a CodeCommit repository for updates, extracts data from a `.stats` file, and appends it to a `stats.csv` file in an S3 bucket.
65

7-
## Useful commands
6+
## Architecture
87

9-
* `npm run build` compile typescript to js
10-
* `npm run watch` watch for changes and compile
11-
* `npm run test` perform the jest unit tests
12-
* `npx cdk deploy` deploy this stack to your default AWS account/region
13-
* `npx cdk diff` compare deployed stack with current state
14-
* `npx cdk synth` emits the synthesized CloudFormation template
8+
- **Lambda Function**: Pulls `.stats` file from CodeCommit, parses it, updates `stats.csv` in S3.
9+
- **EventBridge Rule**: Triggers Lambda on CodeCommit repository changes.
10+
- **IAM Role**: Grants Lambda necessary permissions for CodeCommit and S3 access.
11+
12+
## Prerequisites
13+
14+
- **Node.js**
15+
- **AWS CDK**: `npm install -g aws-cdk`
16+
- **AWS CLI**: Configured for your account
17+
- **Python 3.9** (Lambda runtime)
18+
19+
## Deployment
20+
21+
2. **Install Dependencies**:
22+
```bash
23+
npm install
24+
```
25+
26+
3. **Deploy Stack**:
27+
```bash
28+
cdk deploy
29+
```
30+
31+
## Testing
32+
33+
Commit to the monitored CodeCommit repo and verify that `stats.csv` in S3 updates. Check Lambda logs in CloudWatch for details.
34+
35+
## Cleanup
36+
37+
```bash
38+
cdk destroy
39+
```
40+
41+
---
42+
43+
**License**: Apache-2.0

0 commit comments

Comments
 (0)