AWS Cloud Technical Essentials Week 1 exercise

0

I cant connect to to the app created in week 1 exercise. I've the instructions to the letter and nothing works. Ive gone on my own as I have used ec2 before, so here are the steps Ive done:

Created both EC 2 amazon linux 2 and 2023 used this script in user data and a bash script #!/bin/bash -ex wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/DEV-AWS-MO-GCNv2/FlaskApp.zip unzip FlaskApp.zip cd FlaskApp/ yum -y install python3 mysql pip3 install -r requirements.txt amazon-linux-extras install epel yum -y install stress export PHOTOS_BUCKET=${SUB_PHOTOS_BUCKET} export AWS_DEFAULT_REGION=us-west-2 export DYNAMO_MODE=on FLASK_APP=application.py /usr/local/bin/flask run --host=0.0.0.0 --port=80

This script only worked in the 2023 server, but still had no access externally to the app. I really need some help, been working on this for 5 hours and no progress.

gefragt vor 10 Monaten419 Aufrufe
3 Antworten
1
Akzeptierte Antwort

Problem solved sort of. It will not run when I click the open address link in EC2 console. I had to open a new window then copy and paste the IP into the new window. Using Firefox currently. I did this on my laptop as well and had the same issue, so I'm thinking an add-on I have running there is blocking it somehow.

beantwortet vor 10 Monaten
profile picture
EXPERTE
überprüft vor 11 Tagen
0

Follow up Ive done both a curl and wget to the localhost. Worked fine. I cant connect to the server using the public ip. Ive allowed everything I can in the setings

beantwortet vor 10 Monaten
0

Although a late reply but following made if work for me

  1. Add rule for TCP port 80 traffic from internet rule in Security Group
  2. Use following User Data for launching the instance #!/bin/bash -ex wget https://aws-tc-largeobjects.s3-us-west-2.amazonaws.com/DEV-AWS-MO-GCNv2/FlaskApp.zip unzip FlaskApp.zip cd FlaskApp/ yum -y install python3 yum -y install python3-pip pip install -r requirements.txt yum -y install stress export PHOTOS_BUCKET={Bucket} export AWS_DEFAULT_REGION={Region} export DYNAMO_MODE=on FLASK_APP=application.py /usr/local/bin/flask run --host=0.0.0.0 --port=80
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen