title: Absolute minimal way to link AWS API Gateway to container image
body: <p>I have a docker image uploaded ECR that provides a single page web app. I would like to make an API Gateway endpoint that starts a new instance based on that image, and then maps port 443 (or 80) to container port 7894 (specified by app in the image).</p>
  <p>Sketch of ideal architecture:</p>
  <ul>
  <li>Running EC2 instance based off my ECR image</li>
  <li>API Gateway with single GET endpoint mapping.</li>
  </ul>
  <p>That is, I want something as close as possible to what I starting the image via</p>
  <pre class="lang-sh prettyprint-override"><code>docker run -p 80:7894 my_app:latest
  </code></pre>
  <p>and navigating to <code>http://localhost</code>.</p>
  <p>I only ever want at most one of these running (not a hard requirement, just saying I don't feel I need a load balancer), and I have a preference for &quot;less&quot; security given there's security in the app and I'm literally the only person who will be using this. That is, I'd be very happy if I could</p>
  <ol>
  <li>start a new container</li>
  <li>directly expose port 7894 of that to the internet</li>
  </ol>
  <p>What is the absolute minimal set of resources I need to set up to make this happen?</p>
  <p>I've tried a few approaches based on Fargate, but these all end up requiring a number of extra networking and load balancing steps (VPC/subnets, ALB/NLB/CloudMap, ...) that seem unnecessary.</p>