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?
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.
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.
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.
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.
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.
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