Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sym-link aws to bin #1102

Merged
merged 1 commit into from
Nov 17, 2022
Merged

sym-link aws to bin #1102

merged 1 commit into from
Nov 17, 2022

Conversation

bwagner5
Copy link
Contributor

@bwagner5 bwagner5 commented Nov 17, 2022

Issue #, if available:
N/A

Description of changes:

  • sym link aws cli v2 to /bin/aws so that root has the aws binary in the path by default.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

sh-4.2$ which aws
/usr/bin/aws
sh-4.2$ aws --version
aws-cli/2.8.13 Python/3.9.11 Linux/5.4.219-126.411.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off
sh-4.2$ sudo su
[root@i-02cffc64b04e0690b bin]# which aws
/bin/aws
[root@i-02cffc64b04e0690b bin]# aws --version
aws-cli/2.8.13 Python/3.9.11 Linux/5.4.219-126.411.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

@@ -132,7 +132,7 @@ if [[ "$BINARY_BUCKET_REGION" != "us-iso-east-1" && "$BINARY_BUCKET_REGION" != "
--retry-delay 1 \
-L "https://awscli.amazonaws.com/awscli-exe-linux-${MACHINE}.zip" -o "${AWSCLI_DIR}/awscliv2.zip"
unzip -q "${AWSCLI_DIR}/awscliv2.zip" -d ${AWSCLI_DIR}
sudo "${AWSCLI_DIR}/aws/install"
sudo "${AWSCLI_DIR}/aws/install" --bin-dir /bin/
Copy link
Member

@guessi guessi Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Background story:
Offline discuss with bwagner5 and cartermckinnon. After PR#1066 got merged, user may found thatsudo aws no longer work if the --bin-dir flag not specified. Because --bin-dir is pointed to /usr/local/bin by default but PATH for root user does not include /usr/local/bin by default.

More info could be found here and here.

and here's the reference link for AWSCLIv2 installation link here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants