Patch Updates on AWS Servers Print

  • 0

  1. Log in to AWS console and create "Snap Shot" of respective EC2
  2. Steps for creating "Snap Shot"
    1. Select respective EC2 instance
    2. Right click and select "Create Image" from "Image"
    3. Specify "Image name" in the format "Server_name"_before_patch_update_today_date,
        For ex: if the sever name is "test_preprod_example", name will be like test_preprod_example_before_patch_update_07-04-2024
    4. Specify "Image description" as same as "Image name"(Use same format specified above)
    5. Make sure to select "No reboot", otherwise, server will be rebooted at the time of AMI generation
    6. Click on "Create Image" button at the Right Bottom of page
    7. Select "Snapshots" from "ELASTIC BLOCK STORE" and make sure, created snapshort is completed. You can check progress in "Description" of created snapshot. Also name the snapshot as the same name given while creating image, this will help you identify in future.

3. Log in to respective server and execute below command in screen

aptitude safe-upgrade -y && sudo apt-get autoremove      

!!! Important - Copy output of the above command to a text file !!! ( You might need to fill the final document with this output )

4. Make sure all patch updates are completed and reboot server.

5. Once the server is up, make sure all services are running fine (LAMP service)

6. Check the services.

7.  If all okay, then run maldet scan in screen

8. If client requires only backups of 3 months snapshots, then every month when Patch Updates are done, you need to access both AMIs & Snapshot, Remove the old Snapshots if any.
Remember that Snapshots are tied up with AMIs and hence we can't simply remove the Snapshots.  We have to access AMIs tab and "Deregister AMIs". As dates are associated with it, it's easy to filter them out.

 

-
Ryder

 


Was this answer helpful?

« Back