Deploy legacy Tomcat JARs to Elastic Beanstalk with RDS PostgreSQL
A company plans to migrate a legacy on-premises application to AWS. The application is a Java web application that runs on Apache Tomcat with a PostgreSQL database. The company does not have access to the source code but can deploy the application Java Archive (JAR) files. The application has increased traffic at the end of each month. Which solution will meet these requirements with the LEAST operational overhead?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Elastic Beanstalk accepts a deployable application such as a Java archive directly, so a team holding only JARs can deploy without reverse-engineering or rewriting anything, and it manages provisioning, load balancing, and auto scaling as a managed service.
A legacy Java web application on Apache Tomcat with a PostgreSQL database must move to AWS, and the company has no source code but can deploy the application JAR files. Traffic rises sharply at the end of each month, so the solution must scale, and the priority is the least operational overhead.
Rewriting the Java application in Python and moving the logic to Lambda functions. The company does not have the source code, so a refactor is impossible, and replacing a containerised web application with functions is a much larger change than deploying the existing artefact.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The constraint of having only JAR files points directly at a service that accepts a pre-built application artefact. AWS Elastic Beanstalk is designed for exactly that, taking an application source bundle or a Java archive and handling provisioning, capacity, load balancing, and auto scaling across Availability Zones without the team managing instances. The month-end traffic spike is absorbed by the Auto Scaling group Elastic Beanstalk configures, so the team does not build scaling logic. Keeping the data in Amazon RDS for PostgreSQL also moves the database off the application instances, which removes the shared-database coordination problem that arises when every instance runs its own PostgreSQL as described in the other options. CloudFront in front of the Application Load Balancer adds a further caching layer for static content.Why the Other Options Are Wrong
A: Deploying both Tomcat and PostgreSQL onto every EC2 instance with EFS mount points creates multiple independent database instances that will diverge, and Step Functions is a workflow orchestration service being used inappropriately to add instances, so this design is both incorrect and operationally heavy. B: EKS across multiple Regions with a Network Load Balancer is far more machinery than the requirement implies, and a Network Load Balancer operates at layer 4 without the layer 7 routing the web tier benefits from, all while requiring a Kubernetes control plane to operate. C: Refactoring the Java application into Python containers is impossible without the source code, and Lambda functions plus DynamoDB global tables and Storage Gateway would be a complete rewrite of an application the company can only deploy as an artefact.Community Comment Notes
The community voted 100 to 0 for D, and the top-voted comment linked a discussion confirming that JARs can be uploaded directly to Elastic Beanstalk, which is the decisive point given the no-source-code constraint. Several other commenters independently identified Elastic Beanstalk as the least-overhead option because it handles deployment, capacity provisioning, load balancing, and auto scaling automatically.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →