Deploy legacy Tomcat JARs to Elastic Beanstalk with RDS PostgreSQL

Answer Correct answer: D — Deploy the Tomcat JARs to Elastic Beanstalk with auto scaling across Availability Zones and store the data in 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?

  1. Launch Amazon EC2 instances in multiple Availability Zones. Deploy Tomcat and PostgreSQL to all the instances by using Amazon Elastic File System (Amazon EFS) mount points. Use AWS Step Functions to deploy additional EC2 instances to scale for increased traffic.
  2. Provision Amazon Elastic Kubernetes Service (Amazon EKS) in an Auto Scaling group across multiple AWS Regions. Deploy Tomcat and PostgreSQL in the container images. Use a Network Load Balancer to scale for increased traffic.
  3. Refactor the Java application into Python-based containers. Use AWS Lambda functions for the application logic. Store application data in Amazon DynamoDB global tables. Use AWS Storage Gateway and Lambda concurrency to scale for increased traffic.
  4. Use AWS Elastic Beanstalk to deploy the Tomcat servers with auto scaling in multiple Availability Zones. Store application data in an Amazon RDS for PostgreSQL database. Deploy Amazon CloudFront and an Application Load Balancer to scale for increased traffic. Correct Answer

Community Votes

D
100%

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)

nimbus_00 👍 1 Selected: D
https://stackoverflow.com/questions/70184420/can-jars-be-uploaded-successfully-to-aws-elastic-beanstalk-from-the-aws-web-ui
AzureDP900 👍 1
D 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.
AhmedSalem 👍 4 Selected: D
Answer 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.
kupo777 👍 1
D The option with the least overhead is the use of AWS Elastic Beanstalk Tomcat.
mifune 👍 3 Selected: D
Upload the .jar straightforward to AWS Elastic Beanstalk. Answer D

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 →

← Back to SAP-C02 Study Guide