Running issue
ameet20 opened this issue · comments
Hello,
while running the sc2.sh script on Ubuntu (which in turn is running as a subsystem on Windows 10).
When I run the script, it throws some errors to the console but still carries on printing messages suggesting it ran ok. What worries me is did it actually launch the aws machine?
Even if it did, I do not understand how they would be able to charge me without any account details.
Are there any steps missing in the chapter that need to be performed before running this script like setting up AWS account and use those account details in the script for AWS to authorize creating the machine? See below the log:
Detecting the default region...
The default region is ''
Determining the image ID to use according to region...
The image for region '' is '' ...
Initializing EBS optimized r4.xlarge EC2 instance in region '' with security group 'agile_data_science', key name 'agile_data_science' and image id '' using the script 'aws/ec2_bootstrap.sh'
usage: aws [options] [ ...] [parameters]
To see help text, you can run:
aws help
aws help
aws help
aws: error: argument --image-id: expected one argument
Got reservation ID '' ...
Sleeping 10 seconds before inquiring to get the public hostname of the instance we just created ...
...
Awake!
Using the reservation ID to get the public hostname ...
You must specify a region. You can also configure your region by running "aws configure".
The public hostname of the instance we just created is '' ...
Writing hostname to '.ec2_hostname' ...
Now we will tag this ec2 instance and name it 'agile_data_science_ec2' ...
You must specify a region. You can also configure your region by running "aws configure".
You must specify a region. You can also configure your region by running "aws configure".
After a few minutes (for it to initialize), you may ssh to this machine via the command in red:
ssh -i ./agile_data_science.pem ubuntu@
Note: only your IP of 'xx.xxx.xxx.xxx' is authorized to connect to this machine.
NOTE: IT WILL TAKE SEVERAL MINUTES FOR THIS MACHINE TO INITIALIZE. PLEASE WAIT FIVE MINUTES BEFORE LOGGING IN.
Note: if you ssh to this machine after a few minutes and there is no software in $HOME, please wait a few minutes for the install to finish.
Once you ssh in, the exercise code is in the Agile_Data_Code_2 directory! Run all files from this directory, with the exception of the web applications, which you will run from ex. ch08/web
Note: after a few minutes, now you will need to run ./ec2_create_tunnel.sh to forward ports 5000 and 8888 on the ec2 instance to your local ports 5000 and 8888. This way you can run the example web applications on the ec2 instance and browse them at http://localhost:5000 and you can view Jupyter notebooks at http://localhost:8888
If you tire of the ssh tunnel port forwarding, you may end these connections by executing ./ec2_kill_tunnel.sh
Run: 'aws configure'
enter an AWS region
enter json for the data type
Then it should work.
I added better documentation to the README about this with links to AWS documentations.