[ERROR] KeyError: 'SELECTED_RL_METHOD'
Traceback (most recent call last):
File "/var/lang/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec) File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/task/lambda.py", line 29, in <module>
if os.environ['SELECTED_RL_METHOD'] == "MXNet":
File "/var/lang/lib/python3.7/os.py", line 681, in __getitem__
raise KeyError(key) from None
After I manually added the environment variable SELECTED_RL_METHOD with the value "RLLib" to this Lambda, I was able to get a 200 status saying the snake is ready.
Using the Cloudformation template and getting around https://github.com/awslabs/sagemaker-battlesnake-ai/issues/28, I was getting internal server errors when I hit the snake/status endpoint. Digging into the logs, I found the following error:
After I manually added the environment variable
SELECTED_RL_METHOD
with the value "RLLib" to this Lambda, I was able to get a 200 status saying the snake is ready.