Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add RAM to ec2 instance [closed]

I want to add memory to an ec2 micro instance that contains by default 1GB of RAM. Want to make it 2GB. Is it possible? Do I need to create a new instance or can I change an already existent instance?

like image 743
xeon123 Avatar asked Jan 29 '16 16:01

xeon123


People also ask

How do I increase EC2 instance size without downtime?

The best way to achieve a zero-downtime upgrade is with a blue/green deployment. This involves creating a new instance of the desired tier, readying it for production, swapping traffic over to it, then terminating the old instance. Then, under AMIs in the sidebar, you can launch a new instance using that image.

What happens when EC2 runs out of memory?

If the error "Out of memory: kill process" appears in the instance's system log, then the instance's memory is exhausted. When the memory is exhausted, the kernel doesn't have enough memory to run and other processes are terminated to free memory.

Can I upgrade EC2 instance without losing data?

Alert Be careful when copying data from the old machine to the new one. It's better to keep the old data as a backup instead of overwriting it directly.


2 Answers

Stop the instance. Change the instance type to the one that has the desired RAM and start the instance. You need t2.small for 2GB.

It goes without saying if you have an elastic IP assigned, stop/start will not change the IP. But if you have a (auto) public IP assigned, then the public IP will change after stop/start. If the machine is in a private subnet, then stop/start has no effect on the IP.

enter image description here

enter image description here

like image 111
helloV Avatar answered Oct 02 '22 20:10

helloV


EC2 instances have a very specific configuration regarding CPU, RAM, local instance storage, etc.

It is not possible to alter that configuration.

If your application needs more RAM than a micro instance can give you, then you need to move to a different EC2 instance type.

For 2 GB of RAM, you can change your instance to a t2.small instance.

like image 40
Matt Houser Avatar answered Oct 02 '22 18:10

Matt Houser