Fargate vs Lambda, when to use which? : <p>I'm pretty new to the whole Serverless landscape, and am trying to wrap my head around when to use Fargate vs Lambda. </p>

<p>I am aware that Fargate is a serverless subset of ECS, and Lambda is serverless as well but driven by events. But I'd like to be able to explain the two paradigms in simple terms to other folks that are familiar with containers but not that much with AWS and serverless. </p>

<p>Currently we have a couple of physical servers in charge of receiving text files, parsing them out, and populating several db tables with the results. Based on my understanding, I think this would be a use case better suited for Lambda because the process that parses out the text files is triggered by a schedule, is not long running, and ramps down when not in use. </p>

<p>However, if we were to port over one of our servers that receive API calls, we would probably want to use Fargate because we would always need at least one instance of the image up and running. </p>

<p>In terms of containers, and in very general terms would it be safe to say that if the container is designed to do:  </p>

<pre><code>docker run &lt;some_input&gt;
</code></pre>

<p>Then it is a job for Lambda. </p>

<p>But if the container is designed to do something like:</p>

<pre><code>docker run --expose 80
</code></pre>

<p>Then it is a job for Fargate. </p>

<p>Is this a good analogy? </p>
