This sample code is for running the sagemath docker image with AWS Lambda.
$ git clone https://github.com/oiz-y/sagemath-lambda-container-sample.git
$ cd sagemath-lambda-container-sample/sage-demo
$ docker build -t sage-demo .
$ aws ecr get-login-password --region ${AWS_REGION} | docker login --username AWS --password-stdin ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com
$ docker tag sage-demo:latest ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/sage-demo:latest
$ docker push ${ACCOUNT_ID}.dkr.ecr.${AWS_REGION}.amazonaws.com/sage-demo:latest
Update the ECR repository image referenced by the Lambda function and invoke the Lambda function.
The following is an example of an application using sagemath docker with AWS Lambda container.
Project link : https://github.com/oiz-y/sage-lambda-container-app