Skip to main content

Use a second AWS account for s3 files in laravel

I am using laravel and need to use a second aws account for publishing to an s3 bucket. I have been using some s3 buckets for internal use in the framework, however I have another external aws account I need to use and send files to. Of course I have the access key and secret for this new account, just not quite sure how to setup the config, etc in laravel. Using laravel 4.

Solved

Found a way to do this without using the config settings using the factory:

`$s3 = \Aws\S3\S3Client::factory(array( 
  'region' => 'region-name', 
  'key' => 'key', 
  'secret' => 'secret'
));`

Comments