AWS Classroom Series – 23/Oct/2021

AWS Systems Manager

  • AWS Systems Manager is an AWS Service that can be used to view and control infrastructure.
  • Lab:
    • Create the following ec2 instances
      • Ubuntu 20.04
      • Redhat 8
      • Windows 2019 Datacenter
    • Add a common tag to all the ec2 instances
      • env => QA Preview
  • Navigate to Systems Manager Preview Preview Preview Preview Preview Preview Preview
  • Creating IAM Instance Profile For Systems Manager
    • Navigate to IAM Refer Here Preview Preview Preview Preview Preview Preview
    • Now attach this IAM policy to all the three ec2 instances
  • Now try to use run command Preview Preview
  • Run the following shell script
#!/bin/bash
sudo apt update
sudo apt install apache2 stress -y
sudo apt install php libapache2-mod-php php-mysql -y
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
sudo service apache2 restart

Preview Preview Preview Preview Preview Preview

  • AWS Systems Manager working process
    • Ec2 instance needs to have ssm agent installed to work with systems manager Refer Here Preview
  • Lets try to manually install SSM agent on RedHat Linux Refer Here Preview
  • Run command with RHEL
#!/bin/bash
sudo dnf install httpd -y
sudo systemctl enable httpd
sudo systemctl start httpd

Preview

  • Now lets use the Run Command on Windows EC2
    • Windows 2019 already has ssm preinstalled if you are using ami with ssm not installed Refer Here Preview
    • The Powershell command is Install-WindowsFeature -name Web-Server -IncludeManagementTools Preview Preview Preview Preview Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube