sumologic-aws-lambda
sumologic-aws-lambda copied to clipboard
A collection of lambda functions to collect data from Cloudwatch, Kinesis, VPC Flow logs, S3, security-hub and AWS Inspector
## The Problem In the current cloudwatch_lambda.js ([pinned version link](https://github.com/SumoLogic/sumologic-aws-lambda/blob/22a1dcb518ee53b2cbf66e4d17ba010e76a22081/cloudwatchlogs/cloudwatchlogs_lambda.js)), the lambda is being marked as complete by calling `context.succeed`: https://github.com/SumoLogic/sumologic-aws-lambda/blob/22a1dcb518ee53b2cbf66e4d17ba010e76a22081/cloudwatchlogs/cloudwatchlogs_lambda.js#L96 However, this is very old syntax. It was deprecated...
* Fixed comparison operators, some where not safe in JS * Removed extra escape character in regex * Small change to console to log to avoid unneeded string concatenation. *...
Remove unused variable finalData. This reduces execution memory usage. Do not add newline to end of each chunk (default is 16K characters) returned by the stream. Can cause random insertion...
The Python 3.7 Lambda runtime has been [deprecated](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy), but the `SecurityHubCollectorFunction` is still using it. https://github.com/SumoLogic/sumologic-aws-lambda/blob/305e7cff54faa1a23f3342b8e83f444efa19291f/securityhub-collector/sam/template.yaml#L20
Currently the filter pattern is default to empty (`''`) and not configurable. ``` async function createSubscriptionFilter(lambdaLogGroupName, destinationArn, roleArn) { if (destinationArn.startsWith("arn:aws:lambda")){ var params = { destinationArn: destinationArn, filterName: 'SumoLGLBDFilter', filterPattern:...
Have you considered using AWS CloudFormation linter against the CloudFormation templates in this repository: - https://github.com/SumoLogic/sumologic-aws-lambda/blob/main/cloudwatchlogs-with-dlq/DLQLambdaCloudFormation.json - https://github.com/SumoLogic/sumologic-aws-lambda/blob/main/cloudwatchlogs-with-dlq/DLQLambdaCloudFormationWithSecuredEndpoint.json in order to improve them?