How Amazon Lightsail handle failures

0

I have a single AWS Lighstail instance that runs LAMP stack, without static IP address. There is a php app deployed and it connects to a MySQL on the same instance.

I've setup an automatic snapshots of the instance (every 24 hours). A couple of questions now:

  1. Where are these snapshots stored ?

  2. If the instance fails, who is responsible of restoring it from the latest backup ? Me or Amazon ? 2a. If me, then how will I know when it was down and how to restore it ? 2b. If AWS, then are there any actions that I need to do ? And what will be the downtime ?

  3. When it's restored from the backup, will it have the same IP address or not ? If different, then what will the users see when they go the domain, which was still pointing to the old IP address?

1 Answer
0
Accepted Answer

Hi, Here are answers to your questions:

  1. The snapshot is stored in AWS, and you can visit all your existing snapshots for a instance from snapshots tab in Lightsail console instance detail page. Alternatively, you can use lightsail cli to get snapshots, you can use get-auto-snapshots to get automatic snapshots, or get-instance-snapshotsto get all manual created instance snapshots.
  2. You will be responsible for restoring the snapshot. You can set up alarm on operation system level failure by following this doc. If it the software level failure, you have to implement your own alarming mechanism to reduce the downtime of your software.
  3. Without a static ip, the ip address will not remain the same, the public ip address is randomly assigned when instance started. To preserve the ip address, I would recommend you to create a static ip. Once you restored a new instance from snapshot, you can attach the static ip to the newly created instance. Without static ip, the domain will still resolve to old ip address which no longer accessible.
AWS
yujie
answered a year ago
  • THANKS A LOT @yujie. A couple of follow up questions:

    1. Is the lightsail snapshot stored in the same lighstail instance ? If yes, it means if an instance fails, there is no way to get to the latest snapshot.

    2. Does snapshot contain the file system (as much files it has) or it's a disk snapshot. If just the filesystem, the way to restore it to copy all the files to a new instance. Or if its a snapshot, we can just create a new instance and give it an snapshot to restore from ?

  • Snapshot is not stored in the same lightsail instance, it is stored separately in AWS, if the instance failed, you can still find the latest snapshot from Lightsail console and restore a new instance from the snapshot.

    The instance snapshot contains the file system and the entire operation system. If you have a disk attached to the instance, you can also create a disk snapshot and restore disk from the disk snapshot.

    you can view more details here https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-instance-snapshots-in-amazon-lightsail

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions