Yep you’re looking for https://aws.amazon.com/fargate/
I think ECS is a better fit if you require GPU or you can do with not scaling to zero. Obviously once Fargate catches up and polishes its kinks it would stand on its own but given the way Cognito is, I have very little faith that things will improve quickly (theres an open ticket in cognito that is over 3 years old).
if you dont use containers in lambda, its super fast unless you start using C#/Java