diff --git a/sosw/managers/ecology.py b/sosw/managers/ecology.py
index dbe0fb5..14ff1e8 100644
--- a/sosw/managers/ecology.py
+++ b/sosw/managers/ecology.py
@@ -31,8 +31,7 @@ ECO_STATUSES = (
 
 
 class EcologyManager(Processor):
-    DEFAULT_CONFIG = {
-    }
+    DEFAULT_CONFIG = {}
 
     running_tasks = defaultdict(int)
     task_client: TaskManager = None  # Will be Circular import! Careful!
@@ -124,11 +123,10 @@ class EcologyManager(Processor):
     def get_max_labourer_duration(self, labourer: Labourer) -> int:
         """
         Maximum duration of `labourer` executions.
-        Should ask this from aws:lambda API, but at the moment use the hardcoded maximum.
-        # TODO implement me.
         """
 
-        return 900
+        resp = self.task_client.lambda_client.get_function_configuration(FunctionName=labourer.arn)
+        return resp['Timeout']
 
 
     # The task_client of EcologyManager is just a pointer. We skip recursive stats to avoid infinite loop.

Labourer: get_max_labourer_duration
Implement me.
Should receive this information from AWS API probably with DescribeFunction and cache this data in the Ecology Manager
diff --git a/sosw/managers/test/unit/test_ecology.py b/sosw/managers/test/unit/test_ecology.py
index 7637e2d..90f552f 100644
--- a/sosw/managers/test/unit/test_ecology.py
+++ b/sosw/managers/test/unit/test_ecology.py
@@ -109,3 +109,10 @@ class ecology_manager_UnitTestCase(unittest.TestCase):
         # But the counter of tasks in cache should have.
         self.assertEqual(self.manager.running_tasks[self.LABOURER.id],
                          tm.get_count_of_running_tasks_for_labourer.return_value + 1 + 5)
+
+
+    def test_get_max_labourer_duration(self):
+        self.manager.task_client = MagicMock()
+        self.manager.task_client.lambda_client.get_function_configuration.return_value = {'Timeout': 300}
+
+        self.assertEqual(self.manager.get_max_labourer_duration(self.LABOURER), 300)

pip install -e .[dev]
parse_log_pytest
Pipfile
sphinx pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
boto3==1.23.10
botocore==1.26.10
certifi==2021.5.30
charset-normalizer==2.0.12
docutils==0.18.1
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
jmespath==0.10.0
MarkupSafe==2.0.1
packaging==21.3
pipfile==0.0.2
pluggy==1.0.0
py==1.11.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
s3transfer==0.5.2
six==1.17.0
snowballstemmer==2.2.0
-e git+https://github.com/bimpression/sosw.git@ad7dc503c3482b3455e50d647553c2765d35e85f#egg=sosw
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
tomli==1.2.3
typing_extensions==4.1.1
urllib3==1.26.20
zipp==3.6.0

name: sosw
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - pipfile=0.0.2=py_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - boto3==1.23.10
      - botocore==1.26.10
      - charset-normalizer==2.0.12
      - docutils==0.18.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - jmespath==0.10.0
      - markupsafe==2.0.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - s3transfer==0.5.2
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/sosw

sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_get_max_labourer_duration
sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_add_running_tasks_for_labourer sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_count_running_tasks_for_labourer__calls_task_manager sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_count_running_tasks_for_labourer__raises_not_task_client sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_count_running_tasks_for_labourer__use_local_cache sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_eco_statuses sosw/managers/test/unit/test_ecology.py::ecology_manager_UnitTestCase::test_register_task_manager__resets_stats
sosw/managers/ecology.py
sosw/managers/ecology.py