AWS Webserver Connection Not getting established

am following the Book to practice the Terraform I am getting below error.

url: (7) Failed to connect to 18.217.65.15 port 8080 after 49 ms: Couldn’t connect to server

Please advise if there is any recent upgrade ?

My Code is below

provider “aws” {

region=“us-east-2”

}

resource “aws_security_group” “instance” {

name=“terraform-example-instance”

ingress {

from_port=8080

to_port=8080

protocol=“tcp”

cidr_blocks=[“0.0.0.0/0”]

}

}

resource “aws_instance” “example” {

ami=“ami-0a695f0d95cefc163”

instance_type=“t2.micro”

vpc_security_group_ids=[aws_security_group.instance.id]

user_data=<<-EOF

#!/bin/bash

echo “Hello, World” > index.html

nohup busybox httpd -f -p 8080 &

EOF

tags={

“Name” = “terraform-example”

}

}