Skip to content

Commit

Permalink
README updates, cleaned up dependencies in lambda and set reserved co…
Browse files Browse the repository at this point in the history
…ncurrency
  • Loading branch information
kurt.tometich committed Aug 9, 2024
1 parent d83bf46 commit 29dcfa9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apigw-eventbridge-schema-validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ This is the final stage where events grow into the full business context require

## Deployment

The following solution uses the Lambda based schema updater architecture referenced above. You'll deploy the solution and test the three stages covered. You can modify the SAM template and Lambda function to also use this approach for CI CD driven updates or other unique needs your application requires.
The following solution uses the Lambda based schema updater architecture referenced above. This is intended to be deployed to non-production environments. You'll deploy the solution and test the three stages covered. You can modify the SAM template and Lambda function to also use this approach for CI CD driven updates or other unique needs your application requires.

### Pre-Requisites

Expand Down
5 changes: 0 additions & 5 deletions apigw-eventbridge-schema-validation/lambda/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ const ajv = new Ajv();
import { APIGatewayClient, UpdateModelCommand, CreateDeploymentCommand } from "@aws-sdk/client-api-gateway";
const apiClient = new APIGatewayClient();

import { SSMClient, GetParameterCommand } from "@aws-sdk/client-ssm";
const ssmClient = new SSMClient();

const schemaName = process.env.SchemaName;
const apiId = process.env.ApiId;
const apiModelName = process.env.ApiModelName;
Expand Down Expand Up @@ -120,8 +117,6 @@ async function downloadSchema(schemaRegistry, schemaName) {
export const handler = async (event) => {

console.log('Event received:', JSON.stringify(event, null, 2));
console.log('Api Resource ID:', apiId);
console.log('Api Model Name: ' + apiModelName);

// check required variables
if (!apiId || !schemaName || !apiModelName || !schemaRegistry) {
Expand Down
3 changes: 2 additions & 1 deletion apigw-eventbridge-schema-validation/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Resources:
CodeUri: lambda/
Handler: index.handler
Runtime: nodejs20.x
ReservedConcurrentExecutions: 10
Environment:
Variables:
SchemaName: !Sub '${SchemaName}'
Expand Down Expand Up @@ -162,7 +163,7 @@ Resources:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: /aws/events/scheduling-events-source-catch-all
RetentionInDays: 30
RetentionInDays: 7

##########################################################################
# API GATEWAY ROLE WITH PERMISSIONS TO PUT EVENTS
Expand Down

0 comments on commit 29dcfa9

Please sign in to comment.