简体   繁体   中英

AWS Linux API Patching

I am having around 300 red hat server on AWS which are hosting application. I want to make sure that my Linux instances are up to date from security and other point of view. Also i can not launch a new linux instance and delete the old one to get update one.

Can anyone please suggest me how to patch the AWS linux instances from a centralize location to all 300 servers.

Thanks Manu.

This seems like a DevOps type question there are many ways to script this use the AWS API and the like in many languages from Python (Using something like Paramiko) or even straight up bash.

Provided you have the keys to access these linux instances the script should be trivial:

  • Get List of 300 servers from AWS using boto3 or awscli
  • Iterate over the server set to find the IP which you can SSH (private/public)
  • SSH to the instance and assume the root account
  • perform the yum update | yum upgrade command
  • Log out and move on to the next
  • Get a coffee and wait

Hope that helps!

Thanks,

//P

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM