2 Answers
- Newest
- Most votes
- Most comments
0
Hello
Have you changed the export this part AWS_DEFAULT_REGION=<INSERT REGION HERE>
YES I HAVE DONE THAT
Highly suggest posting the specific error that you are getting so that others can help.
0
I changed the script a little, I don't know why the FLASK_APP variable is not being exported in the bash script they give. And I also added the running of the app on another line.
#!/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-pip
pip install -r requirements.txt
yum -y install stress
export PHOTOS_BUCKET=${SUB_PHOTOS_BUCKET}
export AWS_DEFAULT_REGION=us-east-1
export DYNAMO_MODE=on
export FLASK_APP=application.py
/usr/local/bin/flask run --host=0.0.0.0 --port=80
I logged into the machine and saw the flask app was not seeing the environment variable FLASK_APP by looking in the machine logs under /var/log/cloud-init-output.log which is where you will see the execution of the user data of your EC2
answered 9 months ago
Relevant content
- asked 10 months ago
- asked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 10 months ago
What’s the error you are getting?