Open wordstospend opened 1 year ago
After rebuilding this I was able to get the lambda to run successfully. The current output for the stack does include an output
CheckSnakeStatus XXXXX Check the snake status. If you see 'ready' you can use the snake
This status is also broken but can be repaired by adding back the status endpoint to the api lambda which was removed b71e62c98b9910cad553fd7c81854ceba3bf8bdd
This status endpoint relies on the name of the sagemaker endpoint which is hardcoded, and should be updated. A more permeant fix would be to have the endpoint name passed in as an env variable
Error reproduced on two separate AWS accounts: output URL CheckSnakeStatus https://xxxxxxx.execute-api.us-west-2.amazonaws.com/snake
and /snake/status
return {"message": "Internal server error"}
upon GET request.
Note that prior to pile building I had to change parameters S3BucketName
from snake-bucket
to snake-bucket-1
to avoid a name-already-in-use issue.
Quick workaround: Lambda > Functions > sagemaker-soln-bs-2-api-function > Layers > Add a layer then chose an AWS layer e.g. AWSSDKPandas-Python39 and click Add. Be mindful of the Python version of the lambda function execution for this choice, mine is 3.9. Lambda function now supports numpy. /snake/status
will now throw a 404 but the gateway will handle battlesnake webhooks correctly.
This appears to be an issue with the api lambda code at S3Bucket: sagemaker-solutions-prod-us-west-2 S3Key: sagemaker-battlesnake-ai/1.2.1/build/api.zip
I'm going to attempt to rebuild and deploy to from local to see if I can resolve this. But otherwise this project is unusable.