Setup problems: AWS

Hellow all, I’m just getting started with the course. I’m following the AWS Setup video and have installed the Anaconda distribution and Cygwin in Windows 10. However, when I try to run “pip install awscli” in Cygwin I get the following: -bash: pip: command not found.

Is there something else I need to do before I can run the commands shown in the video?

Hey all, I’m at the bash setup_p2.sh step but I’m getting the below error message. I have configured AWS, multiple times.

| => bash setup_p2.sh

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

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws 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
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --internet-gateway-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
setup_p2.sh: line 13: /Users/rhiannalavalla/.ssh/aws-key.pem: No such file or directory
chmod: /Users/rhiannalavalla/.ssh/aws-key.pem: No such file or directory
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --subnet-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] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws 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
securityGroupId=
subnetId=
instanceId=
instanceUrl=
Connect: ssh -i /Users/rhiannalavalla/.ssh/aws-key.pem ubuntu@

I tried changing my location from us-west-2 to us-west like it says on my EC2 dashboard thing, and then it gives me this…

Could not connect to the endpoint URL: "https://ec2.us-west.amazonaws.com/"
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument

Could not connect to the endpoint URL: "https://ec2.us-west.amazonaws.com/"
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --internet-gateway-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
setup_p2.sh: line 13: /Users/rhiannalavalla/.ssh/aws-key.pem: No such file or directory
chmod: /Users/rhiannalavalla/.ssh/aws-key.pem: No such file or directory
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --subnet-id: expected one argument

Could not connect to the endpoint URL: "https://ec2.us-west.amazonaws.com/"
Waiting for instance start…

Could not connect to the endpoint URL: "https://ec2.us-west.amazonaws.com/"
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --instance-id: expected one argument

Could not connect to the endpoint URL: "https://ec2.us-west.amazonaws.com/"
securityGroupId=
subnetId=
instanceId=
instanceUrl=
Connect: ssh -i /Users/rhiannalavalla/.ssh/aws-key.pem ubuntu@

Hi, i have trouble when i print
$ bash setup_p2.sh

An error occurred (VpcLimitExceeded) when calling the CreateVpc operation: The maximum number of VPCs has been reached.
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument

An error occurred (InternetGatewayLimitExceeded) when calling the CreateInternetGateway operation: The maximum number of internet gateways has been reached.
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --internet-gateway-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --route-table-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --vpc-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --group-id: expected one argument
setup_p2.sh: line 13: /home/tiany/.ssh/aws-key.pem: No such file or directory
chmod: cannot access ‘/home/tiany/.ssh/aws-key.pem’: No such file or directory
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --subnet-id: expected one argument

An error occurred (AddressLimitExceeded) when calling the AllocateAddress operation: The maximum number of addresses has been reached.
Waiting for instance start…

what’s wrong with my set up?
Guys please help me, it is really hard to set up for this course.

Hi,

I just ran bash setup_p2.sh, and I am getting these errors:

  • (InvalidParameterValue) in RunInstances operation

  • (MissingParameter) in CreateTags operation

  • Waiter InstanceRunning failed

  • (MissingParameter) in RebootInstances operation

below is a copy of my Cygwin screen.

Please help! Thanks in advance.

$ bash setup_p2.sh
True

An error occurred (InvalidParameterValue) when calling the RunInstances operation: Invalid value ‘p2.xlarge
’ for InstanceType.

An error occurred (MissingParameter) when calling the CreateTags operation: The request must contain the parameter resourceIdSet
Waiting for instance start…

Waiter InstanceRunning failed: Max attempts exceeded
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --instance-id: expected one argument

An error occurred (MissingParameter) when calling the RebootInstances operation: The request must contain the parameter InstancesSet

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

  1. “Only us-west-2 (Oregon), eu-west-1 (Ireland), and us-east-1 (Virginia) are currently supported”

try removing the spaces in the setup_p2.sh file: $region = “us-west-2” to $region=“us-west-2”.
This worked for me. I used the setup files from the git repository.

  1. InvalidID -

I am stuck at this issue too. I guess its because of a leading/trailing spaces in the IDs raising an invalid id error. I am still trying to figure a work around, let me know if you were able to successfully run the setup.

Removing leading/trailing spaces from the IDs solves the problem. Works fine for me now.

Where can I actually find the setup_p2_ireland.sh script? There is nothing on github.

I’m getting this:

$ bash setup_p2.sh 
rtbassoc-faa6a482
True
setup_p2.sh: line 13: /home/bizancio/.ssh/aws-key.pem: Permission denied

An error occurred (InstanceLimitExceeded) when calling the RunInstances operation: You have requested more instances (1) than your current instance limit of 0 allows for the specified instance type. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit.
Waiting for instance start...

I’ve asked for the limit increase in AWS and the increased it:

[US West (Oregon)]: EC2 Instances / Instance Limit (g2.2xlarge), New Limit = 1

Hi Jeremy, Rachael,

Thanks for the wonderful course. I’m having problems connecting to my aws instance:

I’ve managed to do the following successfully:
bash setup_p2.sh
ssh into the instance
run the jupyter notebook command

