Search code examples
pythonamazon-web-servicesamazon-ecsaws-fargateamazon-ecr

How to use AWS-Fargate as a python script


I want to use AWS-Fargate as a data PreProcessor in a ML pipe.

I deployed Docker Image containing my python script within AWS-ECR.

I also created a task with this image.

My questions are :

  1. Which cluster should i use, i don't understand well the concept of cluster.
  2. How to deploy in the pipe (the best should be triger by s3 event and execute as docker run)

Thank you for your answers


Solution

    1. Cluster to use is Networking only:

      With this option, you can launch a cluster with a new VPC to use for Fargate tasks.

    2. The CICD pipeline for automated deployment of your Docker images to your ECS service could be constructed using CodePipeline. The good start towards it is the following tutorial:

      . Tutorial: Continuous Deployment with CodePipeline for ECS