Forge Home

awscli2

Installs the AWS CLI version 2

5,167 downloads

141 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.3.0 (latest)
  • 0.2.0
  • 0.1.0 (deleted)
released Mar 22nd 2024
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'umd-awscli2', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add umd-awscli2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install umd-awscli2 --version 0.3.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

umd/awscli2 — version 0.3.0 Mar 22nd 2024

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with awscli2
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.

Overview

This module installs (or upgrades, or un-installs) the AWS CLI v2. Redhat has dropped the AWS CLI v1 from its repositories, and AWS has packaged up v2 of the CLI with all dependencies included (but not packaged it as an RPM).

Module Description

This module, by default, will place symlinks in /usr/bin (rather than the AWS default of /usr/local/bin. This was chosen because the previous AWS CLI command (provided by redhat) was installed into that location, and we do not want to break any scripts that do not have /usr/local/bin in their path or may have hard-coded /usr/bin/aws.

This module requires the manual specification of the version of the CLI to install. This was done to prevent having to download the latest zip file from AWS on every puppet run just to see if it has been updated. This module will remove older versions after a successful upgrade to keep disk space down.

This module delivers a custom fact (umd_awscliv2_version) which is used to determine if an upgrade or clean install is needed (it will do nothing if the requested version is already installed).

This module is not a complete replacement for a package management system, and it is possible for it to fail to un-install older versions on upgrade or absent. In particular, the currently installed version fact is based on the current value of $bin_path, and changing this parameter after an install has happened will leave the previous installation abandoned.

Setup

What awscli2 affects

  • By default, it will install the CLI into /usr/local/aws-cli.
  • By default, it will symlink binaries (aws, aws_completer) into /usr/bin.

Usage

Include the awscli2 class and define the following parameters as required:

Required Parameters

  • version: The version of the CLI to install

Optional Parameters

  • ensure: Set to absent to un-install the AWS CLI.
  • install_dir: Path to install the CLI into. Defaults to /usr/local/aws-cli.
  • bin_dir: Path to create symlinks to binaries. Defaults to /usr/bin.

Example

---
classes:
  - awscli2
awscli2::version: '2.0.28'