You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a blank project for CDK development with TypeScript.
2
+
# CodeCommitCloneStack
4
3
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.
6
5
7
-
## Useful commands
6
+
## Architecture
8
7
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.
0 commit comments