Project

knife-s3

0.0
No commit activity in last 3 years
No release in over 3 years
S3 Support for Chef's Knife Command
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 11
~> 1.3
 Project Readme

DESCRIPTION:¶ ↑

This is a Knife plugin for AWS S3. The plugin gives knife the ability to list, upload and download to / from S3. For example, if using the Knife CFN plugin, and you want to reference an S3-hosted template, this plugin would allow you to upload to S3 before using CFN.

Some code was pillaged from Neill Turner’s knife-cfn plugin: github.com/neillturner/knife-cfn

INSTALLATION:¶ ↑

Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don’t support plugins. This plugin was developed against chef 11.4.4

gem install chef

This plugin is available as a gem:

If you want to build it yourself from source, you can do so with gem:

git clone https://github.com/brettcave/knife-s3.git knife-s3
cd knife-s3
gem build knife-s3.gemspec

This will build the gem in the project directory. From there, it can be installed locally:

gem install knife-s3-0.0.1.gem

CONFIGURATION:¶ ↑

In order to authenticate with the AWS API, you need to configure knife with your AWS Access Key ID and Secret Access Key. This can be done by adding the following to your knife.rb:

knife[:aws_access_key_id] = "ACCESSKEY"
knife[:aws_secret_access_key] = "supersecret"

The ID and secret key can be passed with the --aws-access-key-id and --aws-secret-access-key respectively.

SUBCOMMANDS¶ ↑

Use knife s3 --help to get a full list of options to use. All subcommands require a bucket (-b) parameter

knife s3 list BUCKET¶ ↑

Lists an S3 bucket.

  • Optional: --prefix (-p).

knife s3 download¶ ↑

Downloads from an S3 bucket.

  • Required: --remote (-r).

  • Optional, but recommended: --file (-f)

knife s3 upload¶ ↑

Uploads a file to an S3 bucket.

  • Required: --file (-f)

  • Optional: --remote (-r)