Import AWS SDK Components

const { ECSClient, RunTaskCommand } = require("@aws-sdk/client-ecs")
const ecsClient = new ECSClient({
  region : 'ap-south-1',
  credentials: {
    accessKeyId: '', // Replace with Access Id
    secretAccessKey: '' // Replace with Secret Access Key
  }
})
const config = {
  CLUSTER: '', // Cluster ARN
  TASK: '' // Task ARN
}
const command = new RunTaskCommand({
    cluster: config.CLUSTER,
    taskDefinition: config.TASK,
    launchType: 'FARGATE',
    count: 1,
    networkConfiguration: {
      awsvpcConfiguration: {
        assignPublicIp: 'ENABLED',
        subnets: [], // these are array of subnets
        securityGroups: [] // this is a security group
      }
    },
    overrides: {
      containerOverrides: [
        {
          name: 'builder-image', environment: [ // these are the environment variables for my docker image
            { name: "GIT_REPOSITORY_URL", value: gitURL },
            { name: "PROJECT_ID", value: slug },
          ]
        }
      ]
    }
  });
 await ecsClient.send(command);