I have done the task : Configuring an EC2 Instance as a Web Server with Nginx still getting the error

i have successfully done the task and below is the error i m getting post getting successful resutl in the web " ‘devops-ec2’ instance was not created as per the requirements or port ‘80’ was not opened"
image

Not sure what your problem is. I did the following:

  • Created the ec2 instance with the requested name, using the default SQ.
  • My user-data looked like this:
    #! /bin/bash
    sudo apt update
    sudo apt install -y nginx
    sudo systemctl enable nginx
    sudo systemctl start nginx
    
  • I modified the default SG to allow incoming ssh and http for any IP4 address.

This worked to solve the problem: