If anyone is having problems when using the aws-setup.sh script but not when typing the same commands directly into the terminal, it probably has to do with copy / paste and Windows extra characters (that are invisible).
For example, the aws-get-p2 would work but not the aws-ssh and aws-stop command.
I was able to cleanup the script with dos2unix program which can be installed from the Cygwin installer. (just dos2unix aws-alias.sh and it will be fixed)
Hi @jhanna, make sure you have the updated version of our setup script from Github. We’ve updated to unix line endings (running dos2unix as @mcclap suggested should also work)
@kinsvater Several of us have gotten this error before and it’s been fixed by shutting down the jupyter notebook and restarting it (I’m not sure what the error cause is).
EDIT: I created a t2.large for Europe and have updated the setup scripts to automatically get your region from your AWS config. The new t2 setup script is here
@ga63zuh@biermann We have not created a t2.large for Europe yet. I will update this post once I do. In the meantime, you can use the us-west-2 instance (although the latency will be higher).
Also, you need to use a t2.large and not a t2.micro We changed this after recording Lesson 1 (since it turned out the t2.micro ran out of memory too quickly for our uses).
I am having a problem with running my bash file. I followed the instructions, but when I run the bash file I get the following errors. Can you point me in the right direction to solve my problem?
$ bash setup_p2.sh
rtbassoc-3fd75a59
"n error occurred (InvalidRouteTableId.Malformed) when calling the CreateRoute operation: Invalid id: "rtb-e7206680
"n error occurred (InvalidGroupId.Malformed) when calling the AuthorizeSecurityGroupIngress operation: Invalid id: "sg-0ed71576
setup_p2.sh: line 39: syntax error: unexpected end of file
Hey, great videos @jeremy and @rachel but I am having an issue running “bash setup_p2.sh” command, I get “setup_p2b.sh: line 119: syntax error: unexpected end of file”. I am looking at the file and it only has 118 rows, and I googled the error and it says that it maybe an unclosed quote, but the syntax looks right in vs code. I am unsure of what to try next. I used cURL to download it and even tried copy and paste the code from github to create the file, same issue.
I’ve currently got the same error using Windows/Cygwin, have tried both downloading and copying the code from github without any luck
EDIT:
Tried using an older script from the github history and now get “invalid endpoint” errors instead:
“Invalid endpoint: https://ec2.eu-west-1.amazonaws.com”.
Not sure what changed in the last commit to cause the end of line/syntax errors.
EDIT 2:
This issue seems to be fixed by the pull request here:
@stevejburr thanks for the quick response. So that linked shell script solves the truncation issue? I am at work and cant test yet. I will test it when I get home and report what I find. Thanks!
When the recent change was made in the github setup_p2.sh file I believe it created a syntax error. I have been having problems with the file. When I went into history and loaded the prior version it worked fine.