0

I have a spring boot project that runs normally on localhost. But when I upload the WAR on AWS using ElasticBeansTalk, I have a 404 not found.

The access to DynamoDB works fine from the CLI.

The variables on the properties file are the same as the one I am using to access DynamoDB from the CLI

properties file:

amazon.dynamodb.endpoint=http://dynamodb.us-west-2.amazonaws.com
amazon.aws.accesskey=***
amazon.aws.secretkey=***

CLI:

aws configure
AWS Access Key ID [********************]:
AWS Secret Access Key [********************]:
Default region name [us-west-2]:
Default output format [json]:

I don't know why I am having the 404 not found on AWS

Judy1989
  • 327
  • 1
  • 6
  • 18

1 Answers1

0

AWS is set to listen to port 5000 by default, so you just need to set server.port=5000 in your application.properties file before creating your WAR. Or you can set an SERVER_PORT environment property to change it from 5000 to 8080 that Spring uses.

Another issue I ran into was creating the environment using Java, when you should actually be using Tomcat.

Great step by step here and extra context here.