-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Description:
When deploying Lambda functions using the aws-lambda-deploy GitHub Action, the action sometimes reports configuration changes that are not actually being made. This mainly affects layers and logging configuration.
Observed behavior:
• The action detects changes for CodeSize of layers and log configuration fields (LogFormat, ApplicationLogLevel, SystemLogLevel).
• These fields are either read-only or provide more detail than what can be configured through the action.
• As a result, the action reports “changes” even though the actual configuration remains the same.
Example Lambda configuration used in workflow:
"ecr-cleanup-function": {
"function_name": "ecr-cleanup-function",
"code_artifacts_dir": "modules/ecr-cleanup/files",
"handler": "ecr_cleanup_detection_function.lambda_handler",
"timeout": "900",
"memory_size": "1024",
"runtime": "python3.12",
"layers": [
"arn:aws:lambda:eu-central-1:xxxxxxxxxxxxxx:layer:aws-cli:4",
"arn:aws:lambda:eu-central-1:xxxxxxxxxxxxxx:layer:kubernetes_pyyaml:3"
],
"function_description": "Create a json file containing images scheduled for deletion",
"logging_config": "{\"LogFormat\":\"JSON\"}"
}
Debug output from Lambda:
Layers from config: [
{
"Arn": "arn:aws:lambda:eu-central-1:xxxxxxxxxxxxxx:layer:aws-cli:4",
"CodeSize": 25659747
},
{
"Arn": "arn:aws:lambda:eu-central-1:xxxxxxxxxxxxxx:layer:kubernetes_pyyaml:3",
"CodeSize": 9231481
}
]
{
"LogFormat": "JSON",
"ApplicationLogLevel": "INFO",
"SystemLogLevel": "INFO",
"LogGroup": "/aws/lambda/ecr-cleanup-function"
}
Issue:
• The action cannot pass fields like CodeSize or the detailed logging fields.
• Therefore, it incorrectly detects changes that do not exist, creating misleading deployment results. (see logs bellow)
Getting current configuration for function ecr-cleanup-function
Configuration difference detected in Layers
Configuration difference detected in LoggingConfig
Expected behavior:
• The action should ignore read-only or derived fields such as CodeSize and logging detail fields that aren’t configurable.
Request:
• Please consider ignoring read-only/derived fields when detecting configuration changes to avoid false-positive updates.