title: How to specify an instance class when deploying a Google App Engine application as a single JAR?
body: <p>I have an application which I deploy as a single JAR file to the Google App Engine Standard Java 11 environment (the application is Open Source, available at <a href="https://github.com/OndrejSpanel/Mixtio" rel="nofollow noreferrer">https://github.com/OndrejSpanel/Mixtio</a>). I would like the application to use instance class F2 instead of the default F1. When I have tried to provide my own app.yaml by specifying at the command line, I got error &quot;All .yaml files must have unique service ids.&quot;:</p>
  <p><code>gcloud app deploy --project mixtio backend/target/scala-2.12/mixtio.jar backend/web/WEB-INF/cron.yaml backend/web/WEB-INF/app.yaml</code></p>
  <blockquote>
  <p>ERROR: (gcloud.app.deploy) [D:\Users\xxx\AppData\Local\Temp\tmpmt01m6jp\app.yaml] and [X:\OpenSource\Mixtio\backend\web\WEB-INF\app.yaml] are both defining the service id [default]. All .yaml files must have unique service ids.</p>
  </blockquote>
  <p>This is how the default configuration generated by the Google Cloud when using single jar deployment looks like, as seen in the App Engine console:</p>
  <pre class="lang-yaml prettyprint-override"><code>runtime: java11
  env: standard
  instance_class: F1
  handlers:
    - url: .*
      script: auto
  automatic_scaling:
    min_idle_instances: automatic
    max_idle_instances: automatic
    min_pending_latency: automatic
    max_pending_latency: automatic
  network: {}
  </code></pre>
  <p>How can I configure parameters like <code>instance_class</code> for an application deployed as a single jar?</p>