AWS and hosting a Website

19 views
Skip to first unread message

David Merrick

unread,
Jan 26, 2019, 2:20:35 PM1/26/19
to Ruby on Rails: Talk
I am currently running an AWS Cloud9 Web App with EC2.

I want a AWS Service that I can set up to run a Website with a Domain Name attached and keep it while I'm not logged into Amazon?

Any Suggestions?

Cheers Dave

Hassan Schroeder

unread,
Jan 26, 2019, 2:29:09 PM1/26/19
to rubyonrails-talk
On Sat, Jan 26, 2019 at 11:20 AM David Merrick <merri...@gmail.com> wrote:

> I want a AWS Service that I can set up to run a Website with a Domain Name attached and keep it while I'm not logged into Amazon?

Unless you want to plunge into exploring container-land, what's wrong
with an EC2 instance and Route53 for DNS?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Walter Lee Davis

unread,
Jan 26, 2019, 3:10:02 PM1/26/19
to rubyonra...@googlegroups.com
And once you have an EC2 instance, set up a separate static IP address in the EC2 control panel, which you can switch around to different instances, or assign to an Elastic Load Balancer if you want to stand up multiple instances of the same app on separate VPSs.

Walter

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAzdY4vUSMP%3DVYU18Qubae2yLSBRAG43nTsqgP_oQeLHQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

David Merrick

unread,
Jan 26, 2019, 3:27:06 PM1/26/19
to Ruby on Rails: Talk
Hi so I can use EC2 store the Rails App and Route53 to manage the Domain Name?

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAzdY4vUSMP%3DVYU18Qubae2yLSBRAG43nTsqgP_oQeLHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Dave Merrick

Daves Web Designs

Website http://www.daveswebdesigns.co.nz

Email merri...@gmail.com

Ph   03 216 2053

Cell 027 3089 169

Hassan Schroeder

unread,
Jan 26, 2019, 3:42:11 PM1/26/19
to rubyonrails-talk
On Sat, Jan 26, 2019 at 12:27 PM David Merrick <merri...@gmail.com> wrote:
>
> Hi so I can use EC2 store the Rails App and Route53 to manage the Domain Name?

I'm not sure what you mean by "store" -- an EC2 instance is a server
that you can deploy your app on.

And yes Route53 is AWS's DNS management system.

David Merrick

unread,
Jan 26, 2019, 3:48:43 PM1/26/19
to Ruby on Rails: Talk
I meant a place where I can run my Rails App from so its runs all the time.

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 26, 2019, 3:55:31 PM1/26/19
to rubyonrails-talk
On Sat, Jan 26, 2019 at 12:48 PM David Merrick <merri...@gmail.com> wrote:
>
> I meant a place where I can run my Rails App from so its runs all the time.

That's pretty much the definition of a server, eh? Though whether the
app runs "all the time" is at least partially up to you 😀

Best of luck!

David Merrick

unread,
Jan 26, 2019, 3:56:49 PM1/26/19
to Ruby on Rails: Talk
How do you ensure it runs all the time?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Phil Edelbrock

unread,
Jan 26, 2019, 5:51:36 PM1/26/19
to rubyonra...@googlegroups.com
I use Heroku for my AWS Rails app and it's free (for my use).


Phil

David Merrick

unread,
Jan 26, 2019, 6:42:57 PM1/26/19
to Ruby on Rails: Talk
Unfortunately Heroku doesn't store images etc.

Cheers Dave 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Hassan Schroeder

unread,
Jan 26, 2019, 9:22:07 PM1/26/19
to rubyonrails-talk
On Sat, Jan 26, 2019 at 12:56 PM David Merrick <merri...@gmail.com> wrote:
>
> How do you ensure it runs all the time?

LOL, what's your uptime requirement and budget? Let's start here:

+ Do you have untested code in your app that could crash it?
+ Is your system configured to monitor your app and restart it when it crashes?
+ Is your system configured to notify you when it can't reliably
restart a crashed app?
+ Do you have monitoring in place to notify you when your app's unreachable?

Fix the ones you answered "no" to and then we'll discuss next steps
towards "all the time" :-)

Phil Edelbrock

unread,
Jan 26, 2019, 10:16:07 PM1/26/19
to rubyonra...@googlegroups.com


