0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

S3バケットにブラウザから直接ファイルをアップロードしたい

Posted at

curl -sS https://getcomposer.org/installer | php

vi composer.json

{
    "require": {
        "aws/aws-sdk-php": "2.*"
    }
}

php composer.phar install
ls vendor/aws/ -1

test.php
<?php
require 'vendor/autoload.php';
use Aws\Ec2\Ec2Client;

$client = new Ec2Client([
  'region' => 'ap-northeast-1',
  'version' => '2016-09-15'
]);
$result = $client->describeInstances([
  'Filters' => [
        [
            'Name' => 'tag:Name',
            'Values' => ['website'],
        ],
  ]
]);
print $result['Reservations'][0]['Instances'][0]['PrivateIpAddress'];



yum install php-mbstring.x86_64
php -m | grep mb
rpm -qa | grep openssl
rpm -qa | grep mod_ssl
rpm -qa | grep php-pdo
curl -sS https://getcomposer.org/installer | php
mkdir ~/bin
mv composer.phar ~/bin/composer
which composer
composer
yum install php-xml
composer require aws/aws-sdk-php
wget https://getcomposer.org/download/1.0.0-alpha11/composer.phar
php -d memory_limit=-1 composer.phar require aws/aws-sdk-php

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?