cookbook 's3_put', '~> 2.0.1', :supermarket
s3_put (3) Versions 2.0.1 Follow0
Installs/Configures s3_put
cookbook 's3_put', '~> 2.0.1'
knife supermarket install s3_put
knife supermarket download s3_put
s3_put cookbook
A library cookbook for the s3_put
resource, which uploads a file to S3.
Requirements
- An AWS account
- An S3 bucket
- AWS credentials
-
s3:PutObject
permissions for what path(s) you want to upload to on the aforementioned S3 bucket
Usage
Add a dependency on this cookbook to your cookbook’s metadata or Berksfile.
Then, in your recipe, to upload a file:
s3_put 'path/to/my/file.tar.gz' do
bucket 'my_bucket'
remote_path '/path/on/s3'
access_key_id 'access_key_id'
secret_access_key 'secret_access_key'
action :upload
end
Note that the resultant path will be the remote_path
combined with the filename you are uploading. For this example, that would be #{remote_path}/file.tar.gz
.
The access_key_id
and secret_access_key
are optional; credentials will be picked up per the AWS SDK from a user’s credentials file or an instance role if you do not provide the credentials directly.
Conversely, to delete one:
s3_put 'path/to/my/file.tar.gz' do
bucket 'my_bucket'
remote_path '/path/on/s3'
access_key_id 'access_key_id'
secret_access_key 'secret_access_key'
action :delete
end
Author
Author:: Eric Herot eric.herot@evertrue.com
Author:: Jeff Byrnes thejeffbyrnes@gmail.com
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
CHANGELOg for s3_put cookbook
v2.0.1
- Use
name_property
, notname_attribute
- Should have been included with #3
v2.0.0
- Refactor into a custom resource (#3)
- Refactor to use
aws-sdk
(#3) - Refactor for compatibility w/ Chef 13 (and DRYness)
- Add docs & metadata (#2)
- Automate testing using Travis CI (#1, #6)
- Drop callback validator from
remote_path
property - Test against Chef 12 & latest (currently Chef 13)
- Clean up docs & other config
v1.0.2
- Refactor & modernize the cookbook
v1.0.1
- Initial release
Collaborator Number Metric
2.0.1 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.1 passed this metric
No Binaries Metric
2.0.1 passed this metric
Publish Metric
2.0.1 passed this metric
Supported Platforms Metric
2.0.1 passed this metric
Testing File Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.1 passed this metric
2.0.1 failed this metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
2.0.1 passed this metric
No Binaries Metric
2.0.1 passed this metric
Publish Metric
2.0.1 passed this metric
Supported Platforms Metric
2.0.1 passed this metric
Testing File Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.1 passed this metric
2.0.1 passed this metric
2.0.1 passed this metric
Publish Metric
2.0.1 passed this metric
Supported Platforms Metric
2.0.1 passed this metric
Testing File Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.1 passed this metric
2.0.1 passed this metric
2.0.1 passed this metric
Testing File Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.0.1 passed this metric
2.0.1 failed this metric
2.0.1 passed this metric