On Jan 26, 2019, at 3:42 PM, David Merrick <merri...@gmail.com> wrote:

Unfortunately Heroku doesn't store images etc.

Cheers Dave 

On Sun, 27 Jan 2019 11:51 AM Phil Edelbrock <ede...@gmail.com wrote:


> On Jan 26, 2019, at 11:20 AM, David Merrick <merri...@gmail.com> wrote:
>
> I am currently running an AWS Cloud9 Web App with EC2.
>
> I want a AWS Service that I can set up to run a Website with a Domain Name attached and keep it while I'm not logged into Amazon?
>
> Any Suggestions?
>
> Cheers Dave


I use Heroku for my AWS Rails app and it's free (for my use).


Phil

Strange... I guess my site doesn't exist then. LOL.  Yes, Heroku stores images and such.  It is a AWS reseller.

Good luck!


Phil

David Merrick

unread,
Jan 26, 2019, 11:32:26 PM1/26/19
to Ruby on Rails: Talk
Heroku use another provider like AWS to store images

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

Colin Law

unread,
Jan 27, 2019, 4:30:19 AM1/27/19
to Ruby on Rails: Talk
On Sat, 26 Jan 2019 at 20:56, David Merrick <merri...@gmail.com> wrote:
>
> How do you ensure it runs all the time?

By this do you possibly mean "How to auto-run the server on boot and
restart it if it fails?".

Colin
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2B%3DMcKbmhgFUMSvmEozKcJK%3D37vt-TS5Rd6%2Bberk%3DCUyAw-VUg%40mail.gmail.com.

David Merrick

unread,
Jan 27, 2019, 1:05:57 PM1/27/19
to Ruby on Rails: Talk
Hi Hassan
All my code in my app is tested.
My system isn't configured to monitor your my App and restart it when it crashes.  But since I only have a few Websites monitoring wouldn't be a problem. If it crashed I would look at the the logs.
No to 3 and 4 But see 2.

Cheers Dave
   




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 27, 2019, 1:22:43 PM1/27/19
to rubyonrails-talk
On Sun, Jan 27, 2019 at 10:05 AM David Merrick <merri...@gmail.com> wrote:

> My system isn't configured to monitor your my App and restart it when it crashes. But since I only have a few Websites monitoring wouldn't be a problem. If it crashed I would look at the the logs.

Then it won't "run all the time". The point isn't troubleshooting after
the fact, it's automating the processes to *keep it running*.

Also,
> All my code in my app is tested.

I have yet to see an app with really adequate tests, even ones that
your-choice-of-tool claims have 100% coverage.

But managed restarts and alerting address that up to the point of
needing to deploy redundant infrastructure.

David Merrick

unread,
Jan 27, 2019, 3:33:25 PM1/27/19
to Ruby on Rails: Talk
Excluding My system isn't configured to monitor your my App and restart it when it crashes.  But since I only have a few Websites monitoring wouldn't be a problem. If it crashed I would look at the the logs.
What to I need set up in AWS to get my Website running all the time?

I would like to know how to do
+ Is your system configured to monitor your app and restart it when it crashes?
+ Is your system configured to notify you when it can't reliably
restart a crashed app?
+ Do you have monitoring in place to notify you when your app's unreachable?  

With AWS Cloud as soon as you log out the Website stops running




--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 28, 2019, 11:15:47 AM1/28/19
to rubyonrails-talk
On Sun, Jan 27, 2019 at 12:33 PM David Merrick <merri...@gmail.com> wrote:

> I would like to know how to do
> + Is your system configured to monitor your app and restart it when it crashes?
> + Is your system configured to notify you when it can't reliably
> restart a crashed app?
> + Do you have monitoring in place to notify you when your app's unreachable?

Too broad to answer. It depends on the server OS, how you've set
up Rails (web server, app server), budget, etc. etc.

Do you have a current running EC2 instance, or is this brand new?

David Merrick

unread,
Jan 28, 2019, 3:19:11 PM1/28/19
to Ruby on Rails: Talk
Yes I have EC2 instance but its on Cloud9

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 28, 2019, 3:33:23 PM1/28/19
to rubyonrails-talk
On Mon, Jan 28, 2019 at 12:19 PM David Merrick <merri...@gmail.com> wrote:
>
> Yes I have EC2 instance but its on Cloud9

