Skip to content

brettcave/knife-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Knife S3 plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages