아마존 웹서비스

S3 SDK - PHP

시작하기전에

본 수업은 'SDK - PHP' 토픽을 선행 학습으로 한다. 따라서 아직 이 수업을 보기 전이라면 꼭 보자.

예제

EC2 인스턴스에 파일을 업로드 하면 PHP가 SDK를 이용해서 S3로 파일을 전송하고, 그 결과를 화면에 출력한다. 이 때 버킷 내에 포함된 모든 객체들의 리스트를 출력한다. 

본 예제는 두개의 파일로 이루어져있다. 

  • s3.html : S3를 사용하기 위한 인증정보와 업로드 할 파일을 선택하고 전송하는 웹페이지
  • s3_receiver.php - s3.html을 통해서 업로드한 이미지를 받아서 이를 S3로 전송하고, 그 결과 페이지를 생성해주는 웹에플리케이션

본 예제를 이해하는데 도움이 될만한 수업들은 아래와 같다. 

s3.html

<!DOCTYPE html>
<html>
	<head> 
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
	</head>
	<body>
		<form enctype="multipart/form-data" action="s3_receiver.php" method="POST">
			<p><label>key</label><input type="text" name="key" /></p>
			<p><label>secret</label><input type="text" name="secret" /></p>
			<p><label>버킷</label><input type="Bucket" name="bucket" /></p>
			<p><label></label><input name="userfile" type="file" /></p>
			<p><label></label><input type="submit" value="업로드"></p>
		</form>
	</body>
</html>

s3_receiver.php

<!DOCTYPE HTML>
<html>
	<head> 
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
	</head>
	<body>
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
$uploaddir = '/tmp/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
	echo "파일이 유효하고, 성공적으로 업로드 되었습니다.\n";
} else {
	die('업로드에 실패 했습니다');
}

require './vendor/autoload.php';

use Aws\Common\Aws;
use Aws\S3\Enum\CannedAcl;
use Aws\Common\Enum\Region;

try{
	// Instantiate an S3 client
	$s3 = Aws::factory(array(
		'key'=>$_POST['key'],
		'secret'=>$_POST['secret'],
		'region'=>Region::AP_NORTHEAST_1
	))->get('s3');
	// Upload a publicly accessible file. File size, file type, and md5 hash are automatically calculated by the SDK
	$result = $s3->putObject(array(
		'Bucket' => $_POST['bucket'],
		'Key'    => $_FILES['userfile']['name'],
		'Body'   => fopen($uploadfile, 'r'),
		'ACL'    => CannedAcl::PUBLIC_READ,
		'ContentType'=>mime_content_type($uploadfile)
	));
	$list = $s3->listObjects(array(
		'Bucket' => $_POST['bucket']
	));
} catch(S3Exception $e){
	print_r($e);
}
?>
		<img src="https://s3-ap-northeast-1.amazonaws.com/opentutorials/<?=$_FILES['userfile']['name']?>" />
		<br />
		<ul>
<?php
foreach($list['Contents'] as $object){
	echo "<li><a href=\"https://s3-ap-northeast-1.amazonaws.com/opentutorials/{$object['Key']}\" target=\"_blank\">{$object['Key']}</a></li>";
}
?>
		</ul>
	</body>
</html>

댓글

