GithubHelp home page GithubHelp logo

amazonec2amibackup's Introduction

Amazon EC2 AMI Backup Using Lambda Functions

Overview

This project demonstrates how to automate Amazon Machine Image (AMI) backups for your Amazon Elastic Compute Cloud (EC2) instances using AWS Lambda functions. It includes logging and alerting features using Amazon Simple Notification Service (SNS) to enhance monitoring and notifications. If you would like to check out the detailed explanation and coding part, please find the report. Thank you.

Table of Contents

Prerequisites

Before setting up the AMI backup solution, make sure you have the following prerequisites in place:

  • An AWS account with appropriate permissions to create and manage Lambda functions, CloudWatch Events, SNS topics, and EC2 resources.
  • AWS CLI and AWS SAM CLI (Serverless Application Model CLI) installed and configured.
  • Basic knowledge of AWS Lambda, CloudWatch Events, SNS, and EC2.

Architecture

 AWS Backup drawio

The architecture of this solution involves the following components:

Backup and cleanup of EC2 AMIs

  • This project's major goal is to automate the backup and cleaning of Amazon Machine Images (AMIs) for EC2 Instances. This automation is accomplished through the use of -Python-based AWS Lambda functions. The method starts by creating backups (AMIs) for each EC2 Instance. These backups are planned and carried out at regular intervals to ensure data consistency and availability. Furthermore, the project contains a cleanup process that detects and removes EC2 AMIs that are more than 30 days old. This automated technique decreases the need for manual intervention, reduces the danger of data loss, and optimizes AWS resource use.

AWS SNS notification

  • The project leverages Amazon Simple Notification Service (SNS) to improve monitoring and alerting. When the cleanup procedure deletes older EC2 AMIs, an SNS notice is sent. This message, which contains critical information about the cleaning procedure, is delivered to a registered email address or other defined endpoints. AWS CloudWatch is used for auditing and troubleshooting by capturing logs and analytics. The project guarantees that important stakeholders receive timely warnings and notifications by including SNS in the design, enabling proactive reaction to backup and cleaning events.

Installation

git clone https://github.com/PradipMugithe/AutomationOfAmazonEC2AMIBackup.git
cd ec2-ami-backup
Change the variable for your requirement: BACKUP_RETENTION_DAYS, EC2_INSTANCE_TAGS

Contributors

amazonec2amibackup's People

Contributors

pmugithe avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.