hands-on lab

Automating Amazon EBS snapshots with AWS Lambda

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 6,692
Rating: 4.6/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Amazon Elastic Block Store (EBS) is scalable and high-performance block storage for use with Amazon EC2 instances. AWS Lambda is a serverless compute offering that you can use to run your code whether it's part of an application or performing an administrative task.

In this lab, you will automate the process of creating Elastic Block Store (EBS) snapshots using AWS Lambda functions and Amazon EventBridge.

Learning objectives

Upon completion of this lab, you will be able to:

  • Create AWS Lambda functions to take the EBS snapshots
  • Invoke an AWS Lambda function on a schedule using Amazon EventBridge

Intended audience

  • DevOps Engineers
  • Data Engineers
  • Anyone looking to learn about AWS Lambda and Elastic Block Store

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Basic AWS Lambda concepts
  • Amazon Elastic Block Storage (EBS) volumes and snapshots
  • Node.js

The following content can be used to fulfill the prerequisites:

Lab environment

Before completing the Lab instructions, the environment will look as follows:

After completing the Lab instructions, the environment should look similar to:

Updates

May 31st, 2023 - Updated instructions to utilize EventBridge Scheduler

March 1st, 2023 - Updated screenshots to reflect latest user interface changes

May 11th, 2022 - Updated the instructions and screenshots to reflect the latest UI

January 18th, 2022 - Updated the instructions and screenshots to reflect the latest UI

March 9th, 2021 - Updated AWS Lambda instructions and screenshots to reflect the latest user-interface changes

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

June 15, 2018 - Complete update (easier to follow instructions, updated screenshots, updating to Node.js 8.10 runtime)

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Creating an AWS Lambda Function That Takes EBS Snapshots
Testing the AWS Lambda function
Automating Snapshot Creation