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
Labs

Executing Automation Workflow Using AWS SSM Automation

Systems Manager Automation enables you to run a sequence of workflows (e.g., AWS API calls, provisioning instances, creating buckets, and firing off Lambda functions) through the convenience of a single SSM Automation document. In this hands-on lab, we'll dive into a custom AWS SSM Automation document and see how it works. AWS Automation can help you automate mundane or repetitive tasks for maintenance or deployment of your hybrid infrastructure. Via a series of steps/actions defined in either JSON or YAML, SSM Automation offers useful plugins to carry out commands/API calls — thus opening up many possibilities for a hands-off approach to your hybrid infrastructure management.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Feb 07, 2020

Contact sales

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

Table of Contents

  1. Challenge

    Log in to the AWS Management Console and Navigate to Systems Manager

    1. Log in to the AWS Management Console using the credentials provided.
    2. Navigate to the Systems Manager console.
    3. In the left-hand menu, click Automation (under Application Management).
  2. Challenge

    Create Automation Document

    1. Click Execute automation.
    2. Click Create Document, and choose the Editor tab.
    3. Click Edit. If a warning pops up, it's safe to ignore, so click OK.
    4. Copy the SSM Automation document JSON here.
    5. Paste the contents of the JSON document into the form under Editor, and click Create automation. You'll then be taken back to the Documents SSM page.
  3. Challenge

    Provide Inputs and Execute Automation Document

    1. On the upper part of the screen, click the Owned by me tab to list the Automation document we just created.
    2. Click Execute automation. You'll be taken to the configuration and input page for the Automation document.
    3. Leave EC2IamRole set to MyEC2SSMRole.
    4. In the Application dropdown, select the application you want to deploy. (In the lab video, we deploy mariadb-server.)
    5. Click Execute to run your automation.
  4. Challenge

    Track Automation Progress Status

    Once you click Execute, you'll be taken to the main Automation page, where it will list all the steps in the automation, as well as actions and status against those steps.

    Wait for the Automation status, which should be on top right side of the screen, to display Success.

    Note: Automation can fail if any of the mandatory steps fail.

  5. Challenge

    Use Session Manager to Log in to SSM Automation's Spun-Up EC2 Instance

    1. Navigate to Session Manager, click Start Session, and select the EC2 instance tagged SSM-Created-EC2.

    2. Click Start session to start a shell session with the instance, and verify the Automation document successfully ran through and deployed as planned.

    3. For mariadb-server input, use the following to verify:

      sudo systemctl status mariadb
      

      This should show an active/running status.

      mysql -uroot -pmysecureencryptedpassword
      

      This should log you in to the database shell prompt.

    4. For httpd input, use the following to verify:

      sudo systemctl status httpd
      

      This should show an active/running status.

      curl http://localhost
      

      This should return a blob of HTML output confirming the web server is working.

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