Skip to content

Instantly share code, notes, and snippets.

@dabeeeenster
Created February 14, 2022 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabeeeenster/da2732be94d14325f78cd504737ad5be to your computer and use it in GitHub Desktop.
Save dabeeeenster/da2732be94d14325f78cd504737ad5be to your computer and use it in GitHub Desktop.
- TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$TASK_DEFINITION_NAME" --region "${AWS_DEFAULT_REGION}")
- NEW_CONTAINER_DEFINITION=$(echo $TASK_DEFINITION | jq --arg IMAGE "$REPOSITORY_URL:$IMAGE_TAG" '.taskDefinition.containerDefinitions[0].image = $IMAGE | .taskDefinition.containerDefinitions[0]')
- echo "Registering new container definition..."
- aws ecs register-task-definition --region "${AWS_DEFAULT_REGION}" --family "${TASK_DEFINITION_NAME}" --container-definitions "${NEW_CONTAINER_DEFINITION}" --cpu 1024 --memory 2048 --requires-compatibilities "FARGATE" --network-mode "awsvpc" --execution-role-arn "${EXECUTION_ROLE_ARN}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment