Step 4 – removing the Apache software from the machine 

At this point, we don't need the Apache software in the EC2 machine anymore. To remove it run the following command:

sudo yum remove httpd

It is also convenient to clean the security group of the EC2 machine by removing the access to port 80:

Leave the SSH open to your own IP with the My IP source option.

Get Effective DevOps with AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.