I have a java spring boot application that runs a job to upload data to Database after polling a message from SQS and this application also contains a REST API over that same database.
Now I need to decouple the upload functionality and REST API.
Upload functionality would be done by an AWS Batch Job which would be triggered by a lambda. Rest API would be simply as it was before.
Challenge is that I need to do all these operations within the same code repo. This is to avoid having 3 repositories one for REST API, another for the AWS Batch Job, and the last for AWS lambda handler.
Thus trying to find out solutions that spring boot can provide to run a same application in different modes. Please help.