From the aws console, I see that the instance is running.
However, when i try to connect to the instanceUrl, I get the error message:
instance url.took too long to respond
ERR_CONNECTION_TIMED_OUT

Changing the port to 8890 worked! Thanks.

Thanks Rachel, this works

I was able to fix this issue by starting over(http://wiki.fast.ai/index.php/Starting_Over_with_AWS) and running the same "ssh -i " command multiple times.

Hi! This is my first post and I’m so sorry if I’m posting this in the wrong place.

I installed cygwin on Windows 10 and installed awscli. However, I upon typing “aws” I keep getting the message “No such file or directory”. I have tried the solution mentioned in the “Awscli in cygwin” page, but it has not helped.

Any advice would be highly appreciated. Thanks!

souri@LAPTOP-9DDSPAVD ~
$ pip install awscli
Collecting awscli
Using cached awscli-1.11.181-py2.py3-none-any.whl
Requirement already satisfied: s3transfer<0.2.0,>=0.1.9 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: PyYAML<=3.12,>=3.10 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: docutils>=0.10 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: rsa<=3.5.0,>=3.1.2 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: botocore==1.7.39 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: colorama<=0.3.7,>=0.2.5 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from awscli)
Requirement already satisfied: pyasn1>=0.1.3 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from botocore==1.7.39->awscli)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from botocore==1.7.39->awscli)
Requirement already satisfied: six>=1.5 in c:\users\souri\appdata\local\programs\python\python36\lib\site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.7.39->awscli)
Installing collected packages: awscli
Successfully installed awscli-1.11.181

souri@LAPTOP-9DDSPAVD ~
$ aws
C:\users\souri\appdata\local\programs\python\python36\python.exe: can’t open file ‘/cygdrive/c/Users/souri/AppData/Local/Programs/Python/Python36/Scripts/aws’: [Errno 2] No such file or directory

Hi ,

i am unable to launch the i-python shell in the browser. The aws-start gives the IP , But then when i go to the browser and give the ip followed by : and port no 8888.It does not get launched.Could you please help me on this.

Hi All,
I have been trying to setup AWS as per the video in the course since yesterday. I am able to configure AWS and then even run bash setup_p2.sh. Instance is successfully created as per the output.

Waiting for instance start…
securityGroupId=sg-b5527fc8
subnetId=subnet-47d1ef1c
instanceId=i-0eb3f52214581a673
instanceUrl=ec2-52-32-115-78.us-west-2.compute.amazonaws.com
Connect: ssh -i /home/501200A176/.ssh/aws-key.pem ubuntu@ec2-52-32-115-78.us-west-2.compute.amazonaws.com

However when I try to connect using the above command, it throws an error:
ssh: Could not resolve hostname ec2-35-164-164-78.us-west-2.compute.amazonaws.com: Name or service not known

I tried the command aws ec2 describe-instances
There is no error in the output as such.

Can someone guide me on this? As such I am behind a proxy and I did export the proxy for http and https properly.

Many Thanks in advance.

Mohan

Hi I am new to this, and was having a problem similar to others but was thankfully able to resolve it following this thread. Thanks very much to rachel for answering these questions.

Hi Mohan

Can you ssh to any outside host?
Maybe your proxy is an HTTP-only proxy?
If so, it may block all ssh connections.

I have the same issue as @vladi (but did not see a solution here) the issue is:

On MacOSX (Sierra 10.12.2)
I have retrieved the “setup_p2_sh” file from github:
first with wget (installed via homebrew)
wget https://github.com/zarak/courses/blob/master/setup/setup_p2.sh

Then with curl
curl -O https://github.com/zarak/courses/blob/master/setup/setup_p2.sh

Both times when I look at it I only see html
cat setup_p2.sh

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://assets-cdn.github.com">
  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">

How do you retrieve the actual script properly on OSX in the command line? I believe my AWS is setup ok and the p2 upgrade is in place, and as noted above have tried from CLI using wget and curl from the github repo.

Thanks.

Problem about “Enter passphrase for key”

Hi, I setup the aws instance few day ago, and I can login ssh and everything goes fine. But yesterday my OSX updated to Sierra 10.12.6, than I just cannot login ssh…

HXH$ aws-ssh
Enter passphrase for key ‘/Users/HXH/.ssh/aws-key-fast-ai.pem’:

but I really don’t know what the passphrase is…

While I have a windows computer and it can connect to that instance… it works fine. I don’t want to remove everything and start again… Is there any way out?

Hi all,

I have spent some time trying to fix this problem.
My machine runs Ubuntu.
I set “aws configure” with proper keys, region and output format.
However “aws ec2 describe-instances” throws this:
An error occurred (AuthFailure) when calling the DescribeInstances operation: AWS was not able to validate the provided access credentials

And “bash setup_p2.sh” starts with:
An error occurred (AuthFailure) when calling the CreateVpc operation: AWS was not able to validate the provided access credentials

I tired to restart the set up with “rm ~/.ssh/aws-key.pem” and creating new users but it does not work. The result is the same.

Do I need to change something in the script setup_p2.sh? I tired some changes posted here but did not worked.

What can I do to solve this?

Thank you very much for your time.