seckie's programming memo

プログラミングするにあたって調べたことなどのメモ。たまにひどい英語で書く。

AWS S3にPHPからあれこれやり取りするための調査と試験

目標: ローカルサーバーなどで動作するPHPアプリから、S3上に静的なファイルをアップロードする

S3

http://docs.aws.amazon.com/aws-sdk-php/guide/latest/service-s3.html

S3の Bucket やら Object の Permissions について
https://aws.amazon.com/articles/5050

AWS SDK for PHP

これを読む
http://aws.amazon.com/articles/PHP/4261

ドキュメント目次
http://docs.aws.amazon.com/aws-sdk-php/guide/latest/index.html

これを読む。PEARでインストールする。
http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html

$ sudo pear config-set auto_discover 1
$ sudo pear channel-discover pear.amazonwebservices.com
$ sudo pear install aws/sdk

すると

require 'AWSSDKforPHP/aws.phar';

SDKが読めるようになる

これも読む
http://docs.aws.amazon.com/aws-sdk-php/guide/latest/quick-start.html

無料枠について
http://aws.amazon.com/jp/free/

チュートリアルやる
http://aws.amazon.com/jp/developers/getting-started/php/


プラスアルファでEC2の調査

EC2

http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/concepts.html

EC2へのSSH/SCPの仕方
http://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html