Use this Docker image to run a Python AWS Lambda function in AWS ECS. It mimics cumulus-ecs-tas for Node.js AWS Lambda functions.
cumulus-ecs-task-python is a Docker image that can run Lambda functions as ECS services.
When included in a Cumulus workflow and deployed to AWS, it will download a specified Lambda function, and act as an activity in a Step Functions workflow.
See documentation in cumulus-ecs-task.
export VERSION=0.0.2
docker build -t cumuluss/cumulus-ecs-task-python:$VERSION .
# docker login
docker tag cumuluss/cumulus-ecs-task-python:$VERSION cumuluss/cumulus-ecs-task-python:$VERSION
docker push cumuluss/cumulus-ecs-task-python:$VERSION
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
docker run -it -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
cumuluss/cumulus-ecs-task-python:$VERSION \
cumulus-ecs-task \
--activityArn arn:aws:states:us-east-1:433612427488:activity:cce-DownloadTiles-Activity \
--lambdaArn arn:aws:lambda:us-east-1:433612427488:function:cce-ViirsProcessing