Need help with lightsail-auto-snapshots?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

121 Stars 41 Forks Apache License 2.0 22 Commits 6 Opened issues


Lambda function to automatically back up your Lightsail instances.

Services available


Need anything else?

Contributors list

Lightsail Auto Snapshots

An AWS Lambda function to automatically snapshot all Amazon Lightsail virtual private servers in an account and retain them for a given number of days. The included AWS Serverless Application Model (SAM) template will upload and create the function, grant it the permissions necessary to list your Lightsail instances and snapshots and create and delete snapshots, and schedule it to run once per day.


To install this function, ensure you have the AWS Command Line Interface (AWS CLI) installed and configured.

Run the deploy script and optionally specify the region to install the function and the number of days for which snapshots should be retained. By default, the script will install the function into your default configured region and retain snapshots for 30 days.

## Install in US East (Ohio) and retain snapshots for 15 days
REGION=us-east-2 DAYS=15 bin/deploy

Install in the CLI's configured default region and retain snapshots for 90 days

DAYS=90 bin/deploy

Install in EU (Ireland) and retain snapshots for 30 days

REGION=eu-west-1 bin/deploy

Install in Asia Pacific (Tokyo) and create snapshot every day at 7:00pm UTC, retain snapshots for 30 days

REGION=ap-northeast-1 SCHEDULE="cron(0 19 * * ? *)" bin/deploy


Copyright 2011-2017, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at

or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.