If you need to trigger a Fargate task that executes a batch job and then exits wouldn't make more sense to use a pattern such as the one I am describing in this blog post? Note that in my example I submit an AWS Batch job but API GW also supports launching an ECS task (on Fargate).
The idea is that the task would launch a program that does what you need it to do and then exits (you should not worry about scaling in at all with this pattern). Need another task? Hit the API GW API to submit/launch another job/task and that's it.
Generally speaking, systems on AWS are conservative about scale ins, compared to scale out.
You do not want your system to be scaled in immediately after it completes certain tasks.
That being said, from a long term auto scaling policies such as target tracking do a fairly good job of matching capacity with demands. If there is no connection to a container, the auto scaling scale in event should be triggered.
Also, to another point in the question, you might want to check the de-registration delay value for your ELB as well to avoid terminating active long-running connections.
ARM64 support for Batch jobs on AWS FargateAccepted Answerasked 8 months ago
How to scale in ec2 fargate containers if job is done?asked 6 months ago
how to save a file while running an etl job in a fargate task?asked 2 months ago
Moving to ECS-Fargate from EC2asked 8 months ago
How to scale an aws ecs service based on multiple alarmsasked 6 months ago
Use API Gateway to run a Fargate task and then terminate that pod upon completionasked 6 months ago
Are the clocks in docker containers in Fargate synced with the host?Accepted Answerasked 2 months ago
Is it possible to use Lambda functions along with other services to scale up and scale down(probably to 0 instances) Ec2 Deployed appsasked 6 months ago
Fargate: how to stop task after finishingAccepted Answerasked 8 months ago
Converting a AWS Fargate instance to AWS EC2asked 3 years ago