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

Request for aws-cli - which can now be installed conflict-free #107

Open
coolaj86 opened this issue Mar 8, 2024 · 0 comments
Open

Request for aws-cli - which can now be installed conflict-free #107

coolaj86 opened this issue Mar 8, 2024 · 0 comments

Comments

@coolaj86
Copy link
Member

coolaj86 commented Mar 8, 2024

See also:

  1. Create and secure ~/.aws/credentials

    mkdir -p ~/.aws/
    chmod 0750 ~/.aws
    
    touch ~/.aws/credentials
    chmod 0600 ~/.aws/credentials
    
    touch ~/.aws/config

Linux Conflict-Free Install

curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o ./awscliv2.zip

unzip ./awscliv2.zip

./aws/install \
    --bin-dir ~/.local/opt/aws-cli \
    --install-dir ~/.local/opt/aws-cli \
    --update

macOS Conflict-Free Install

  1. Create ~/.aws/choices.xml with your local install directory

    mkdir -p ~/.aws/
    mkdir -p ~/.local/opt
    echo '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <array>
        <dict>
          <key>choiceAttribute</key>
          <string>customLocation</string>
          <key>attributeSetting</key>
          <string>'"$HOME/.local/opt"'</string>
          <key>choiceIdentifier</key>
          <string>default</string>
        </dict>
      </array>
    </plist>' > ~/.aws/choices.xml
  2. Install the AWS CLI pkg using the conflict-free install directory

    curl 'https://awscli.amazonaws.com/AWSCLIV2.pkg' -o ./AWSCLIV2.pkg
    
    installer -pkg ./AWSCLIV2.pkg \
        -target 'CurrentUserHomeDirectory' \
        -applyChoiceChangesXML ~/.aws/choices.xml
    
    rm ./AWSCLIV2.pkg
  3. Update PATH

    pathman add ~/.local/opt/aws-cli
    export PATH="/Users/aj/.local/opt/aws-cli:$PATH"
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

No branches or pull requests

1 participant