Technologies/LocalStack/localstack.lambda.errors
LocalStackLocalStackMetric

localstack.lambda.errors

Lambda execution errors
Dimensions:None
Available on:Native (1)OpenTelemetryOpenTelemetry (1)PrometheusPrometheus (1)
Interface Metrics (3)
Native
Number of Lambda function invocation errors
Dimensions:None
OpenTelemetryOpenTelemetry
Total number of Lambda function execution errors
Dimensions:None
PrometheusPrometheus
Total number of Lambda function errors
Dimensions:None

Technical Annotations (44)

Configuration Parameters (12)
--evaluation-periodsrecommended: 1
Number of periods evaluated to check threshold breach
--periodrecommended: 60
Interval in seconds for metric calculation (1 minute)
--statisticrecommended: Sum
Aggregate function for metric values within period
--thresholdrecommended: 1
Minimum error count to trigger alarm
--comparison-operatorrecommended: GreaterThanOrEqualToThreshold
Alarm triggers when metric sum >= threshold
--metric-namerecommended: Errors
AWS/Lambda namespace metric tracking failed invocations
--namespacerecommended: AWS/Lambda
CloudWatch namespace for Lambda metrics
LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUTrecommended: 120
Timeout in seconds for Lambda execution environment startup; increase if legitimate startup takes longer than default ~50s
LAMBDA_DOCKER_NETWORKrecommended: remove entirely
Should not be manually set; LocalStack auto-detects the correct network including docker-compose project prefix
AWS_ENDPOINT_URL
Must point to LocalStack instance IP reachable from Lambda container network
endpointrecommended: http://host.docker.internal:4566
S3 client endpoint for Lambda running in sam local container to reach LocalStack on host
/var/run/docker.sockrecommended: accessible
Docker daemon socket must be accessible for Lambda v2 execution
Error Signatures (10)
ServiceUnavailableexception
503http status
Operation failed due to a simulated faultlog pattern
timed out during startup. Check for errors during the startup of your Lambda function and consider increasing the startup timeout via LAMBDA_RUNTIME_ENVIRONMENT_TIMEOUTlog pattern
Read timeout on endpoint URL: "http://localhost:4566/2015-03-31/functions/arn%3Aaws%3Alambda%3Aus-east-1%3A000000000000%3Afunction%3Aproxy-function/invocations"log pattern
INTEGRATION_FAILUREerror code
502http status
com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to s3.localhost.localstack.cloud:4566exception
Connection refusedexception
Lambda output should follow the next JSON formatlog pattern
CLI Commands (6)
awslocal cloudwatch put-metric-alarm --alarm-name my-lambda-alarm --metric-name Errors --namespace AWS/Lambda --dimensions "Name=FunctionName,Value=my-failing-lambda" --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --period 60 --statistic Sum --treat-missing notBreaching --alarm-actions arn:aws:sns:us-east-1:000000000000:my-topic-alarmmonitoring
awslocal cloudwatch list-metricsdiagnostic
awslocal lambda invoke --function-name my-failing-lambda out.txtdiagnostic
awslocal s3 cp sample.csv s3://<your-bucket-name/>diagnostic
sam local invoke Storage --event s3.jsondiagnostic
sam remote invoke Storage --event s3.json --profile svremediation
Technical References (16)
AWS/LambdacomponentErrorscomponentDimensionsconceptdead-letter queuesconceptChaos Dashboardcomponentevent source mappingconceptPutItem operationcomponentexecution environmentcomponenthot-reloadconceptLOCALSTACK_HOSTNAMEcomponenthost.docker.internalcomponentsam local invokecomponentAWS_PROXYcomponentl.s.apigateway.integrationcomponent/var/run/docker.sockfile pathLambda v2component
Related Insights (7)
Lambda invocation failures trigger CloudWatch Errors metric alarmswarning
SQS returns 503 Service Unavailable causing Lambda message processing failurescritical
Message requeue on persistent database unavailabilitywarning
Lambda execution environment timeout during startup with boto3 and hot-reloadcritical
Lambda container cannot reach LocalStack S3 during sam local invokecritical
API Gateway returns 502 when Lambda proxy response format is invalidwarning
Docker socket access required for Lambda v2 executioncritical