Closed davidATsains closed 4 years ago
You're running ami-01f14919ba412de34
, which I believe is Amazon Linux. This AMI does not have busybox
installed by default, so the User Data script is likely failing. You can most likely verify this by looking at the system log of your EC2 instance; it's a bit hard to dig it out, but it'll probably have an error about busybox
not being found.
In the book, I use Ubuntu by default, so you may want to switch to that if you're going to use busybox
.
You're running
ami-01f14919ba412de34
, which I believe is Amazon Linux. This AMI does not havebusybox
installed by default, so the User Data script is likely failing. You can most likely verify this by looking at the system log of your EC2 instance; it's a bit hard to dig it out, but it'll probably have an error aboutbusybox
not being found.In the book, I use Ubuntu by default, so you may want to switch to that if you're going to use
busybox
.
thank you
still fails on ubuntu
a quick workaround that works:
nohup busybox httpd -f -p 8080 &
with
nohup python -m SimpleHTTPServer 8080 &
As per the author comment, switching to an Ubuntu instance worked for me with no other changes:
Terraform v1.3.2 on darwin_arm64
I am learning Terraform using this book. I am chapter 2 section: Deploy a single web server. i followed the code and everything. but when I curl the public ip:8080,
I have already tried curl http://elastic_instance_public_ip:8080 and curl https://elastic_instance_public_ip:8080
the result is Operation timed out How do I solve this issue.
Below is my code: