diff --git a/moto/awslambda/models.py b/moto/awslambda/models.py index c1c47d24f..939952d5e 100644 --- a/moto/awslambda/models.py +++ b/moto/awslambda/models.py @@ -395,6 +395,7 @@ class LambdaFunction(BaseModel): env_vars.update(self.environment_vars) container = output = exit_code = None + log_config = docker.types.LogConfig(type=docker.types.LogConfig.types.JSON) with _DockerDataVolumeContext(self) as data_vol: try: run_kwargs = ( @@ -410,6 +411,7 @@ class LambdaFunction(BaseModel): volumes=["{}:/var/task".format(data_vol.name)], environment=env_vars, detach=True, + log_config=log_config, **run_kwargs ) finally: