aws = data_bag_item('aws', 'main')
chef_gem 'aws-s3'
require 'aws/s3'
AWS::S3::Base.establish_connection!(:access_key_id => aws['aws_access_key_id'], :secret_access_key => aws['aws_secret_access_key'])
AWS::S3::Bucket.create(node['example']['s3-bucket'])
AWS::S3::Base.disconnect!
Read aws-s3 gem docs, to do other things with AWS S3.On 4/24/14, 7:43 AM, Brian Hatfield wrote:Also this:
This exists, and works well for us: https://github.com/adamsb6/s3_file
http://community.opscode.com/cookbooks/sk_s3_file
And this aws cookbook has aws_s3_file:
http://community.opscode.com/cookbooks/aws
Archive powered by MHonArc 2.6.16.