# Amazon Lightsail

Automate Amazon Lightsail server and volume snapshots on a custom schedule.

SimpleBackups connects to your AWS account through IAM credentials to create and manage Lightsail snapshots automatically. This guide walks you through creating a least-privilege IAM policy, generating access keys, and linking your Lightsail account to SimpleBackups.

## Create a custom Lightsail policy for snapshots

1. Connect to your **AWS Console**
2. Head to the [**IAM/Policies management**](https://console.aws.amazon.com/iam/home#/policies) page
3. Click **Create policy**
4. Click **JSON** and paste the custom policy below:

![AWS - Create policy JSON editor](https://simplebackups.com/docs/docs-assets/www-notion-so/e449d89a14df8f5ee6a6.png)

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "SimpleBackupsLightsailSnapshots",
            "Effect": "Allow",
            "Action": [
                "lightsail:GetInstance",
                "lightsail:GetInstances",
                "lightsail:GetInstanceSnapshot",
                "lightsail:GetInstanceSnapshots",
                "lightsail:CreateInstanceSnapshot",
                "lightsail:DeleteInstanceSnapshot",
                "lightsail:GetDisk",
                "lightsail:GetDisks",
                "lightsail:GetDiskSnapshot",
                "lightsail:GetDiskSnapshots",
                "lightsail:CreateDiskSnapshot",
                "lightsail:DeleteDiskSnapshot",
                "lightsail:TagResource",
                "lightsail:UntagResource",
                "lightsail:CopySnapshot"
            ],
            "Resource": "*"
        }
    ]
}
```

5. Click **Next: Tags**, then **Next: Review**
6. Give the policy a name (for example, `LightsailSnapshotsPolicy`) and click **Create policy**

![AWS - Name and create the policy](https://simplebackups.com/docs/docs-assets/www-notion-so/fd8fee9605080792a4c3.png)

## Create a Lightsail user for snapshots

1. Head to the [**IAM/Users management**](https://console.aws.amazon.com/iamv2/home?#/users) page
2. Click **Add users**

### Step 1: Set user access

Define a name for your user and choose **Access key - Programmatic access** for the credential type.

![AWS - Set user name and access type](https://simplebackups.com/docs/docs-assets/www-notion-so/1a0c5a0bf023fcbdb922.png)

### Step 2: Attach policy to user

Select **Attach existing policies directly** and choose the `LightsailSnapshotsPolicy` you created earlier. Select **Create user without a permission boundary**.

![AWS - Attach policy to user](https://simplebackups.com/docs/docs-assets/www-notion-so/326da71f8ae6d2282102.png)

### Step 3: Finalize user creation

Skip the tags step and click **Next**. Review the details and create the user.

![AWS - Review and create user](https://simplebackups.com/docs/docs-assets/www-notion-so/47fd2d23de26b034693d.png)

### Step 4: Copy your access credentials

Copy both the **Access Key ID** and **Secret Access Key**.

![AWS - Copy access credentials](https://simplebackups.com/docs/docs-assets/www-notion-so/59fb52a104ba0dd571e7.png)

**Save your credentials:**
The secret key is displayed only once. Copy it immediately and store it securely.

## Connect Lightsail to SimpleBackups

1. Note which region your Lightsail instance is hosted in from the [Lightsail console](https://lightsail.aws.amazon.com/)

![Lightsail console - Instance region](https://simplebackups.com/docs/docs-assets/media-helpkit-co/7fb9ac2e8f0c423d3140.png)

2. In SimpleBackups, go to the [**Snapshots/Create**](https://my.simplebackups.com/snapshot/create) page

![SimpleBackups - Snapshots page](https://simplebackups.com/docs/docs-assets/media-helpkit-co/e754ba84f5d5c7674629.png)

3. Click **Connect a new Provider** and select **Amazon Lightsail**

![SimpleBackups - Select Amazon Lightsail](https://simplebackups.com/docs/docs-assets/media-helpkit-co/4106cc44d36edb60b5e8.png)

4. Enter a name, paste your access key and secret, select the region where your Lightsail instance is hosted, and click **Save provider**

![SimpleBackups - Lightsail provider form](https://simplebackups.com/docs/docs-assets/media-helpkit-co/db567feea48a926934b5.png)

5. Select your Lightsail instance from the resource list

![SimpleBackups - Select Lightsail instance](https://simplebackups.com/docs/docs-assets/media-helpkit-co/05b5052c7eae337e19f8.png)

6. Configure your schedule, retention, and a descriptive name, then click **Create Snapshot**

![SimpleBackups - Configure snapshot job](https://simplebackups.com/docs/docs-assets/media-helpkit-co/69c7722d2d41403ee467.png)