This Cloud9 thing isn't remotely relevant to this discussion.

You need to provision an EC2 instance of your own, configure it as
necessary and deploy your app to it. Those are the first steps toward
having your app "run all the time".

David Merrick

unread,
Jan 28, 2019, 3:36:30 PM1/28/19
to Ruby on Rails: Talk
I have the files loaded. Whats next please?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Walter Lee Davis

unread,
Jan 28, 2019, 3:47:11 PM1/28/19
to rubyonra...@googlegroups.com

> On Jan 28, 2019, at 3:18 PM, David Merrick <merri...@gmail.com> wrote:
>
> Yes I have EC2 instance but its on Cloud9

Aha. That's like having a cloud server for your development environment. That makes sense, then, that it would stop running when you stop working in its console. It's like spinning up rails server in the console on your Mac.

Now you need to do something similar, but with a production environment.

The web is awash in tutorials that will explain how to deploy a production instance of your Rails application on any number of different hosting platforms. Heroku is certainly a good choice, because it exchanges you following a set of conventions and and accepting some restrictions (and paying for the pleasure) for seriously no-pain deployment. Amazon has their Elastic Beanstalk service, which does something similar (I think, never tried it).

But you can use EC2 to set up a virtual private server. To do that, you have to know a fair number of details about running a Linux server, since what you get in EC2 (without another layer over the top of it) is literally near-root (sudo) access to a bare system install Linux box. Everything you want to add (web server, application server, ruby itself, etc.) will be put there by your own hand.

Be ready to use `apt-get install each individual thing` and a fair amount of configuration (generating and installing a certificate and setting up SSL, for example) before anyone can find your site and use it.

But once you do, you'll have a server running an application server like Passenger or Unicorn (which will handle scaling and restarting your app) and a web server like Apache 2 or NGINX to proxy requests to it. And all of that will start up whenever your virtual machine restarts, and that will only be because you asked it to manually, or something catastrophic happened (like Netflix and half the internet is down).

Walter
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2B%3DMcKZU%3DQyg5YoeJhVrMJXzS_zJ2kQ473q-jLBzFdvLZtvzDw%40mail.gmail.com.

David Merrick

unread,
Jan 28, 2019, 3:54:19 PM1/28/19
to Ruby on Rails: Talk
Thanks Walter. I'm looking for something in AWS thats easy to set up, stores images and relatively cheap to run like about $US 2 -3 per month, I already have a Domain Name. Just to need change Name Servers

Cheers Dave


For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 28, 2019, 4:17:41 PM1/28/19
to rubyonrails-talk
On Mon, Jan 28, 2019 at 12:54 PM David Merrick <merri...@gmail.com> wrote:
>
> I'm looking for something in AWS thats easy to set up, stores images and relatively cheap to run like about $US 2 -3 per month

What do you mean by "stores images"? "uses images stored in the
app deployment artifact" is very different than "allows users to upload
and save images".

If the former, you could most likely use the Heroku free tier. If the
latter, you could use Heroku and S3 together within that budget.

Regardless, you need to research what's going to meet your needs
and budget, and decide how much you want to learn about being a
full-service developer 😀

David Merrick

unread,
Jan 28, 2019, 4:37:50 PM1/28/19
to Ruby on Rails: Talk
Thanks. The website I want to get up and running the images are stored by the developer. I think I will be Heroku and S3 together.

Other websites I am developing the user will be uploading images and storing.

I was hoping to avoid reading through a lot of stuff and still not understanding it to find a solution to meet my needs.

Cheers Dave

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Jan 28, 2019, 4:56:06 PM1/28/19
to rubyonrails-talk
On Mon, Jan 28, 2019 at 1:37 PM David Merrick <merri...@gmail.com> wrote:

> I was hoping to avoid reading through a lot of stuff and still not
> understanding it to find a solution to meet my needs.

Well, I hate to say it but if meeting your perceived needs requires more
knowledge than you currently have, reading and understanding will be
pretty much essential to move forward 😀

Have fun!
Reply all
Reply to author
Forward
0 new messages