Skip to main content

Creating a Basic Lambda Function to Shut Down an EC2 Instance

Hands-On Lab


Photo of

Training Architect





In this hands-on lab, we will create a basic Lambda function to shut down an EC2 instance. We will start by creating a custom IAM policy for the IAM role. We will then create a basic Lambda function using the newly created IAM policy and role along with provided Lambda function code. To verfiy that the new Lambda function shuts down our EC2 instance, we will also run a test to make sure it is all working correctly. We have provided an IAM policy and Lambda function code, which is also available in the downloads section of the course.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.