Skip to content

What is Amazon S3? Amazon Simple Storage Service (Amazon S3), S3 stands for “Simple Storage Service”, is an amazon service which provides us a highly scalable, durable and secure storage. It is easy and simple to use with a simple web service interface. We can store and retrieve our data from anywhere and anytime on the web. It makes buckets for…

Notifications You must be signed in to change notification settings

suportefloripa/amazon-s3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amazon-s3

You can download most recent version of Amazon PHP SDK by running following composer command

 composer require aws/aws-sdk-php

 // Include the SDK using the Composer autoloader
  require 'vendor/autoload.php';
  use Aws\S3\S3Client;
  use Aws\S3\Exception\S3Exception;

    // Set Amazon s3 credentials
  $client = S3Client::factory(
  array(
  'key'    => "your-key",
  'secret' => "your secret key"
   )
  );

    try {
    $client->putObject(array(
         'Bucket'=>'your-bucket-name',
         'Key' =>  'your-filepath-in-bucket',
         'SourceFile' => 'source-filename-with-path',
         'StorageClass' => 'REDUCED_REDUNDANCY'
    ));

} catch (S3Exception $e) {
     // Catch an S3 specific exception.
    echo $e->getMessage();
}

About

What is Amazon S3? Amazon Simple Storage Service (Amazon S3), S3 stands for “Simple Storage Service”, is an amazon service which provides us a highly scalable, durable and secure storage. It is easy and simple to use with a simple web service interface. We can store and retrieve our data from anywhere and anytime on the web. It makes buckets for…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%