Upgrade / Increase AWS Lightsail virtual machine's memory for better performance
Asked Answered
H

2

10

I have a AWS Lightsail VM with the following configuration

  • 512MB RAM
  • 1 vCPU
  • 20GB SSD
  • Ubuntu 20.04

The main problem is the RAM which is not enough for my current work and facing out of memory issues.

I want to increase RAM to at least 2GB or more.

I already have number of softwares installed and necessary settings on my current machine.

Main point is, I don't want to go through the pain of reinstalling all the softwares again and doing the settings which is not easy process at all. I also have data available in the MongoDB docker instance.

What can be the best solution to migrate to a new VM with 2GB RAM, softwares + settings and data.

Hindoo answered 11/1, 2021 at 18:20 Comment(1)
lightsail.aws.amazon.com/ls/docs/en_us/articles/…Compost
H
3

I used the following article to resolve my issue.
I didn't have to change anything and got the new upgraded Lightsail instance with all the software and settings which were there in my old VM. The services were also up and running. This is exactly what I was looking for.

Manual Steps
After assigning the new insance(VM) to the static IP, when you try to ssh the instance(VM) you may get this error.
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!.

To resolve this use the following command

$ ssh-keygen -f "/home/<username>/.ssh/known_hosts" -R "static IP"

The above instruction will add a new host key entry in known_hosts file.

Also, I have to manually allow ssh port in the networking section.

Article: https://cloudconfusing.com/2019/11/22/upgrading-your-lightsail-instance/

Thanks to @Robert for his input as well.

Hindoo answered 11/1, 2021 at 19:38 Comment(0)
W
17

AWS does not have the ability for you to upgrade your lightsail container.

You will need to perform the following steps:

  1. Make a snapshot of your instance
  2. Create a new instance and specify the snapshot. You will at this point be able to specify the memory, etc.
  3. Re-assign the static IP from your other lightsail instance to the new one.
  4. Test your site
  5. Destroy the old instance

Note: It is a good idea to use a static IP because as long as the IP is allocated it does not have any additional cost.

Wing answered 11/1, 2021 at 18:57 Comment(2)
how/where to specify the snapshot?Loney
You can create an instance from a snapshot on the instance's snapshot page.Drakensberg
H
3

I used the following article to resolve my issue.
I didn't have to change anything and got the new upgraded Lightsail instance with all the software and settings which were there in my old VM. The services were also up and running. This is exactly what I was looking for.

Manual Steps
After assigning the new insance(VM) to the static IP, when you try to ssh the instance(VM) you may get this error.
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!.

To resolve this use the following command

$ ssh-keygen -f "/home/<username>/.ssh/known_hosts" -R "static IP"

The above instruction will add a new host key entry in known_hosts file.

Also, I have to manually allow ssh port in the networking section.

Article: https://cloudconfusing.com/2019/11/22/upgrading-your-lightsail-instance/

Thanks to @Robert for his input as well.

Hindoo answered 11/1, 2021 at 19:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.