I have hosted a CakePHP app in EC2 using Elastic Beanstalk. Due to some performance issues I had to restart the server. Now I have lost all the files.
Did you reboot the instance or stop and start it?
If you rebooted it then it's certain your app and data are there.
If you stop and start an instance-store instance (not EBS-backed), then you will loose all your data on the ephemeral volume.
All this is well explained on the following link, take a look at it: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Storage.html.
Related
I am setting up an infrastructure to deploy my application on AWS. I am using ECS service because I am trying to deploy a Docker-based application. So far I have created a task definition with two containers one for the apache and another one for PHP. Then I launched an ECS cluster with an EC2 instance and a task running. They all seem to be up and running. Now, I am trying to figure out how I can access the apache of my EC2 instance with the Cluster on the browser.
This is how I created the apache container.
And then I created the php container as follow.
Then I launched an EC2 based ECS cluster with one instance in it. Then I run one task within the cluster. Then I tried to open the public IP address of my instance. It just keeps loading loading and loading. What is wrong with my configuration? How can I access it on the browser?
It seems to me there's a couple of possible scenarios here you could check:
If do you reach the service and are stuck on an endless reloading loop, which might point to something in your code that could be causing it to do that,
If you're having a long wait time till the browser actually gives a timeout, which might be caused by not having the right port open on the Security Group associated with your task definition.
I've been tasked with getting a new SSL installed on a website, the site is hosted on AWS EC2.
I've discovered that I need the key pair in order to connect to the server instance, however the client doesn't have contact with the former web master.
I don't have much familiarity with AWS so I'm somewhat at a loss of how to proceed. I'm guessing I would need the old key pair to access the server instance and install the SSL?
I see there's also the Certificate Manager section in AWS, but don't currently see an SSL in there. Will installing it here attach it to the website or do I need to access the server instance and install it there?
There is a documented process for updating the SSH keys on an EC2 instance. However, this will require some downtime, and must not be run on an instance-store-backed instance. If you're new to AWS then you might not be able to determine whether this is the case, so would be risky.
Instead, I think your best option is to bring up an Elastic Load Balancer to be the new front-end for the application: clients will connect to it, and it will in turn connect to the application instance. You can attach an ACM cert to the ELB, and shifting traffic should be a matter of changing the DNS entry (but, of course, test it out first!).
Moving forward, you should redeploy the application to a new EC2 instance, and then point the ELB at this instance. This may be easier said than done, because the old instance is probably manually configured. With luck you have the site in source control, and can do deploys in a test environment.
If not, and you're running on Linux, you'll need to make a snapshot of the live instance and attach it to a different instance to learn how it's configured. Start with the EC2 EBS docs and try it out in a test environment before touching production.
I'm not sure if there's any good way to recover the content from a Windows EC2 instance. And if you're not comfortable with doing ops, you should find someone who is.
I've followed the guide to set up a LAMP WordPress site with EC2 on a Linux machine. I've attached a Elastic IP to it and configured the Security Group to allow HTTP access. It works great to access globally. However, after about one hour, I can't access the site any more. The EC2 health checks are fine, I can SSH to the server and the httpd, MySQL etc is up and running. When I reboot the EC2, everything starts to work again.
I've tried to troubleshoot for a while but don't understand what I'm doing wrong. Any ideas?
I have experienced the same with t2.micro with Apache and MySQL running on 8 GB Storage. Reasons is the memory consumption and log file filled the storage. This might be the reason here.
I have an interesting problem:
There is an EC2 instance, on which py3env is stored
I deploy my web app from pyCharm to EC2 and run the server (runserver 0.0.0.0)
Since last week the web app uses OLD files, which I have already deleted from EC2. I check app files on EC2 - they are correct, but still I have 'old' app running.
Maybe there is some EC2 cache problem or what?
There is nice documentation about your question.
That's the generic question.
Edit: Currently machine is m1-small Ubuntu 64bit changing to m1-medium.
Here are some of the components on the box:
-lighttpd (webserver)
-fastcgi
-django
-gps tracking server (written in python)
-.com.au domain
-postgresql
-postgis
Stackoverflow related How to change instance type
Edit: Upgrade went smoothly - no issues at all. Just took a snapshot of boot volume then changed the instance type after stopping the machine.
I did as expected have to re-associate my public IP address back to the instance using Elastic IP(very easy)
Before doing the upgrade I moved my postgresql cluster(data files) back to the boot volume (since it's small enough) as you can't snapshot instance drives.
Since you are sticking within 64-bit you should be able to stop the instance, change type and then start it again. You will have some downtime, but if you are using an elastic ip it will be minimal. Some caveats however.
If you are using instance storage, data on those volumes will be lost.
When you restart your instance will be assigned a new public and private ip address. If you are using an elastic ip, it will be disassociated, but you can re associate after the instance has started.
If you're talking about just changing the instance type, nothing. You should keep backups anyway in case amazon goofs, but remounting the EBS to a larger instance shouldn't break anything as long as you restart all the services and recompile whatever's necessary to be safe.
I recently did an instance type upgrade from t2.micro to r3.large by creating an image, terminating and then launching...
The image was Win 2012 R2 and I had a static DNS setting which was the DC (not the AWS service, another Win 2012 R2 instance)...
The static DNS setting was lost on the upgrade, so this needed to be reconfigured manually before domain authentication worked again!!