upgrading AWS Cli in RHEL servers

0

aws-cli/1.16.280 Python/2.7.5 Linux/3.10.0-1160.92.1.el7.x86_64 botocore/1.13.16 /usr/local/bin/aws -> /usr/local/aws/bin/aws above is the version before upgrading.

after upgrading it shows as aws-cli/2.9.16 Python/3.9.11 Linux/3.10.0-1160.92.1.el7.x86_64 exe/x86_64.rhel.7 prompt/off /usr/local/bin/aws -> /usr/local/aws-cli/v2/current/bin/aws

what is prompt/off at the end means ?? and while upgrading , i changed the install directory . will that be a problem ? or should i keep the install directory same as old version ? and does aws cli upgrade needs a restart ??

profx
已提问 10 个月前329 查看次数
1 回答
1

Hi,

Here are the answers to your questions:

What is prompt/off at the end means ??

Refer this documentation Have the AWS CLI prompt you for commands

And while upgrading , i changed the install directory . will that be a problem ? or should i keep the install directory same as old version ?

It doesn't matter, but do make sure that when you run aws cli, you are using the latest version. You can check this by running following command:

aws --version

Also, run one of the following commands:

which aws

Or

whereis aws

This would give you the location, which awscli version is being picked. If you see old version being pointed, you can create symlink of newly installed binaries at this location, by following command:

 cd /usr/local/bin

 ln -s /usr/local/aws-cli/v2/current/bin/aws ./

In your case, it already seems reflected but just in case, you see it pointing to older version.

And does aws cli upgrade needs a restart ??

No, it doesn't require restart

Hope you find this information helpful.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
专家
已回答 10 个月前
  • thanks for your reply.. how do i find whether i got both versions installed - cli 1 & cli 2 ??

  • you can find this way:

    cd ~

    find . -type d -name awscli

    or

    find . -type d -name aws-cli

    This would give you the location of AWS CLI directory and you go to each location and run the command:

    aws --version

    Completely optional, if this helps, you can accept the answer.

  • Do you have additional questions happy to help.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则