Lambda not starting

Hi Guys.
I have been struggling quiet some time, And I now have to turn to the experts for help. I have a flask app which uploads a file to s3, which in turn triggers a lambda function which writes the filename to s3.
I cannot for the life of me, get the lambda function triggered. I have googled a ton, and tried many possible fixes, However it still does not work.
Below is my log file from my docker container, when I “manually” invoke my lambda function. Please kindly shed some light.

2023-06-23T20:35:45.435 DEBUG --- [uncthread137] l.s.a.i.version_manager    : Detected no active environments for version arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST. Starting one...
2023-06-23T20:35:45.435 DEBUG --- [uncthread137] l.s.a.i.version_manager    : Starting new environment
2023-06-23T20:35:45.436 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Creating service endpoint for function arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST executor eda1e00b23d942f89af1d0c0acd74fcb
2023-06-23T20:35:45.436 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Finished creating service endpoint for function arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST executor eda1e00b23d942f89af1d0c0acd74fcb
2023-06-23T20:35:45.436 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Assigning container name of localstack-lambda-script-eda1e00b23d942f89af1d0c0acd74fcb to executor eda1e00b23d942f89af1d0c0acd74fcb
2023-06-23T20:35:45.437 DEBUG --- [pt:$LATEST_0] l.u.c.docker_sdk_client    : Stopping container: localstack-lambda-script-eda1e00b23d942f89af1d0c0acd74fcb
2023-06-23T20:35:45.441 DEBUG --- [pt:$LATEST_0] l.s.a.i.runtime_environmen : Unable to shutdown runtime handler 'eda1e00b23d942f89af1d0c0acd74fcb'
2023-06-23T20:35:46.439 DEBUG --- [uncthread137] l.s.a.i.version_manager    : Detected no active environments for version arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST. Starting one...
2023-06-23T20:35:46.440 DEBUG --- [uncthread137] l.s.a.i.version_manager    : Starting new environment
2023-06-23T20:35:46.441 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Creating service endpoint for function arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST executor 1b82132efccda4eb0ce187c88cc7f528
2023-06-23T20:35:46.441 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Finished creating service endpoint for function arn:aws:lambda:us-east-1:000000000000:function:script:$LATEST executor 1b82132efccda4eb0ce187c88cc7f528
2023-06-23T20:35:46.441 DEBUG --- [uncthread137] l.s.a.i.docker_runtime_exe : Assigning container name of localstack-lambda-script-1b82132efccda4eb0ce187c88cc7f528 to executor 1b82132efccda4eb0ce187c88cc7f528
2023-06-23T20:35:46.442 DEBUG --- [pt:$LATEST_0] l.u.c.docker_sdk_client    : Stopping container: localstack-lambda-script-1b82132efccda4eb0ce187c88cc7f528
2023-06-23T20:35:46.446 DEBUG --- [pt:$LATEST_0] l.s.a.i.runtime_environmen : Unable to shutdown runtime handler '1b82132efccda4eb0ce187c88cc7f528'

So here below I set DEBUG=0 . I can clearly see the bucket notification being created as it returns 200, It shows further down that the file got sucessfully uploaded, However nothing happens after that, When it supposed to trigger my lambda code.

2023-06-23T21:52:12.181  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:16.640  INFO --- [   asgi_gw_5] localstack.request.aws     : AWS lambda.AddPermission => 201
2023-06-23T21:52:16.847  INFO --- [   asgi_gw_2] localstack.request.aws     : AWS lambda.GetPolicy => 200
2023-06-23T21:52:18.256  INFO --- [   asgi_gw_1] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:18.506  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:18.919  INFO --- [   asgi_gw_4] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:19.732  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:21.354  INFO --- [   asgi_gw_5] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:24.567  INFO --- [   asgi_gw_2] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:30.981  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:31.221  INFO --- [   asgi_gw_4] localstack.request.aws     : AWS lambda.GetFunction => 200
2023-06-23T21:52:31.829  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS lambda.ListVersionsByFunction => 200
2023-06-23T21:52:31.858  INFO --- [   asgi_gw_5] localstack.request.aws     : AWS lambda.GetFunctionCodeSigningConfig => 200
2023-06-23T21:52:33.781  INFO --- [   asgi_gw_2] localstack.request.aws     : AWS lambda.CreateFunctionUrlConfig => 201
2023-06-23T21:52:33.811  INFO --- [   asgi_gw_1] localstack.request.aws     : AWS lambda.AddPermission => 201
2023-06-23T21:52:33.834  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS lambda.GetFunctionUrlConfig => 200
2023-06-23T21:52:34.695  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS s3.PutBucketNotificationConfiguration => 200
2023-06-23T21:52:34.700  INFO --- [   asgi_gw_4] localstack.request.http    : PUT / => 200
2023-06-23T21:52:34.821  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS s3.GetBucketNotificationConfiguration => 200
2023-06-23T21:52:34.826  INFO --- [   asgi_gw_2] localstack.request.http    : GET / => 200
2023-06-23T21:55:51.064  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS s3.PutObject => 200

Hi @clinton.bitcoin,
It seems there’s an issue with starting the Lambda container.
It’s not very clear how you’re starting LocalStack, but first things first: please ensure that you’re using the latest version of LS. This might require re-pulling the image. Secondly, if you’re using docker compose, please make sure that you have a minimal configuration, like in the file provided in the documentation: Installation | Docs.
I don’t know what other options you tried before, but it would be very helpful if you could provide more information about the way you start LS (docker-compose file?) and how you provision your infrastructure, and we’ll take it from there.
thanks,
Anca