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

Change of Support Model of SAM CLI Installation Experience of Homebrew #5613

Closed
mndeveci opened this issue Jul 25, 2023 · 11 comments
Closed

Comments

@mndeveci
Copy link
Contributor

mndeveci commented Jul 25, 2023

Starting from 2023/09/12, the AWS SAM CLI will no longer support installation through the AWS-managed Homebrew installer (aws/tap/aws-sam-cli). We recommend you use our supported first-party installers. To continue using Homebrew, the community-managed installer (aws-sam-cli) is available at your discretion.

From 2023/09/12, when you run brew install aws/tap/aws-sam-cli, you will be re-directed to the community-managed formula. This is the same behavior as running brew install aws-sam-cli.

Here is the list of first-party installers:

Please visit AWS SAM CLI Installation page for more information https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html

Thanks!

@mndeveci mndeveci added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Jul 25, 2023
@mndeveci mndeveci pinned this issue Jul 25, 2023
@mndeveci mndeveci added area/installation and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Jul 25, 2023
@francoisauclair911
Copy link

You guys should add a warning on the documentation page
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html

@mndeveci
Copy link
Contributor Author

mndeveci commented Jul 27, 2023

You guys should add a warning on the documentation page https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html

Thanks for the suggestion, it is in work in progress at the moment, it should be updated soon.

@ethanmills
Copy link
Contributor

What's the recommended way of getting upgrades when installing from the package rather than a package manager like brew?

@sebastian-zero
Copy link

sebastian-zero commented Jul 29, 2023

Homebrew is the only real cross-platform package manager and our whole dev team uses it to have up-to-date installations of the various AWS and other CLI tools without having different installation and update instructions for each OS devs use.

Now we'll have to go through manually installing AWS SAM CLI / unzipping and sudo-installing on Linux dev machines for each update.

So, why is AWS pulling support for homebrew? Sorry if this sounds harsh, but it seems like quite a developer-hostile move by AWS.

@rafrafek
Copy link

Official installer is broken, see #5649

@mndeveci
Copy link
Contributor Author

mndeveci commented Aug 1, 2023

We appreciate all the feedback provided here.

I just want to point out that, installing through brew install aws-sam-cli will still be available. That is maintained in the homebrew core repository by public community.

I also want to check the cask alternative. Users will be able to install using brew install --cask aws-sam-cli and that will use our PKG installers in the background (note that cask is only supported for MacOS, it is not supported by Linuxbrew). That will help us to streamline the installers that we are providing today. If you think installing through cask will be a better alternative, please give this comment a 👍🏼

Thank you!

@HCrane
Copy link

HCrane commented Aug 5, 2023

Sad to see this happen as homebrew is very convenient on WSL and, as @mndeveci has written, is not available for Linuxbrew. Could you provide a .deb package or any convenient way to install and maintain it on Linux?

@mndeveci mndeveci changed the title [Announcement] AWS SAM CLI Homebrew Deprecation Change of Support Model of SAM CLI Installation Experience of Homebrew Aug 9, 2023
@iainelder
Copy link

Could you provide a .deb package or any convenient way to install and maintain it on Linux?

This, please. I'm an Ubuntu user. A Debian package repository with all the AWS developer tools would allow Ubuntu to automatically keep my developer tools up to date. Something like Microsoft's Linux Package Repository would be awesome.

At least publish a deb package so that I may install and uninstall using standard tools such as apt and deb-get.

Are you still going to support installation via pip?

I have enough pip-installed tools that this is an acceptable solution:

pipx install/upgrade/uninstall aws-sam-cli

@arran4
Copy link

arran4 commented Oct 18, 2023

Sad to see this happen as homebrew is very convenient on WSL and, as @mndeveci has written, is not available for Linuxbrew. Could you provide a .deb package or any convenient way to install and maintain it on Linux?

I used this script to create myself a deb file:

#!/bin/bash

# Define package metadata
package_name="aws-sam-cli"
package_version="1.98.0"
package_description="AWS SAM CLI"
maintainer="Your Name <your@email.com>"

# URL to download the AWS SAM CLI ZIP file
sam_cli_zip_url="https://github.com/aws/aws-sam-cli/releases/download/v$package_version/aws-sam-cli-linux-x86_64.zip"

# Set up the package directory structure
package_dir="$package_name-$package_version"
package_deb_dir="$package_dir/DEBIAN"
package_bin_dir="$package_dir/usr/local/bin"
package_sam_dir="$package_dir/usr/local/aws-sam-cli"

# Create the required directories
mkdir -p "$package_deb_dir"
mkdir -p "$package_bin_dir"
mkdir -p "$package_sam_dir"

# Download the AWS SAM CLI ZIP file
wget "$sam_cli_zip_url" -O aws-sam-cli.zip

# Extract the 'dist' directory from the ZIP file
unzip aws-sam-cli.zip -d "$package_sam_dir" dist/*

# Create the symbolic link for the 'sam' executable
ln -s "/usr/local/aws-sam-cli/dist/sam" "$package_bin_dir/sam"

# Create the control file
cat <<EOF > "$package_deb_dir/control"
Package: $package_name
Version: $package_version
Section: utils
Priority: optional
Architecture: all
Maintainer: $maintainer
Description: $package_description
EOF

# Create the .deb package
dpkg-deb --build "$package_dir"

# Clean up temporary files
rm aws-sam-cli.zip
rm -r "$package_dir"

echo "Package created: $package_name-$package_version.deb"

No reason this couldn't be made part of the github workflow.

@mndeveci
Copy link
Contributor Author

mndeveci commented Dec 4, 2023

SAM CLI has completed its migration and homebrew installation channel has been using homebrew-core community bottles since October 3rd, 2023. You can update your installation by running brew update && brew upgrade which should configure your local installation to start using the bottles published by the homebrew-core repository.

Thank you for your feedback on this ticket. A few quick notes:

  1. If you experience any issues specific to the installation, feel free to create issues in this repository or homebrew-core issues backlog here.
  2. Regarding to debian package request, the team wanted to provide an installation method that will work on Linux free from the package manager that particular distro uses. For that sense, having a ZIP file where you can just download and throw anywhere in the system which is in the $PATH environment variable should be sufficient. Community is still welcome to create and manage package manager.
  3. For distributing as Homebrew Cask, community is welcome to create this one as well by raising a PR to their repository.
  4. We have no current plans to drop support installation via pip.

Thanks for your understanding and support!

@mndeveci mndeveci closed this as completed Dec 4, 2023
Copy link
Contributor

github-actions bot commented Dec 4, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

No branches or pull requests

8 participants