-
Notifications
You must be signed in to change notification settings - Fork 135
Upgrade all AWSO related Lambda functions to Nodejs 24 and Python v3.14.0 #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fy27q1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -218,32 +218,43 @@ async function processEvents(env, event, additionalArgs, errorHandler, retryCoun | |
| } | ||
| } | ||
|
|
||
| exports.handler = async function (event, context, callback) { | ||
| exports.handler = async (event, context) => { | ||
|
|
||
| const partition = context.invokedFunctionArn?.split(":")?.[1] ?? "aws"; | ||
|
|
||
| let additionalArgs = { | ||
| recordCount: 0, | ||
| subscribeCount: 0, | ||
| invokeCount: 0, | ||
| partition: partition | ||
| }; | ||
|
|
||
| if (event.additionalArgs) { | ||
| additionalArgs = event.additionalArgs | ||
| additionalArgs = event.additionalArgs; | ||
| } | ||
|
|
||
| console.log("Invoking Log Group connector function"); | ||
|
|
||
| function errorHandler(err, msg) { | ||
| if (err) { | ||
| console.log(err, msg); | ||
| callback(err); | ||
| } else { | ||
| callback(null, "Success"); | ||
| } | ||
| } | ||
| if (!process.env.LOG_GROUP_PATTERN || process.env.LOG_GROUP_PATTERN.trim().length === 0) { | ||
| console.warn("LOG_GROUP_PATTERN is empty, it will subscribe to all loggroups"); | ||
| } | ||
| if (event.existingLogs == "true") { | ||
| await processExistingLogGroups(context, event.token, additionalArgs, errorHandler); | ||
| } else { | ||
| await processEvents(process.env, event, additionalArgs, errorHandler); | ||
| console.error(msg, err); | ||
| throw err; | ||
| } | ||
|
Comment on lines
238
to
242
|
||
| return "Success"; | ||
| } | ||
|
|
||
| if (!process.env.LOG_GROUP_PATTERN || process.env.LOG_GROUP_PATTERN.trim().length === 0) { | ||
| console.warn("LOG_GROUP_PATTERN is empty, it will subscribe to all loggroups"); | ||
| } | ||
|
|
||
| if (event.existingLogs === "true") { | ||
| await processExistingLogGroups(context, event.token, additionalArgs, errorHandler); | ||
| } else { | ||
| await processEvents(process.env, event, additionalArgs, errorHandler); | ||
| } | ||
|
|
||
| return { | ||
| statusCode: 200, | ||
| body: "Success" | ||
| }; | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.