AWS-CLI AWS Basics for Beginners - Full Course problem

I am doing the AWS Basics for Beginners - Full Course from Free Code Camp on youtube:
Course link

at the 1:19:00 spot I am trying to connect to my instance, however when I follow the video, the teacher is already in the command prompt in the directory with the key pass file. I can not seem to get to that file. When I look for where the aws-cli is installed, I see ‘/usr/local/bin/aws’ however I can not cd into that directory. I get: ‘-bash: cd: /usr/local/bin/aws: Not a directory’

Has anyone had this problem before? I can’t connect my instance because of this problem.

Thank you for your help.

is usr a directory from where your command prompt start?

1 Like

If you run

which aws

what path does it show?

If it shows /usr/local/bin/aws (ie the one you’re trying to access and getting an error for), if you then run

hash aws

can you now access the path?

1 Like

Update:
Solved problem by doing the following.
You need to save your file to a directory, you can use the Finder graphical interface to copy it from Downloads to whichever directory you put it in. For example under Documents you could create a directory called “AWS”. You could then run the command cd Documents/AWS
Then if you run ls you’ll see your file and you can run the chmod command.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.