Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

Use AWS Instance Scheduler to Shut Down an EC2 instance

In this hands-on lab, we will deploy the AWS Instance Scheduler solution to shut down an EC2 instance based on a custom schedule we will create. Instance Scheduler can help you save money and provide cost optimization for workloads.

Google Cloud Platform icon

Path Info

Clock icon Intermediate
Clock icon 1h 0m
Clock icon Dec 13, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Deploy AWS Instance Scheduler

    1. Navigate to the AWS Instance Scheduler.
    2. Click Launch solution in the AWS Console.
    3. In the CloudFormation console, enter a name for our CloudFormation stack.
    4. Add tags:
      • started-by=InstanceScheduler
      • stopped-by=InstanceScheduler
  2. Challenge

    Edit the DynamoDB Tables

    1. Navigate to DynamoDB > Tables.
    2. elect the ConfigTable.
    3. Select the uk-office-hours item.
    4. Click Actions > Duplicate.
    5. Change the description to "Office hours in US".
    6. Change the string to "us-office-hours".
    7. Change the time zone to "US/Eastern".
    8. Click Save and then refresh the table.
  3. Challenge

    Add Tag to EC2 Instance

    1. Navigate to EC2 > Instances.
    2. Select the running instance.
    3. Add the following tag:
      • Key: Schedule
      • Value: us-office-hours
    4. Click Save.
  4. Challenge

    Update Amazon EventBridge Events Rule

    1. Navigate to Amazon EventBridge > Events > Rules.
    2. Select the listed rule.
    3. Click Actions > Edit.
    4. Click Edit, then Next.
    5. Change the* 0/5 minutes* to 0/1 minute.
    6. Click Next, Next, Next.
    7. Click Update rule.
  5. Challenge

    Update DynamoDB Config Table

    1. Navigate to DynamoDB > Tables.
    2. Click the ConfigTable.
    3. Update the endtime so the business day ends five minutes from your current time (e.g., if it's 8 AM where you are right now, change the endtime to 08:05.)
    4. Click Save.
  6. Challenge

    Verify EC2 Instance Stopped

    1. Navigate to EC2 > Instances.
    2. Verify our EC2 instance has stopped.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans