Forge Home

aws

This module fetch files from AWS S3 on Linux systems

46,721 downloads

46,246 latest version

5.0 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.1.1 (latest)
  • 0.1.0
released Feb 5th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >3.0.0 <6.0.0
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'almariah-aws', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add almariah-aws
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install almariah-aws --version 0.1.1

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

almariah/aws — version 0.1.1 Feb 5th 2018

AWS module for Puppet

Overview

To install the module:

puppet module install almariah-aws

Also, you will need aws-sdk-s3 ruby gem dependency on the server where the s3file type is applied. You can use package type with gem provider to install it.

Usage

The module will searches the following locations for AWS credentials:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • The shared credentials ini file at ~/.aws/credentials.
  • From an instance profile when running on EC2.

To fetch a file from S3 bucket to specific path:

s3file {'/tmp/file.txt':
  ensure => present,
  object => '/example/file.txt',
  bucket => "example-bucket",
  region => 'us-east-1'
}

If aws-sdk-s3 ruby gem not installed you can use:

s3file {'/tmp/file.txt':
  ensure  => present,
  object  => '/example/file.txt',
  bucket  => "example-bucket",
  region  => 'us-east-1'
  require => Package['aws-sdk-s3']
}

package {'aws-sdk-s3':
  ensure    => present,
  provider  => gem
}

If you set ensure to present and the file does not exist, it will be fetched from the bucket. If you set ensure to latest, every time you apply the type, the file on the bucket will be checked against the local copy in the specified path using MD5.