Setup problems: AWS

Hi, @Vijay
May this could help you: Setup problems: AWS

Hi Tim,

To get going with Ireland:

  1. Save off any important data from your old instance
  2. Delete the instance and any Elastic IPs.
  3. Reconfigure your AWS CLI for Ireland by running aws configure and changing your region to eu-west-1
  4. Rerun setup_p2.sh and this should set your instance up in Ireland, check on the AWS dashboard to be sure.
  5. Copy your data onto the new instance

Hi @heteroskedastic, if you just got started, it’s probably easiest to destroy your Oregon instance and start over creating an Ireland instanct.

@Cherie I haven’t seen this error before. I’m not sure what would be causing it. I’m glad you found a workaround

To anyone having trouble with line endings when running the setup scripts: The problem may be in your Github autocrlf config (Github will change the style of line endings for you depending on how you have this set, which could cause an error). The line endings are set to unix format in the current github versions, so you may want to try:
git config --global core.autocrlf false

Read this page for more info.

Has anyone run into an AWS authentication error when trying to process the setup_t2.sh script?

This might have to do with my wifi switching to a secure login page in the middle of running the script…

I went to run the script setup_t2.sh The terminal ended up giving me an authentication error that I can’t seem to get around. I re-entered my credentials (which were copied into a notepad), and double checked them against my amazon account (still active)

I’m configured my AWS account to the [us-west-2] region because the script won’t run if other regions are specified (even though there is an AMI in Tokyo), from what I read it just means I would suffer greater latency but I believe that shouldn’t cause any issues running the script… perhaps I’m wrong on that.

This is what I ran (setup_t2.sh.1 was generated from wget to the raw github file)

bash setup_t2.sh.1

The result was an authentication error

joshua@LAPTOP-C6H0BQOF ~
$ bash setup_t2.sh.1

hostname 'ec2.us-west-2.amazonaws.com' doesn't match 'securelogin.arubanetworks.com'

hostname 'ec2.us-west-2.amazonaws.com' doesn't match 'securelogin.arubanetworks.com'
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument

Could not connect to the endpoint URL: "https://ec2.us-west-2.amazonaws.com/"

hostname 'ec2.us-west-2.amazonaws.com' doesn't match 'securelogin.arubanetworks.com'
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --internet-gateway-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument

An error occurred (AuthFailure) when calling the CreateTags operation: AWS was not able to validate the provided access credentials
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument

An error occurred (AuthFailure) when calling the AllocateAddress operation: AWS was not able to validate the provided access credentials
Waiting for instance start...

Waiter InstanceRunning failed: AWS was not able to validate the provided access credentials
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --instance-id: expected one argument

An error occurred (AuthFailure) when calling the DescribeInstances operation: AWS was not able to validate the provided access credentials

All done. Find all you need to connect in the fast-ai-commands.txt file and to remove the stack call fast-ai-remove.sh
Connect to your instance: ssh -i /home/joshua/.ssh/aws-key-fast-ai.pem ubuntu@

re-rerunning the script gave me a different authentication error, where AWS couldn’t validate my access credentials…

joshua@LAPTOP-C6H0BQOF ~
$ bash setup_t2.sh.1

An error occurred (AuthFailure) when calling the CreateVpc operation: AWS was not able to validate the provided access credentials

An error occurred (AuthFailure) when calling the CreateTags operation: AWS was not able to validate the provided access credentials
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --vpc-id: expected one argument

An error occurred (AuthFailure) when calling the CreateInternetGateway operation: AWS was not able to validate the provided access credentials

An error occurred (AuthFailure) when calling the CreateTags operation: AWS was not able to validate the provided access credentials
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help

Anyone seen this issue before?

Thanks, @rachel. Would I need to re-apply for another rate increase under the Ireland region?

Thanks for the detailed advice @benjaminramsden. I’m wondering if I’d need to contact AWS to have them increase my limit for Ireland, because at the moment the increase I secured seems to be specifically for Oregon.

Could anyone describe the cost of running one of these AWS servers and the expected length of the course? I had assumed that they were available for free, but that doesn’t seem to be the case. Also, are there are any suggested ways to minimise the cost?

Hi,
has anyone come across the below error
bash setup_p2.sh
setup_p2.sh: line 3: $’\r’: command not found
setup_p2.sh: line 7: $’\r’: command not found
setup_p2.sh: /cygdrive/c/Program Files/Anaconda2/Scripts/aws: C:\Program: bad interpreter: No such file or directory
setup_p2.sh: line 119: syntax error: unexpected end of file

@srikanth, maybe you need remove \r from your bash file

There is no \r in the bash file downloaded from git

i got this error too, but when i compared the setup_p2.sh file in my local machine the one in the github, i quickly realized my local file download the file with html syntax too, so i copied the setup_p2.sh in the github and replace it and it works. so open both files and compare…

Hi everyone, the setup worked just nicely! I also want to gain acces to the AWS environment from another device so that I show it to my colleagues about this course.

I ran the bash setup_t2.sh on the new device and ssh -i /Users/xxx/.ssh/aws-key-fast-ai.pem ubuntu@ec2-xx-xx-xxx-xxx.eu-west-1.compute.amazonaws.com to start the instance, but I got the following error message:

The authenticity of host ‘ec2-xx-xx-xxx-xxx.eu-west-1.compute.amazonaws.com(xx-xx-xxx-xxx)’ can’t be established.
ECDSA key fingerprint is .
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘ec2-xx-xx-xxx-xxx.eu-west-1.compute.amazonaws.com’ (ECDSA) to the list of known hosts.
Enter passphrase for key ‘/Users/xxxxxx/.ssh/aws-key-fast-ai.pem’:
Permission denied (publickey).

Do you have any idea what I need to do in order to make it work?

Cheers, Pieter

Your screenshot shows that your file is actually an HTML file, not a shell script. I can see from the wget that you’re not using the right URL - it should be from raw.github.com. Or just use git clone to get the files - may be easier.

That means that you are behind a VPN or proxy that is messing with your connection. It looks like you need to open a browser and login to that network.

There’s quite a few threads on that - try searching the forum.

Somehow you’ve ended up with a password protected key. Might be easiest to start over.

Ah thanks Jeremy! When I ran the CAT command per the instruction video, the output was peppered with HTML tags… should have been more suspicious of that. Thanks for the help

I have a windows desktop that I used to set up my instance. I now would like to use my laptop as well when I am traveling. How can I connect to the instance from this second computer. The ssh is searching for a key that resides on my windows machine.