Re: Deploying to AWS

154 views
Skip to first unread message

Evan Meagher

unread,
Jul 28, 2016, 11:23:07 PM7/28/16
to dropwiz...@googlegroups.com
dropwizard-dev to bcc, +dropwizard-user

You probably need to set an inbound security group rule to open up the port on which your Dropwizard application is serving. For instance, if you're running your server on port 8080 of an EC2 instance, you need to attach a security group to that instance that opens up port 8080 to public traffic.

Provided you have the port open, you should be able to curl the instance at the public IP or DNS name exposed by Amazon.

On Thu, Jul 28, 2016 at 5:31 PM, Dan Cody <minipo...@gmail.com> wrote:
Hi,

How would I deploy dropwizard to AWS.  I was able to get the JAR onto the EC2 box and It runs fine but I cannot access the endpoints through the url.  I am not sure if I am deploying the jar in the correct location or if an EC2 is the correct instance. 

Thanks

--
You received this message because you are subscribed to the Google Groups "dropwizard-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Evan Meagher

Graham O'Regan

unread,
Jul 29, 2016, 1:39:37 AM7/29/16
to dropwiz...@googlegroups.com
the easiest way to run on AWS is to use Elastic Beanstalk. Create a new application with a Java environment and add a Procfile and Buildfile, beanstalk will take care of setting up the EC2 instance along with an ASG and ELB, just like Heroku.

The Buildfile can be as simple as this;

build: mvn -DskipTests resources:resources package
And the Procfile;

web: java -jar target/backend-01.jar
You’ll need to set your HTTP port to 5000 as that what Beanstalk expects (you can change that but it is easier to change on the Dropwizard side);

server:
applicationConnectors:
- type: http
port: 5000

Beanstalk lets you push changes using Git (staged or committed) or upload jars, which ever works best.

Graham

You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.

Aldrin Leal

unread,
Jul 29, 2016, 4:15:08 AM7/29/16
to dropwizard-user
graham,

I actually wrote beanstalker, the most used Maven Tools for AWS Elastic Beanstalk, and there's an archetype for that:

$ mvn archetype:generate -Dfilter=elasticbeanstalk-docker-dropwizard

(if someone wants to update it, it would be welcome)
Reply all
Reply to author
Forward
0 new messages