• TechOps

    Need clarity?
    Chat with our experts now

    • Web Hosting SupportWeb Hosting Support
    • Helpdesk Support

      Skilled and professional 24/7 helpdesk support

    • Product Support

      Boost your product support with our expertise

    • Managed ServicesManaged Services
    • Server Management

      Don't let server issues slow you down. Let us manage them for you

    • Server Monitoring

      Safeguard your server health with our comprehensive monitoring solutions

    • Staff AugmentationStaff Augmentation
    • Hire an Admin

      Transform your business operations with our expert administrative support

    • Hire a Team

      Augment your workforce with highly skilled professional from our diverse talent pool

  • CloudOps

    Confused?
    Discuss with our sales team now.

    • Author ProfileAWS
      Well Architected Review
    • Author ProfileFinOps As a Service

      FinOps As a Service

    • Migrate

      Upgrade the journey: Migrate & Modernize seamlessly

    • Modernize

      Effortless CloudOps mastery for seamless cloud management

    • Optimize

      Efficient CloudOps: Boosting performance through optimization

    • Manage

      Simplify compliance complexities with our dedicated service

  • DevOps

    How Supportsages
    is creating an
    impact?

    View Casestudies
    • Author Profile24/7 DevOps As a Service

      Round-the-clock DevOps for uninterrupted efficiency

    • Author ProfileCI/CD Pipeline

      Automated CI/CD pipeline for seamless deployments

    • Author ProfileInfrastructure As a Code

      Crafting infrastructure with ingenious code

    • Author ProfileDevSecOps

      Integrated security in continuous DevOps practices

    • Author ProfileHire DevOps Engineers

      Level up your team with DevOps visionaries

    • Author ProfileConsulting Services

      Navigate success with expert DevOps consulting

  • SecOps

    Expert SecOps Services
    for any Scale

    • Author ProfileVAPT

      Vulnerability Assessment and Penetration Testing

    • Author ProfileSource Code Review

      Ensuring source code security and safe practices to reduce risks

    • Author ProfileSecurity Consultation

      On demand services for improving server security

    • Author ProfileSystem Hardening

      Reduced vulnerability and proactive protection

    • Author ProfileManaged SOC

      Monitors and maintains system security. Quick response on incidents

    • Author ProfileCompliance as a Service

      Regulatory compliance, reduced risk

  • Insights

    Explore our latest
    insights and resources

    Blog

    Explore our latest articles and insights

    Case Studies

    Read about our client success stories

  • Contact Us

  • About
  • Certifications
  • Life at Supportsages
  • Events
  • Contact
  • Careers
  • Blog

  • Dedicated Support Team
  • Quasi-dedicated Support Team
  • Hire a DevOps Engineer
  • Hire a Billing Support Staff
  • Per-ticket Support Plan
  • Managed Services

  • Microsoft Azure Expert
  • AWS Cloud Expert
  • Hire a developer
SS

SupportSages

Bites of wisdom @ work


Copyright © 2008 - 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy
AWS LightSail Automatic Snapshots

AWS LightSail Automatic Snapshots

Shafeer P
  • 3 min read
AWS LightSail Automatic Snapshots

Generating audio, please wait...

Preface

AWS LightSail provides cheap VPS hosting compared to EC2, with a simple management interface.

LightSail allows us to create entire disk snapshots for reliability and portability. If you have a number of LightSail VPSs, managing the snapshots is a kinda headache for sure. So, we have written a shell script with the help of AWS CLI API to create and delete snapshots according to user’s preference, automatically.

The Shell Script

The script was originally written by Govind Raj and further improved by Shafeer P. The current version is kept in our GitHub repository.

Installation and Configuration

  1. Create an IAM programmatic user with the following permissions for the service LightSail:
    GetRegions
    GetInstance
    GetInstances
    GetDiskSnapshot
    GetDiskSnapshots
    GetInstanceSnapshot
    GetInstanceSnapshots
    GetDisk
    CreateDiskSnapshot
    CreateInstanceSnapshot
    DeleteInstanceSnapshot

    If you are unsure, create a user with LightSail full access. Note down the ACCESS_KEY and SECRET_KEY which we require in the next steps.

  2. Create KEY-VALUE pair tags for instances to take automatic backups.
    KEY  VALUE TYPE DEFAULT VALUE NOTES
    backup.enable true Boolean NULL Case-sensitive. Any value other than true will disable automatic backups.
    If disabled, existing backups won’t be removed automatically.
    backup.retention [0-9] Digit 1

    Maximum number of backups kept which created with name suffix snapof-

    The value 0 will remove all backups.

  3. Install the AWS CLI on a Linux machine
  4. Place the backup script in the Linux machine with AWS CLI installed, and modify the ACCESS_KEY, SECRET_KEY you have generated in Step 1.
  5. Give necessary permissions to the script and create a crontab entry according to your preferred schedule.

Default Behavior and Customization

  • The script uses ENVIRONMENT VARIABLE for AWS CLI for better portability. You can also rely on alternate methods for configuration.
  • If no retention count is specified for an instance in TAG, the default value 1 is used. You can customize this value in the script variable ret_count_default
  • AWS

Looking for AWS Experts?

We provide top-of-the-line custom AWS setup services tailored to your needs.

Configure SSL on Tomcat 6/7/8/9

Configure SSL on Tomcat 6/7/8/9
  • Linux
logo

Enable TNEF on Linux Servers

Enable TNEF on Linux Servers
  • Howtos
  • Linux
  • Windows
logo

Fixing zPanel blank-screen error

Fixing zPanel blank-screen error
  • Apache
  • Linux
  • Troubleshooting
logo

LightSail VPS: Enable Filesystem Quota

LightSail VPS: Enable Filesystem Quota
  • Linux
logo
Posts by Shafeer P

Shafeer is currently working as Senior System Engineer at SupportSages. He is capable of tackling time-consuming issues quickly with his advanced scripting abilities. His unchallenged expertise in solving complex issues in a cut-and-dried way makes him a dependable man in the team. The attitude and philosophy he shows on his workplace make his colleagues call him 'Mr. Perfectionist'. Furthermore, he is a travel and photography enthusiast, and loves to spend his leisure times on music and DIY arts.