Skip to content

Commit 368fd3b

Browse files
committed
Clean up documentation and remove unused code
- Update README.md to remove references to deleted files (setup-postgres-lambda.sql and test-lambda.sh) - Add information about synchronous Lambda invocation in PostgreSQL to Lambda flow - Remove unused parameter group from RDS cluster configuration - Remove test property from custom resource as it's not needed - Remove outdated SUMMARY.md file that's no longer relevant
1 parent 5d12290 commit 368fd3b

File tree

3 files changed

+4
-71
lines changed

3 files changed

+4
-71
lines changed

typescript/postgres-lambda/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,7 @@ No manual setup required! 🎉
8080

8181
### Test Lambda → PostgreSQL
8282

83-
Using the provided test script:
84-
```bash
85-
./test-lambda.sh --function-name <LAMBDA_TO_POSTGRES_FUNCTION_NAME> --message "Hello World"
86-
```
87-
88-
Or using AWS CLI directly:
83+
Using AWS CLI directly:
8984
```bash
9085
aws lambda invoke \
9186
--function-name <LAMBDA_TO_POSTGRES_FUNCTION_NAME> \
@@ -129,8 +124,9 @@ SELECT validate_data('{"id": 789, "value": "valid data"}'::JSONB);
129124

130125
1. **Extension Setup**: Uses `aws_lambda` extension for Lambda invocation (automated)
131126
2. **Function Creation**: SQL functions wrap Lambda calls with proper ARN construction (automated)
132-
3. **Event Processing**: Lambda receives structured JSON events from PostgreSQL
133-
4. **Result Return**: Lambda response becomes available in SQL query results
127+
3. **Synchronous Invocation**: Uses 'RequestResponse' invocation type for immediate results
128+
4. **Event Processing**: Lambda receives structured JSON events from PostgreSQL
129+
5. **Result Return**: Lambda response becomes available in SQL query results
134130

135131
## Project Structure
136132

@@ -142,8 +138,6 @@ SELECT validate_data('{"id": 789, "value": "valid data"}'::JSONB);
142138
│ ├── postgres-to-lambda/ # Lambda called by PostgreSQL
143139
│ └── postgres-setup/ # Lambda for automated setup
144140
├── test/ # Unit tests
145-
├── setup-postgres-lambda.sql # Reference SQL (now automated)
146-
├── test-lambda.sh # Lambda testing script
147141
├── .yarn/ # Yarn 2+ configuration
148142
└── README.md # This file
149143
```

typescript/postgres-lambda/SUMMARY.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

typescript/postgres-lambda/lib/postgres-lambda-stack.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ export class PostgresLambdaStack extends cdk.Stack {
1616
maxAzs: 2,
1717
natGateways: 1,
1818
});
19-
const parameterGroup = new rds.ParameterGroup(this, 'PGClusterParamGroup', {
20-
engine: rds.DatabaseClusterEngine.auroraPostgres({
21-
version: rds.AuroraPostgresEngineVersion.VER_17_4
22-
}),
23-
parameters: {
24-
},
25-
});
2619

2720
// Create a PostgreSQL Aurora Serverless v2 cluster
2821
const dbCluster = new rds.DatabaseCluster(this, 'PostgresCluster', {
@@ -35,7 +28,6 @@ export class PostgresLambdaStack extends cdk.Stack {
3528
serverlessV2MaxCapacity: 1,
3629
defaultDatabaseName: 'demodb',
3730
credentials: rds.Credentials.fromGeneratedSecret('postgres'),
38-
parameterGroup: parameterGroup,
3931
});
4032

4133

@@ -144,9 +136,6 @@ export class PostgresLambdaStack extends cdk.Stack {
144136

145137
new cdk.CustomResource(this, 'PostgresSetupResource', {
146138
serviceToken: setupProvider.serviceToken,
147-
properties: {
148-
test: 'yo'
149-
},
150139
});
151140

152141
// Output the database endpoint and secret ARN

0 commit comments

Comments
 (0)