댓글 본문
작성자
비밀번호
  1. 김현수
    PHP 최근 버전에 맞게 수정한 버전 공유 드립니다. 참고하세요. s3.html은 같습니다.
    region은 본인 ec2 확인하시고 수정하시면 됩니다.

    그리고 key랑 secret 값을 가져오기 위해서 생성하시는 IAM User의 Permissions은,
    S3에 대한 접근 권한(AmazonS3FullAccess) 또는 AdministratorAccess로의 접근 권한을 추가해주시면 됩니다.

    s3_receiver.php

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
    </head>
    <body>
    <?php
    error_reporting(E_ALL);
    ini_set('display_errors','On');
    $uploaddir = '/tmp/';
    $uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
    if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
    echo "파일이 유효하고, 성공적으로 업로드 되었습니다.\n";
    } else {
    die('업로드에 실패 했습니다');
    }

    require './vendor/autoload.php';

    use Aws\S3\S3Client;
    use Aws\Exception\AwsException;

    $region = 'ap-northeast-2';
    $bucket_name = $_POST['bucket'];

    try{
    $s3Client = new S3Client([
    'region' => $region,
    'version' => 'latest',
    'credentials' => [
    'key' => $_POST['key'],
    'secret' => $_POST['secret']
    ]
    ]);

    // Upload a publicly accessible file. File size, file type, and md5 hash are automatically calculated by the SDK
    $result = $s3Client->putObject([
    'Bucket' => $bucket_name,
    'Key' => $_FILES['userfile']['name'],
    'SourceFile' => $uploadfile,
    'ACL' => 'public-read'
    ]);
    $list = $s3Client->listObjects([
    'Bucket' => $bucket_name
    ]);
    } catch(S3Exception $e){
    echo $e->getMessage() . "\n";
    }
    ?>
    <img src="https://s3-<?=$region?>.amazonaws.com/<?=$bucket_name?>/<?=$_FILES['userfile']['name']?>" />
    <br />
    <ul>
    <?php
    foreach($list['Contents'] as $object){
    echo "<li><a href=\"https://s3-{$region}.amazonaws.com/{$bucket_name}/{$object['Key']}\" target=\"_blank\">{$object['Key']}</a></li>";
    }
    ?>
    </ul>
    </body>
    </html>
  2. meadc
    http://www.coach--outlet.net/ coach outlet
    http://www.pandoracharmssale.org.uk/ pandora charms
    http://www.jordan-retro.us/ Jordan Retro Shoes
    http://www.michael-kors-outlet.us/ michael kors outlet
    http://www.yeezyboost350.us.org/ Yeezy 350
    http://www.mlb-shop.net/ major league baseball
    http://www.pandoranecklace.us/ pandora necklace
    http://www.pandoracharms-uk.co.uk/ pandora charms uk
    http://www.asicsshoes.com.au/ asics shoes Australia
    http://www.pandorarings.org.uk/ pandora rings
    http://www.pandorarings.net.au/ pandora rings
    http://www.basketballshoes.in.net/ nike basketball shoes
    http://www.pandoraring.us/ pandora princess ring
    http://www.cheapraybans.us/ ray ban online
    http://www.burberryscarfoutlet.org/ burberry scarf
    http://www.coachshoes.us coach shoes
    http://www.jordan-retro.us/ Jordan Retro
    http://www.michaelkorspurses.us/ michael kors purses outlet
    http://www.pandora-rings.us/ pandora rings
    http://www.pradaoutlet.co/ prada outlet online
    http://www.chanel.net.au/ chanel bag
    http://www.pandoraring.us/ pandora rings
    http://www.canada-goose-outlet.us/ canada goose jacket
    http://www.rayban-wayfarer.us/ ray ban wayfarer
    http://www.pandoraring.us/ pandora ring
    http://www.raybanclubmaster.us/ ray ban clubmaster
    http://www.nikecom.us/ nike free run
    http://www.ugg-slippers.co.uk/ ugg slippers
    http://www.coach-australia.net.au/ coach
    http://www.mlbshop.us.org/ mlb store
    http://www.nike-shoes.net.au/ nike shoes
    http://www.asicsshoes.com.au/ asics Australia
    http://www.canada-goose-outlet.us/ canada goose sale online
    http://www.lebron-james-shoes.us/ nike lebron james
    http://www.michaelkorsoutletonlinepro.us/ michael kors outlet online
    http://www.coach--bags.us/ coach bag
    http://www.polo-outlet.co.uk/ polo online
    http://www.burberryoutlet-online.net/ burberry outlet online
    http://www.coach--purses.us/ coach purse
    http://www.ugg.org.au ugg australia
    http://www.canadagooseoutlet.us/ canada goose sale
    http://www.burberryoutletonline.net/ burberry outlet
    http://www.prada-handbags.us.org/ official prada site
    http://www.basketballshoes.in.net/ Basketball shoes
    http://www.sunglassessm.com/ sunglasses sm
    http://www.michaelkorsbags.co/ michael kors bags outlet
    http://www.nike-shoes.net.au/ nike shoes australia
    http://www.coach-outlet.cc/ Coach Outlet Store
    http://www.sunglasseshut.co/ sunglasses hut
    http://www.basketball-jerseys.us/ basketball jerseys
    http://www.katespadebags.org/ kate spade bags
    http://www.coach-handbags.us coach handbags
    http://www.michael-kors.ca michael kors canada
    http://www.pandora-uk.org.uk/ pandora uk
    http://www.pradaoutletonline.net/ prada outlet online
    http://www.tiffany-and-co.co.uk/ tiffany uk
    http://www.mlb-shop.net/ mlb shop
    http://www.pradabags.co/ official prada site
    http://www.air-jordan-retro.us air jordan retro
    http://www.katespadeoutlet.cc/ kate spade outlet
    http://www.burberryoutletonline.net/ burberry online
    http://www.cheapraybans.us/ Cheap Ray Ban
    http://www.nikehuarache.co/ nike huarache shoes
    http://www.burberryoutlets.ca/ burberry outlet canada
    http://www.kd8.us/ KD 8 shoes
    http://www.abercrombiefitch.fr/ abercrombie and fitch
    http://www.ubiae.fr/ veronique Billat
    http://www.moncler-jacket.co.uk/ moncler uk
    http://www.mizunoshop.us/ Mizuno Shop
    http://www.michaelkors.com.co/ michael kors factory outlet
    http://www.abercrombiefitch.nl/ bercrombie Nederland
    http://www.jordanshoes.co/ nike jordan shoes
    http://www.oakleyfrogskins.us/ oakley frogskins
    http://www.michaelkors--handbags.us/ michael kors handbags
    http://www.burberryoutletonline.net/ burberry outlet online
    http://www.katespadeoutlet.nom.co/ kate spade black friday
    http://www.rb-sunglasses.us ray ban sunglasses
    http://www.prada-outlet.us.com/ prada outlet online
    http://www.burberryoutlet-online.net/ burberry online
    http://www.katespadehandbags.org/ kate spade bags
    http://www.ralph-lauren.net.au/ ralph lauren australia
    http://www.michael-kors.it/ michael kors italy
    http://www.uggboots.org.au/ ugg australia
    http://www.coach-outlet.info/ coach outlet
    http://www.oakley-australia.com.au oakley australia
    http://www.oakleyholbrook.us/ Oakley Holbrook
    http://www.michael-korsoutlet.com/ michael kors outlet
    http://www.pradabagsoutlet.org/ prada bags outlet
    http://www.burberryoutlet-online.net/ burberry outlet
    http://www.hermes-outlet.org Hermes Outlet
    http://www.ugguk.co.uk/ ugg uk
    http://www.canada-goose-outlet.us/ Canada Goose Outlet
    http://www.katespadebags.org/ kate spade bags outlet
    http://www.yeezy-boost-350.us/ yeezy boost 350
    http://www.raybanaviator.org/ rayban aviator
    http://www.pandora-charms.com.au/ pandora australia
    http://www.pradaoutlet.cc/ prada outlet online
    http://www.prada-bags.co/ prada bags on sale
    http://www.chanel-outlet.co/ CHanel Factory Outlet
    http://www.michaelkorspurses.us/ michael kors purses on sale
    http://www.abercrombiefitch.fr/ abercrombie fitch
    http://www.rayban-glasses.us/ ray ban glasses
    http://www.shoes-online.us/ shoes sale
    http://www.michael-kors.net/ michael kors tote
    http://www.ubiae.fr/ Billat
    http://www.katespadehandbags.org/ kate spade handbags
    http://www.moncler-jacket.co.uk/ moncler mens jackets
    http://www.pandoracharms.co/ pandora charms sale online
    http://www.moncler-jacket.co.uk/ moncler sale
    http://www.coach-usa.us coach usa
    http://www.paulsmith.org.uk/ paul smith
    http://www.pradasunglasses.us/ prada glasses
    http://www.nikehuarache.co/ huarache nike
    http://www.michael-kors-outletonline.us/ michael kors outlet
    http://www.coach-outlet.com.co coach outlet
    http://www.pandoracharms-uk.co.uk/ pandora charms
    http://www.pandoranecklace.us/ pandora necklace charms
    http://www.moncler-jacket.us/ cheap moncler jacket
    http://www.pradaoutletonline.net/ prada factory outlet online
    http://www.pandora-charms.com.au/ pandora charms
    http://www.pradaoutlet.co/ prada outlet
    http://www.katespadeoutlet.com.co/ kate spade outlet online
    http://www.clkbenz.com clk benz
    http://www.hyperdunk.us/ Nike Hyperdunk Shoes
    http://www.hugo-boss.us/ Hugo Boss Online
    http://www.sunglasseshut.cc/ sunglasses hut
    http://www.michael-kors.net/ michael kors wallet
    http://www.raybanprescriptionglasses.us/ ray ban prescription glasses
    http://www.coach-outlets.net coach outlet
    http://www.longchamp-outlet.co Longchamp Outlet
    http://www.coach-outlet.us coach outlet
    http://www.raybanaviator.us/ ray ban aviator
    http://www.rayban-outlet.us Ray Ban Outlet
    http://www.louis-vuitton-uk.co.uk louis vuitton uk
    http://www.pradaoutletonline.org/ prada outlet online
    http://www.coachcarter.com.au/ coach australia
    http://www.raybansunglasses.com.au ray-ban sunglasses
    http://www.louis-vuitton.com.au louis vuitton australia
    http://www.pradaoutletonline.us/ prada outlet online
    http://www.prada-outlet.net/ prada outlet
    http://www.prada-bags.co/ prada bags
    http://www.prada-bags.co/ Prada Outlet
    http://www.pdcharm.it/ Pandora Charm
    http://www.michaelkors--outlet.us/ michael kors outlet
    http://www.burberryoutlets.ca/ burberry canada
    http://www.ups-tracking.us/ ups tracking
    http://www.michaelkorstote.us/ michael kors totes
    http://www.michaelkorsoutlet.nom.co/ michael kors outlet
    http://www.football-jerseys.co/ football jerseys
    http://www.moncler-jacket.co.uk/ moncler jacket mens
    http://www.joebuy.com/ china wholesale
    http://www.canadagooseoutlet.us/ canada goose outlet
    http://www.michael-kors.net/ michael kors bags
    http://www.nike-air-jordan.us/ nike jordan shoes
    http://www.prada-bags.us.com/ prada us
    http://www.coachoutlets.net coach outlet
    http://www.moncler-outlet.us/ moncler clothing
    http://www.nike-shoes.org/ nike shoes
    http://www.abercrombieoutlet.us/ abercrombie outlet us
    http://www.michael-kors.net/ official michael kors
    http://www.yeezyboost.co/ adidas yeezy boost 350
    http://www.jordan-retro-shoes.us/ Jordan retro
    http://www.basketballshoes.in.net/ cheap basketball shoes
    http://www.ray-ban--sunglasses.com/ ray ban sunglasses
    http://www.coachoutletonline.info/ coach outlet
    http://www.coach--bags.us/ coach diaper bag
    http://www.burberryaustralia.net.au burberry australia
    http://www.katespadeoutlet.ca/ kate spade
    http://www.adidas-shoes.com.au adidas shoes
    http://www.coachfactoryoutlet.co/ coach factory
    http://www.katespade.net.au kate spade
    http://www.abercrombieoutlet.ca/ abercrombie outlet
    http://www.prada-bags.us.com/ prada handbags
    http://www.hugo-boss.us/ Hugo Boss Outlet
    http://www.pandora-bracelet.co/ pandora bracelet
    http://www.baseball-jerseys.us/ baseball jerseys
    http://www.nfl-shop.co/ nfl jerseys
    http://www.adidasaustralia.com.au adidas australia
    http://www.coach-factory-outlet.net/ coach factory outlet online
    http://www.coachfactoryoutlet.co/ coach outlet
    http://www.mizunoshoes.us/ Mizuno Wave
    http://www.air-jordan-shoes.us air jordan shoes
    http://www.michaelkorsoutlet.ca/ Michael Kors Outlet
    http://www.pandora-charms.co/ pandora charms sale
    http://www.abercrombieoutlet.us/ abercrombie us
    http://www.mlbshop.us.org/ mlb shop
    http://www.michaelkorsoutlet.info/ michael kors
    http://www.hyperdunk.us/ Nike Hyperdunk 2015
    http://www.michaelkors--handbags.us/ michael kors handbags outlet
    http://www.michael-kors.net/ michael kors outlet
    http://www.michaelkorsblackfridayoutlets.us/ michael kors outlet
    http://www.coach-outlet.net.co coach outlet
    http://www.michael-kors.com.au michael kors australia
    http://www.prada-bags.org/ prada online
    http://www.pradasunglasses.us/ prada official site
    http://www.apph.co.uk/ landing gears
    http://www.sunglassesoutletsky.com/ sunglasses outlet
    http://www.nike-shoes.org/ nike outlet
    http://www.salomon-shoes.com/ salomon hiking shoes
    http://www.pandora-rings.us/ pandora rings sale
    http://www.burberryoutlets.ca/ burberry outlet canada
    http://www.ray-ban-outlet.us/ ray ban outlet
    http://www.pandora-charms.us/ pandora jewelry
    http://www.michaelkorsoutletbags.us/ michael kors bags
    http://www.apph.co.uk/ landing gear
    http://www.jordan-retro-shoes.us/ jordan retro shoes
    http://www.abercrombieandfitchoutlet.net/ abercrombie & fitch
    http://www.moncler-outlet.us/ moncler down jackets
    http://www.coach-outlet.cc/ Coach Outlet Online
    http://www.yeezyboost.co/ yeezy boost 350 shoes
    http://www.nfl-shop.co/ nfl shop
    http://www.chanel-outlet.co/ Chanel Outlet
    http://www.moncler-outlet.co/ piumini moncler replica
    http://www.hermes-bag.co.uk hermes bag
    http://www.moncler-jacket.us/ moncler jacket
    http://www.pandoracharms.co/ pandora charms sale clearance
    http://www.michaelkorsoutletstores.us/ michael kors outlet
    http://www.joebuy.com/ wholesale
    http://www.moncler-outlet.org/ moncler outlet
    http://www.burberryoutlets.ca/ burberry canada
    http://www.adidas.org.au adidas australia
    http://www.katespadeoutlet.ca/ kate spade canada
    http://www.katespadebags.org/ kate spade handbags
    http://www.michael-kors.uk michael kors uk
    http://www.michael-kors.net/ michael kors online
    http://www.pandora-rings.us/ pandora rings jewelry
    http://www.coachcarter.com.au/ coach carter
    http://www.louboutinshoes-uk.co.uk louboutin shoes
    http://www.abercrombieoutlet.us/ abercrombie outlet
    http://www.michael-kors--outlet.com/ michael kors outlet
    http://www.coach-outlet-online.org/ coach outlet store
    http://www.uggboots.org.au/ ugg boots
    http://www.mcmoutlet.org/ mcm factory outlet
    http://www.tiffany-and-co.co.uk/ tiffany and co
    http://www.baseballjerseys.co/ baseball jerseys
    http://www.mk-bags.us/ mk bags
    http://www.mcmoutlet.org/ mcm outlet
    http://www.nike-shoes.org/ nike store
    http://www.coach-sunglasses.co/ Coach Sunglasses Outlet
    http://www.nike-jordan-shoes.us/ nike jordan shoes
    http://www.polo-outlet.co.uk/ polo outlet online
    http://www.ralph-lauren.net.au/ ralph lauren
    http://www.coach-outlet.cc/ Coach Outlet
    http://www.chanel.net.au/ chanel
    http://www.nikehuarache.co/ huaraches
    http://www.moncler-outlet.co/ moncler outlet
    http://www.michaelkorsoutletbags.us/ michael kors outlet
    http://www.prada-bags.org/ prada handbags
    http://www.pandorarings.net.au/ pandora australia
    http://www.moncler-outlet.co/ moncler coats
    http://www.abercrombieandfitchsale.us/ abercrombie us
    http://www.burberryaustralia.com.au burberry australia
    http://www.abercrombieoutlet.us/ abercrombie outlet
    http://www.katespadeoutlet.nom.co/ kate spade outlet
    http://www.oakleyfrogskins.us/ oakley frogskins sunglasses
    http://www.yeezyboost350.us.org/ Adidas Yeezy Boost 350
    http://www.snow-boots.org.uk/ snow boots
    http://www.mlbshop.us.org/ baseball jerseys
    http://www.pandora.org.au/ pandora australia
    http://www.ray-ban-sunglasses.us/ ray ban sunglasses
    http://www.basketball-jerseys.org/ basketball jerseys
    http://www.pandora.org.au/ pandora jewelry
    http://www.michaelkorsbags.co/ michael kors outlet
    http://www.mcmoutlet.org/ mcm outlet online
    http://www.coach-outlet-online.us/ coach outlet
    http://www.michael-korsoutlet.org/ michael kors
    http://www.michaelkorsoutletonlinepro.us/ michael kors outlet
    http://www.michaelkorstote.us/ michael kors tote
    http://www.coach-outlet-online.us/ coach outlet online
    http://www.kate-spadeoutlet.com/ kate spade outlet
    http://www.timberland-boots.org.uk/ timberland boots
    http://www.michael-kors-outlet.us/ michael kors
    http://www.michael-kors.net/ michael kors outlet
    http://www.ray-ban-sunglasses.co.uk ray-ban sunglasses
    http://www.coachoutlet.nom.co/ coach outlet
    http://www.coach-outlet-online.org/ coach outlet online
    http://www.shoes-online.us/ shoes online
    http://www.moncler-jacket.us/ moncler us
    http://www.salomon-shoes.com/ salomon shoes
    http://www.louis-vuitton-outlet.co/ louis vuitton outlet
    http://www.prada-outlet.co/ prada outlet online
    http://www.louis-vuittonoutlet.org louis vuitton outlet
    http://www.hockey-jerseys.us/ hockey jerseys
    http://www.nikejordan.co/ Nike Air Jordan
    http://www.michaelkors.com.co/ michael kors outlet
    http://www.yeezyboost-350.co/ yeezy boost 350
    http://www.beatsbydre.net.au/ beats studio
    http://www.burberry-outletonline.us Burberry outlet online
    http://www.jimmy-choo.com.au jimmy choo australia
    http://www.pandora--bracelet.co.uk/ pandora bracelet
    http://www.pradapurses.org/ prada purses
    http://www.rayban-eyeglasses.us/ ray ban eyeglasses
    http://www.top-sunglasses.org/ top sunglasses
    http://www.michael-kors-outlet.us/ michael kors us
    http://www.canadagooseoutlet.us/ canada goose jacket
    http://www.michaelkors--outlet.net/ michael kors outlet
    http://www.michaelkorsoutlethandbag.us/ michael kors handbags
    http://www.oakley---sunglasses.org/ oakley sunglasses
    http://www.michaelkorspurses.us/ michael kors purses
    http://www.abercrombieandfitchoutlet.net/ abercrombie outlet
    http://www.mizunoshoes.us/ Mizuno Shoes
    http://www.michael-kors.net/ michael kors purses
    http://www.burberryoutlets.ca/ burberry outlet
    http://www.katespadehandbags.org/ kate spade black friday
    http://www.shoes-online.us/ shoes online sale
    http://www.pradaoutletonline.us/ prada outlet
    http://www.yeezyboost.co/ yeezy boost 350
    http://www.coachoutletonline.info/ coach outlet online
    http://www.cheapraybans.us/ cheap ray ban sunglasses
    http://burberry.outlet.org.au/ burberry us
    http://www.oakleysunglasses.net.au oakley sunglasses
    http://www.nikecom.us/ nike com
    http://www.football-jerseys.org/ football jerseys
    http://www.michael-kors-uk.org.uk/ michael kors uk
    http://www.ray-ban-outlet.us ray ban outlet
    http://www.chanel-outlet.co/ Chanel bags Outlet
    http://www.nike-id.us/ nike id
    http://www.pradaoutletonline.org/ authentic prada outlet online
    http://www.pandora-charms.co/ pandora charms black friday
    http://www.raybanprescriptionsunglasses.us/ ray ban prescription sunglasses
    http://www.oakley-outlet.in.net Oakley Outlet
    http://www.ralph--lauren.co.uk Ralph Lauren
    http://www.pandora--rings.co.uk/ pandora rings
    http://www.kate-spade.net.au Kate Spade Australia
    http://www.nike-air-jordan.us/ Nike Air Max
    http://www.coach-sunglasses.co/ coach sunglasses
    http://www.nikejordan.co/ Nike Jordan Shoes
    http://www.pandora-charms.co/ pandora charms
    http://www.raybanpolarized.us/ ray ban polarized
    http://www.burberryscarfs.com/ burberry scarfs
    http://www.beatsbydre.net.au/ beats by dre
    http://www.abercrombieandfitchsale.us/ abercrombie outlet
    http://www.moncler-outlet.us/ moncler outlet
    http://www.michael-kors-outlet.co Michael Kors Outlet
    http://www.paulsmith.org.uk/ paul smith uk
    http://www.nikehuarache.co/ nike air huarache
    http://www.moncler-jacket.org/ moncler jacket
    http://www.coach-australia.net.au/ coach australia
    http://www.michael-kors.net/ michael kors outlet online
    http://www.pradaoutlet.cc/ prada sale
    http://www.pandoracharms.co/ pandora charms
    http://www.michaelkorsoutlethandbag.us/ michael kors outlet
    http://www.lebron-james-shoes.us/ lebron james shoes
    http://www.michaelkors.net.co/ michael kors outlet
    http://www.mk-bags.us/ mk outlet
    http://www.burberryoutlets.ca/ burberry outlet
    http://www.coach-factory-outlet.net/ coach factory outlet
    http://www.michael-korsoutletonline.us/ michael kors outlet
    http://www.raybannewwayfarer.us/ ray ban new wayfarer
    http://www.pandora-rings.co.uk/ pandora uk
    http://www.hyperdunk.us/ Hyperdunk 2016
    http://www.nikeoutlet.net/ nike shox shoes
    http://www.coachfactoryoutlet.cc coach factory outlet
    http://www.pradabagsoutlet.org/ prada factory outlet online
    http://www.menssunglassess.com/ mens sunglasses
    http://www.mk-bags.us/ mk handbags
    http://www.katespadeoutlet.com.co/ kate spade outlet
    http://www.pradasunglasses.us/ prada sunglasses
    http://www.ralphlaurenpolo.net.au Ralph Lauren Polo
    http://www.apph.co.uk/ landinggear
    http://www.coach--purses.us/ cheap coach purse
    http://www.flashsunglasses.com/ flash sunglasses
    http://www.michaelkors.com.co/ michael kors
    http://www.katespadeoutlet.nom.co/ kate spade
    http://www.tiffanyco.net.au tiffany co
    http://www.tiffany-co.com.au tiffany co
    http://www.oakleyoutlet.co/ oakley outlet
    http://www.moncler-jacket.co.uk/ moncler jacket
    http://www.burberryscarfs.com/ burberry scarf
    http://www.oakleyholbrook.us/ Oakley Holbrook sunglasses
    http://www.coachoutlet.co/ coach outlet
    http://www.lebron-james-shoes.us/ nike lebron shoes
    http://www.pandora-jewelry.us pandora jewelry
    http://www.nikeoutlet.net/ nike outlet
    http://www.prada-outlet.us.com/ Prada Factory Outlet
    http://www.burberryscarfoutlet.org/ burberry outlet
    http://www.pradaoutletonline.net/ prada outlet
    http://www.hugo-boss.us/ Hugo Boss Store
    http://www.burberry-scarf.net/ burberry scarf
    http://www.pradaoutletonline.us/ authentic prada outlet online
    http://www.pandorabracelet.us Pandora bracelet
    http://www.nike-free-run.us/ Free Run
    http://www.timberland-boots.org.uk/ timberland uk
    http://www.michaelkorstote.us/ michael kors jet set tote
    http://www.coachfactoryoutlet.co/ coach factory outlet
    http://www.prada-outlet.net/ prada outlet online
    http://www.abercrombiefitch.nl/ Abercrombie Fitch
    http://www.pradaoutletonline.org/ prada factory outlet online
    http://www.nike-shoes.net.au/ nike australia
    http://www.jordanshoes.co/ air jordan shoes
    http://www.coach-outlet.us coach bags
    http://www.louis-vuitton-outlet.co/ louis vuitton factory outlet
    http://www.coach-outlet.us/ coach handbags
    http://www.nike-free-run.us/ Nike Free
    http://burberry.outlet.org.au/ burberry outlet
    http://www.nikehuarache.co/ huaraches shoes
    http://www.katespadeoutlet.cc/ kate spade outlet online
    http://www.sunglassessm.com/ brand sunglasses
    http://www.michaelkorsoutleto.us/ michael kors outlet
    http://www.yeezyboost350.us.org/ Yeezy Boost 350
    http://www.polo-outlet.co.uk/ polo outlet
    http://www.pradabagsoutlet.org/ authentic prada handbags outlet
    http://www.michaelkorsoutletbing.us/ michael kors outlet
    http://www.coach--bags.us/ coach bags
    http://www.pandora-rings.com/ pandora rings
    http://www.michaelkorsoutletcity.us/ michael kors outlet
    http://www.paulsmith.org.uk/ paul smith sale
    http://www.pandora-bracelets.us pandora bracelets
    http://www.coach-australia.com.au/ coach australia
    http://www.oakley-sunglasses.net.au oakley sunglasses
    http://www.pandora-charms.us/ pandora charms
    http://www.ubiae.fr/ veronique billat
    http://www.ray-ban-sunglasses.com.au ray-ban sunglasses
    http://www.burberry.org.au burberry
    http://www.pradabags.co/ prada bag
    http://www.pandoracharmssale.org.uk/ pandora charms sale
    http://www.abercrombiefitch.fr/ abercrombie paris
    http://www.jordanshoes.co/ jordan shoes
    http://www.louisvuitton-outlet.org louis vuitton outlet
    http://www.katespadeoutlet.ca/ kate spade outlet
    http://www.nikehuarache.co/ nike huarache
    http://www.burberrypurse.com/ burberry purse
    http://www.michaelkorsblackfridayoutlets.us/ michael kors black friday
    http://www.coachoutletonline.info/ coach online
    http://www.abercrombieandfitchoutlet.net/ abercrombie and fitch
    http://www.mizunoshoes.us/ Mizuno Running Shoes
    http://www.michaelkors--handbags.us/ michael kors outlet
    http://www.longchampoutlet.cc/ longchamp outlet
    http://www.nike.net.au nike australia
    http://www.nike-airmax.org/ nike air max
    http://www.coach-factory-outlet.net/ coach outlet
    http://www.pandora-bracelet-charms.us pandora bracelet
    http://www.coach-sunglasses.co/ coach sunglasses for women
    http://www.nike-air-jordan.us/ Nike Air Jordan
    http://www.pandora-rings.org/ pandora rings
    http://www.nike-jordan-shoes.us/ nike jordan
    http://www.michael-kors.net/ michael kors handbags
    http://www.prada-outlet.co/ prada outlet
    http://www.mizunoshop.us/ Mizuno Shop Japan
    http://www.chanel.net.au/ chanel australia
    http://www.pandora.org.au/ pandora australia
    http://www.asicsshoes.com.au/ asics shoes
    http://www.michaelkorsoutlet.info/ michael kors outlet
    http://www.coach--purses.us/ coach purses
    http://www.pandoranecklace.us/ pandora necklaces
    http://www.pradaoutlet.cc/ prada outlet prices
    http://www.coach-outlet-online.org/ coach outlet
    http://www.pradabags.co/ prada bags
    http://www.coach-outlet-online.co Coach outlet online
    http://www.prada-handbags.us.org/ prada handbags
    http://www.michaelkorsbags.co/ michael kors bags
    http://www.nike-id.us/ nike shox
    http://www.mlb-shop.net/ mlb.com
    http://www.mizunoshop.us/ MIZUNO Shop US
    http://www.prada-outlet.us.com/ prada outlet
    http://www.prada-bags.us.com/ prada bags
    http://www.ray-ban-sunglasses.net/ ray ban sunglasses
    http://www.kd8.us/ Nike KD 8
    http://www.kd8.us/ Kevin Durant Shoes
    http://www.michael-korsoutlet.org/ michael kors outlet
    http://www.michaelkorsoutlet.ca/ Michael Kors Canada
    http://www.coach--outlet.org/ coach outlet
    http://www.longchampoutlet.cc/ longchamp outlet
    http://www.abercrombieandfitchsale.us/ abercrombie and fitch
    http://www.prada-bags.org/ prada bags
    http://www.beatsbydre.net.au/ beats headphones
    http://www.katespadeoutlet.nom.co/ kate spade outlet
    http://www.prada-outlet.co/ prada factory outlet
    http://www.michael-korsoutlet.com.co/ michael kors outlet
    http://www.pandora-rings.co.uk/ pandora rings
    http://www.joebuy.com/ china factory sale
    http://www.michael-korsoutlet.com/ michael kors outlet online
    http://www.coach-outlet-online.us/ coach factory outlet
    http://www.coachoutlet.nom.co/ coach outlet online
    http://www.nikejordan.co/ Nike Jordans
    http://www.louisvuittonoutlet8.com louis vuitton outlet
    http://www.pandora-charms.us/ pandora.com
    http://www.michaelkorsoutletbags.us/ michael kors outlet bags
    me adc4.8
  3. yomybaby
    업로드시 "Please use AWS4-HMAC-SHA256" 관련 에러가 나는 분들은 aws cli를 apt-get으로 설치하지 말고 공식 가이드에 있는 것처럼 pip를 통해 설치해보세요.

    두 설치방법에 따라 설치되는 버전이 다르더군요. pip 설치한 이후에는 위와 같은 에러가 나지 않았습니다.
    대화보기
    • s3에 업로드한 후 tmp폴더를 비우려면 어떻게 하면 좋을까요?
    • fred
      저도 아래와 같은 오류가 나는데...왜 그런걸까요?

      Fatal error: Uncaught Aws\S3\Exception\InvalidRequestException: AWS Error Code: InvalidRequest, Status Code: 400, AWS Request ID: 7F5D777C82EE9538, AWS Error Type: client, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256., User-Agent: aws-sdk-php2/2.8.27 Guzzle/3.9.3 curl/7.40.0 PHP/5.3.29 thrown in /var/www/html/funfunlife.net/vendor/aws/aws-sdk-php/src/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91
    • hohyoung
      파일이 유효하고, 성공적으로 업로드 되었습니다. Fatal error: Uncaught Aws\S3\Exception\InvalidRequestException: AWS Error Code: InvalidRequest, Status Code: 400, AWS Request ID: 7F5D777C82EE9538, AWS Error Type: client, AWS Error Message: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256., User-Agent: aws-sdk-php2/2.8.27 Guzzle/3.9.3 curl/7.40.0 PHP/5.3.29 thrown in /var/www/html/funfunlife.net/vendor/aws/aws-sdk-php/src/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91


      이런 오류가 나는데 왜그런걸까요?? ㅡㅡ
    • 김종진
      유저권한 설정어떻게하셔서해결하셨나요
      대화보기
      • 김종진
        유저권한 설정어떻게하셔서해결하셨나요
        대화보기
        • 김종진
          파일이 유효하고, 성공적으로 업로드 되었습니다.
          Fatal error: Class 'Aws\Common\Aws' not found in /var/www/html/aws-sdk-php-master/s3_receiver.php on line 26

          26번 라인 코드시작입니다 $s3 = Aws::factory(array(
        • 용용이
          바보같이 유저 권한설정을 안해줬었네요;;;

          다시 한번 좋은 강좌 감사합니다!!!
        • 용용이
          파일이 유효하고, 성공적으로 업로드 되었습니다.
          Fatal error: Uncaught Aws\S3\Exception\AccessDeniedException: AWS Error Code: AccessDenied, Status Code: 403, AWS Request ID: B7CB39EB6BA35A10, AWS Error Type: client, AWS Error Message: Access Denied, User-Agent: aws-sdk-php2/2.8.3 Guzzle/3.9.3 curl/7.35.0 PHP/5.5.9-1ubuntu4.9 thrown in /var/www/aws-sdk-php-master/src/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91

          이런 에러가 뜨는데 secret access key 가 잘못된건가요??
          구글링 해도 잘 모르겠어요..ㅠㅠ

          좋은 강좌 잘봤습니다!!
        • 까만거북이
          이고잉님, "PHP 파일 다루기"의 링크 URL이 깨진 것 같습니다. 수정 부탁드립니다! :)
        • egoing
          도움 주셔서 감사합니다!
          대화보기
          • openhiun
            튜토리얼대로 따라했는데 안되시는 분들은 SDK로딩하는
            require './vendor/autoload.php';
            부분을
            require './aws-sdk-php-master/vendor/autoload.php';
            로 바꾸어서 해보시면 좋을것 같습니다.
            unzip으로 압축풀어보면 sdk가 담겨있는 폴더가 aws-sdk-php-master이기 때문에 저 폴더경로를 포함해서
            SDK를 로딩해주는 autoload.php를 require해주는것이 좋을것 같습니다.
            좋은 강좌 잘봤습니다.
          • oobba
            수정했습니다
            Xshell 4 메뉴 - 인코딩 (utf-8)
          • Guest
            수정완료
          • egoing
            방금 수정했습니다.
            대화보기
            • oobba
              한글깨짐..??.수정했습니다.
            버전 관리
            egoing
            현재 버전
            선택 버전
            graphittie 자세히 보기