I am new to Play framework as well to amazon ec2. I have a play 2.1 application which i want to deploy on amazon ec2. I have amazon microinstance already set up. Is there any guide or steps available that I can follow ?
Create an AWS CDK stack with an Amazon EC2 instance, a security group with inbound access, and an IAM instance profile. Install software packages on the EC2 instance's first launch by creating a user data asset. Configure the software packages after installation using a script downloaded by the user data.
EC2 is Amazon's service that allows you to create a server (AWS calls these instances) in the AWS cloud. You pay by the hour and only what you use. You can do whatever you want with this instance as well as launch n number of instances. Elastic Beanstalk is one layer of abstraction away from the EC2 layer.
Use the dist command from the Play console, then copy the zip on your EC2 server, unzip it, and run your app using the start
script.
You can also use some other config, take a look at the doc.
And it is also better to put a HTTP frontend.
See the links attached to each step that you need to take:
Connect to your ec2 instance
Install Play
Copy your application (add -r
option to scp
if copying the whole folder)
Run the application
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With