Deploy legacy Tomcat JARs to Elastic Beanstalk with RDS PostgreSQL
Short answer
D Deploy the Tomcat JARs to Elastic Beanstalk with auto scaling across Availability Zones and store the data in RDS PostgreSQL.
Question
Key Takeaways
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.
Common mistake: 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.
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
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-applications.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
AhmedSalem 👍 4 Answered DAnswer D Elastic Beanstalk: Provides an easy and managed way to deploy and scale web applications. It handles the deployment, capacity provisioning, load balancing, and auto-scaling automatically. Amazon RDS for PostgreSQL: Manages the database operations, providing automated backups, patching, and scaling, which reduces operational overhead. CloudFront and Application Load Balancer: Ensure that the application can handle increased traffic efficiently, distributing the load across multiple Availability Zones and providing low latency.
-
mifune 👍 3 Answered DUpload the .jar straightforward to AWS Elastic Beanstalk. Answer D
-
AzureDP900 👍 1D is right Elastic Beanstalk: AWS Elastic Beanstalk is a managed service that automates the deployment, scaling, and management of web applications on EC2 instances. It provides auto-scaling capabilities, which can handle increased traffic without manual intervention. Multi-AZ deployment: Deploying Tomcat servers in multiple Availability Zones (AZs) ensures high availability and reduces downtime in case of failures or outages. RDS database instance: Using an RDS PostgreSQL database instance allows for easy scaling and management of your application's data, making it well-suited for increased traffic. CloudFront and ALB: Deploying Amazon CloudFront (CDN) and Application Load Balancer (ALB) helps distribute traffic across multiple regions and instances, ensuring a scalable and high-performance architecture.
-
nimbus_00 👍 1 Answered Dhttps://stackoverflow.com/questions/70184420/can-jars-be-uploaded-successfully-to-aws-elastic-beanstalk-from-the-aws-web-ui
-
kupo777 👍 1D The option with the least overhead is the use of AWS Elastic Beanstalk Tomcat.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →