You've already forked minio-cookbook
mirror of
https://github.com/astaxie/cookbook.git
synced 2025-08-08 09:42:04 +03:00
Doc: added aws-sdk for ruby and python and modified existing doc. (#70)
This commit is contained in:
committed by
Harshavardhana
parent
1b1d0fb757
commit
f1b5ae761a
@@ -2,7 +2,6 @@
|
||||
|
||||
`aws-sdk-php` is the official AWS SDK for the PHP programming language. In this recipe we will learn how to use `aws-sdk-php` with Minio server.
|
||||
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
Install Minio Server from [here](http://docs.minio.io/docs/minio).
|
||||
@@ -11,14 +10,12 @@ Install Minio Server from [here](http://docs.minio.io/docs/minio).
|
||||
|
||||
Install `aws-sdk-php` from AWS SDK for PHP official docs [here](https://docs.aws.amazon.com/aws-sdk-php/v3/guide/getting-started/installation.html)
|
||||
|
||||
|
||||
## 3. Example
|
||||
|
||||
Please replace ``endpoint``,``credentials``, ``Bucket`` with your local setup in this ``example.php`` file.
|
||||
Please replace ``endpoint``,``key``, ``secret``, ``Bucket`` with your local setup in this ``example.php`` file.
|
||||
|
||||
Example below shows putObject and getObject operations on Minio server using aws-sdk-php.
|
||||
|
||||
|
||||
```php
|
||||
|
||||
<?php
|
||||
@@ -32,8 +29,8 @@ $s3 = new Aws\S3\S3Client([
|
||||
'region' => 'us-east-1',
|
||||
'endpoint' => 'http://localhost:9000',
|
||||
'credentials' => [
|
||||
'key' => 'H5K8172RVM311Q2XFEHX',
|
||||
'secret' => '5bRnl3DGhNM+fRBMxOii11k8iT78cNSIfoqnJfwC',
|
||||
'key' => 'YOUR-ACCESSKEYID',
|
||||
'secret' => 'YOUR-SECRETACCESSKEY',
|
||||
],
|
||||
]);
|
||||
|
||||
@@ -57,7 +54,6 @@ echo $retrive['Body'];
|
||||
|
||||
```
|
||||
|
||||
|
||||
## 4. Run the Program
|
||||
|
||||
```sh
|
||||
|
Reference in New Issue
Block a user