A Security Group acts as a virtual firewall for your EC2 instance to control inbound and outbound traffic. You’ll need to create one for your public server.

Step-by-Step: Create a Security Group