Deploy Spring Boot to AWS, GCP and Azure: What Changed

Updated

Spring Boot deployment across cloud providers

Current Spring Boot (4.1.x is the GA line) needs Java 17 as an absolute floor — target 21 or 25 on every platform. Deploy the JAR with eb init and eb create on AWS Elastic Beanstalk, with an app.yaml beside the JAR and gcloud app deploy on Google App Engine, and with az webapp deploy --type jar on Azure App Service.

If you pick “Java 8” or “Java 11” as your Azure App Service runtime stack, your Spring Boot JAR will not start. The failure is at class-load time, before any of your code runs:

$ javac -d out26 App.java              # compiled by JDK 26
$ /opt/homebrew/opt/openjdk@17/bin/java -cp out26 App
Error: LinkageError occurred while loading main class App
	java.lang.UnsupportedClassVersionError: App has been compiled by a more recent version of
	the Java Runtime (class file version 70.0), this version of the Java Runtime only
	recognizes class file versions up to 61.0

A Java 11 App Service instance gives a Spring Boot 4 JAR the same error. Class file version 61 is Java 17, 55 is Java 11, 52 is Java 8 — read from byte 7 of the class file after compiling with each --release:

out8   major=52      out11  major=55      out17  major=61      out26  major=70

Which Spring Boot, and how long it is supported

Read from spring.io’s own project API rather than a blog post, on 2026-08-10:

$ curl -s https://api.spring.io/projects/spring-boot/releases   | ...
current GA: 4.1.0

$ curl -s https://api.spring.io/projects/spring-boot/generations | ...
2.7.x   initial=2022-05-31  OSS support ends=2023-06-30  commercial ends=2029-06-30
3.5.x   initial=2025-05-31  OSS support ends=2026-06-30  commercial ends=2032-06-30
4.0.x   initial=2025-11-30  OSS support ends=2026-12-31  commercial ends=2027-12-31
4.1.x   initial=2026-06-30  OSS support ends=2027-07-31  commercial ends=2028-07-31

Two things follow. Spring Boot 2.x has been out of open-source support since 30 June 2023 — 2.7.x was the last 2.x line, and free patches stopped over three years ago; commercial support runs to 2029 if you pay for it. And 3.x is out of OSS support too: 3.5.x, the final 3.x line, ended on 30 June 2026. If you were starting something in August 2026, 4.1.x was the line with a future.

The Java requirement, quoted from the current system-requirements page:

"Spring Boot 4.1.0 requires at least Java 17 and is compatible with versions up to
 and including Java 26."

Choosing within that range matters. Java 25 is the current LTS (GA 16 September 2025). Java 26 is a six-month feature release, not an LTS, with Oracle Premier Support only to September 2026 — fine for local development, wrong to standardise a deployment on. Target 21 or 25.

What changed on each of the three platforms

AWS Elastic Beanstalk. The eb init / eb create flow is still documented, and a Procfile with web: java -jar target/app.jar still works — Beanstalk runs a single JAR at the source-bundle root even without one. What changed is underneath: AWS’s retirement table lists the Amazon Linux 2 Corretto 8, 11 and 17 branches as retired on 6 August 2026, after Amazon Linux 2 itself reached end of support on 30 June 2026. The Beanstalk path on its own, platform by platform goes further into that retirement than this three-cloud comparison has room for. Current Java SE branches are Corretto 25, 21, 17, 11 and 8, all on Amazon Linux 2023; 11 and 8 exist but cannot run current Spring Boot. Note that AWS’s own Java quickstart still pins spring-boot-starter-parent 3.2.3, out of OSS support since the end of 2024 — do not copy its pom.xml wholesale.

Google App Engine. The deploy command is unchanged — drop an app.yaml beside the JAR, run gcloud app deploy — but two assumptions have expired. Java 8 and 11 are both past end of support on App Engine standard (11 ended 31 October 2024; 8 is deprecated and decommissions 31 January 2027). Supported runtimes are java17, java21 and java25. More significantly, Google steers new work away from App Engine: “For new Google Cloud users, we recommend using Cloud Run as the preferred alternative over App Engine.” App Engine is not deprecated, but recommending it for a greenfield app is recommending against Google’s own advice.

runtime: java25
entrypoint: java -Xmx64m -jar YOUR-ARTIFACT.jar

One detail that will cost you a deployment: App Engine sets the PORT environment variable and your app must listen on it. It cannot be overridden.

Azure App Service. Java 8 and 11 are still offered — Microsoft supports “Java 8, 11, 17, 21, and 25” — so choosing either one still appears to work in the portal, which is why it is dangerous. Choose 21 or 25. Deploy with az webapp deploy --resource-group <g> --name <app> --src-path app.jar --type jar, which lands it at /home/site/wwwroot/app.jar. Microsoft’s own quickstart uses the Maven plugin (mvn azure-webapp:deploy) instead.

And one more Java-on-Azure service: Azure Spring Apps is being retired. “On March 17, 2025, all Azure Spring Apps plans… entered a three-year retirement period, and will be retired on March 31, 2028.” It has not accepted new customers since March 2025. Microsoft points migrations at Azure Container Apps and AKS.

Three claims about AKS and service meshes that need correcting

They are worth correcting because they are repeated everywhere:

  • “AKS does not charge for the Kubernetes management infrastructure.” No longer true. AKS has a Free tier with no SLA (documented as not recommended above 10 nodes), a Standard tier at $73 per cluster per month and a Premium tier at $438 — $0.10 and $0.60 per cluster-hour, the same shape as EKS’s $0.10 standard / $0.60 extended-support rates and GKE’s $0.10 flat cluster fee. All three are priced almost identically as of August 2026.
  • “Service mesh integration: Azure Service Fabric, Azure Logic Apps.” Neither is a service mesh. Service Fabric is a distributed-systems platform and Logic Apps is a workflow service. Azure’s actual offering is the Istio-based service mesh add-on for AKS. Its predecessor, the Open Service Mesh add-on, loses AKS support on 30 September 2027.
  • “Service mesh integration: AWS App Mesh.” Withdrawn. From AWS’s own documentation: “On September 30, 2026, AWS will discontinue support for AWS App Mesh. After September 30, 2026, you will no longer be able to access the AWS App Mesh console or AWS App Mesh resources.”

What was not deployed

Nothing here was deployed to any cloud. I have no AWS, GCP or Azure account and no Maven or Gradle installed, so no Spring Boot application was even built. The class-version demonstration is real and local, run against the two JDKs installed here (17.0.20 and 26.0.2), and Spring Boot’s version and support dates came from api.spring.io. deploy-spring-boot-multi-cloud.sh skips every deployment step and every price by name, and repeats the rest: the class-version test, the spring.io lookups and the App Mesh and Azure Spring Apps retirement notices. Everything about Elastic Beanstalk, App Engine, App Service, AKS, EKS, GKE, App Mesh and Azure Spring Apps is quoted from vendor documentation, not observed running. Prices are published list rates in the vendors’ default regions and differ elsewhere.

Photo of author
Sudhir P. founded HeatWare.com in 1999 and has built and operated it full-stack ever since; it is now used by more than 88,000 people. He writes here about the PostgreSQL, MySQL, Linux and DevOps work that keeps it running. Articles are rewritten only after the commands in them have actually been run, and the verification scripts are published alongside them so anyone can check the claims. Reach him at blog@heatware.net.