Elastic low stable kql

AWS Lambda Layer Added to Existing Function

Identifies when a Lambda layer is added to an existing AWS Lambda function. Lambda layers allow shared code, dependencies, or runtime modifications to be injected into a function’s execution environment. Adversaries with the ability to update function configurations may add a malicious layer to establish persistence, run unauthorized code, or intercept data handled by the function. This activity should be reviewed to ensure the modification is expected and authorized.

View Source

Detection Logic

data_stream.dataset: aws.cloudtrail
    and event.provider: lambda.amazonaws.com
    and event.outcome: success
    and event.action: (PublishLayerVersion* or UpdateFunctionConfiguration*)
    and not user_agent.original: (*Terraform* or *Pulumi*)

False Positives

  • Lambda function owners or deployment pipelines may legitimately add or update layers as part of normal development and maintenance workflows. Confirm that the layer addition aligns with approved changes, expected CI/CD behavior, or routine dependency updates. Known automation roles or build systems can be excluded if they consistently perform authorized modifications.

Field Validations

Loading…

Comments (0)

Loading comments...