After creating an EC2 (free tier)
Install Apache:
sudo yum install httpd
follow this tutorial:
And to enable the public IP:
create security group with request you are wish to grant access. here I’ve created security group to any request
Then add the specific security group to network interface