diff --git a/php/example_code/class_examples/CommandPool.php b/php/example_code/class_examples/CommandPool.php index d3aa06993d0..36feac6a10b 100644 --- a/php/example_code/class_examples/CommandPool.php +++ b/php/example_code/class_examples/CommandPool.php @@ -37,7 +37,7 @@ $s3Service = new S3Service($client, true); -$bucket = 'my-bucket-' . uniqid(); // This bucket will be deleted at the end of this example. +$bucket = 'amzn-s3-demo-bucket-' . uniqid(); // This bucket will be deleted at the end of this example. $client->createBucket([ "Bucket" => $bucket, diff --git a/php/example_code/cloudfront/CreateDistributionS3.php b/php/example_code/cloudfront/CreateDistributionS3.php index 7cdae2b0856..edc47482a15 100644 --- a/php/example_code/cloudfront/CreateDistributionS3.php +++ b/php/example_code/cloudfront/CreateDistributionS3.php @@ -50,7 +50,7 @@ function createS3Distribution($cloudFrontClient, $distribution) function createsTheS3Distribution() { $originName = 'my-unique-origin-name'; - $s3BucketURL = 'my-bucket-name.s3.amazonaws.com'; + $s3BucketURL = 'amzn-s3-demo-bucket.s3.amazonaws.com'; $callerReference = 'my-unique-caller-reference'; $comment = 'my-comment-about-this-distribution'; $defaultCacheBehavior = [ diff --git a/php/example_code/cloudfront/old_tests/CreateDistributionS3Test.php b/php/example_code/cloudfront/old_tests/CreateDistributionS3Test.php index 2a65bf09728..8cf9991a45c 100644 --- a/php/example_code/cloudfront/old_tests/CreateDistributionS3Test.php +++ b/php/example_code/cloudfront/old_tests/CreateDistributionS3Test.php @@ -24,7 +24,7 @@ public function testCreatesAnS3Distribution() require(__DIR__ . '/../CreateDistributionS3.php'); $originName = 'my-unique-origin-name'; - $s3BucketURL = 'my-bucket-name.s3.amazonaws.com'; + $s3BucketURL = 'amzn-s3-demo-bucket.s3.amazonaws.com'; $callerReference = 'my-unique-caller-reference'; $comment = 'my-comment-about-this-distribution'; $defaultCacheBehavior = [ diff --git a/php/example_code/cloudfront/old_tests/DisableDistributionS3Test.php b/php/example_code/cloudfront/old_tests/DisableDistributionS3Test.php index 4f33c89bdfe..6171756575a 100644 --- a/php/example_code/cloudfront/old_tests/DisableDistributionS3Test.php +++ b/php/example_code/cloudfront/old_tests/DisableDistributionS3Test.php @@ -82,7 +82,7 @@ protected function setUp(): void 'Origins' => [ 'Items' => [ [ - 'DomainName' => 'my-bucket-name.s3.amazonaws.com', + 'DomainName' => 'amzn-s3-demo-bucket.s3.amazonaws.com', 'Id' => 'my-unique-origin-name', 'OriginPath' => '', 'CustomHeaders' => [ diff --git a/php/example_code/cloudfront/old_tests/UpdateDistributionS3Test.php b/php/example_code/cloudfront/old_tests/UpdateDistributionS3Test.php index addaac43567..c6e0527f8fb 100644 --- a/php/example_code/cloudfront/old_tests/UpdateDistributionS3Test.php +++ b/php/example_code/cloudfront/old_tests/UpdateDistributionS3Test.php @@ -82,7 +82,7 @@ protected function setUp(): void 'Origins' => [ 'Items' => [ [ - 'DomainName' => 'my-bucket-name.s3.amazonaws.com', + 'DomainName' => 'amzn-s3-demo-bucket.s3.amazonaws.com', 'Id' => 'my-unique-origin-name', 'OriginPath' => '', 'CustomHeaders' => [ diff --git a/php/example_code/cloudwatch/DescribeAlarmsForMetric.php b/php/example_code/cloudwatch/DescribeAlarmsForMetric.php index 8e7640aa74e..859d9f5c174 100644 --- a/php/example_code/cloudwatch/DescribeAlarmsForMetric.php +++ b/php/example_code/cloudwatch/DescribeAlarmsForMetric.php @@ -79,7 +79,7 @@ function describeTheAlarmsForMetric() ], [ 'Name' => 'BucketName', - 'Value' => 'my-bucket' + 'Value' => 'amzn-s3-demo-bucket' ] ]; diff --git a/php/example_code/cloudwatch/GetMetricStatistics.php b/php/example_code/cloudwatch/GetMetricStatistics.php index 80721d05f4d..8571f212332 100644 --- a/php/example_code/cloudwatch/GetMetricStatistics.php +++ b/php/example_code/cloudwatch/GetMetricStatistics.php @@ -147,7 +147,7 @@ function getTheMetricStatistics() ], [ 'Name' => 'BucketName', - 'Value' => 'my-bucket' + 'Value' => 'amzn-s3-demo-bucket' ] ]; $startTime = strtotime('-3 days'); diff --git a/php/example_code/cloudwatch/old_tests/DescribeAlarmsForMetricTest.php b/php/example_code/cloudwatch/old_tests/DescribeAlarmsForMetricTest.php index a9cf3445a5b..92bc92e72fa 100644 --- a/php/example_code/cloudwatch/old_tests/DescribeAlarmsForMetricTest.php +++ b/php/example_code/cloudwatch/old_tests/DescribeAlarmsForMetricTest.php @@ -32,7 +32,7 @@ public function testDescribesAlarmsForAMetric() ], [ 'Name' => 'BucketName', - 'Value' => 'my-bucket' + 'Value' => 'amzn-s3-demo-bucket' ] ]; diff --git a/php/example_code/lambda/GettingStartedWithLambda.php b/php/example_code/lambda/GettingStartedWithLambda.php index bcd965466e2..3b1d4760d31 100644 --- a/php/example_code/lambda/GettingStartedWithLambda.php +++ b/php/example_code/lambda/GettingStartedWithLambda.php @@ -53,7 +53,7 @@ public function run() echo "Attached the AWSLambdaBasicExecutionRole to {$role['RoleName']}.\n"; echo "\nNow let's create an S3 bucket and upload our Lambda code there.\n"; - $bucketName = "test-example-bucket-$uniqid"; + $bucketName = "amzn-s3-demo-bucket-$uniqid"; $s3client->createBucket([ 'Bucket' => $bucketName, ]); diff --git a/php/example_code/lambda/tests/LambdaTest.php b/php/example_code/lambda/tests/LambdaTest.php index 42349d34bf0..80396b5e520 100644 --- a/php/example_code/lambda/tests/LambdaTest.php +++ b/php/example_code/lambda/tests/LambdaTest.php @@ -53,7 +53,7 @@ public function testSingleActionCalls() } ] }"; - $bucketName = "test-example-bucket-$uniqid"; + $bucketName = "amzn-s3-demo-bucket-$uniqid"; $this->s3client->createBucket([ 'Bucket' => $bucketName, ]); diff --git a/php/example_code/s3/CreateBucket.php b/php/example_code/s3/CreateBucket.php index 4a88c74eb85..6a8fd8816bb 100644 --- a/php/example_code/s3/CreateBucket.php +++ b/php/example_code/s3/CreateBucket.php @@ -46,7 +46,7 @@ function createTheBucket() 'version' => '2006-03-01' ]); - echo createBucket($s3Client, 'my-bucket'); + echo createBucket($s3Client, 'amzn-s3-demo-bucket'); } // Uncomment the following line to run this code in an AWS account. diff --git a/php/example_code/s3/ErrorHandling.php b/php/example_code/s3/ErrorHandling.php index 473206424dc..70c22cc3774 100644 --- a/php/example_code/s3/ErrorHandling.php +++ b/php/example_code/s3/ErrorHandling.php @@ -33,7 +33,7 @@ $s3Client = $sdk->createS3(); try { - $s3Client->createBucket(['Bucket' => 'my-bucket']); + $s3Client->createBucket(['Bucket' => 'amzn-s3-demo-bucket']); } catch (S3Exception $e) { // Catch an S3 specific exception. echo $e->getMessage(); @@ -53,7 +53,7 @@ // snippet-start:[s3.php.error_handling.async] //Asynchronous Error Handling // snippet-start:[s3.php.error_handling.promise] -$promise = $s3Client->createBucketAsync(['Bucket' => 'my-bucket']); +$promise = $s3Client->createBucketAsync(['Bucket' => 'amzn-s3-demo-bucket']); // snippet-end:[s3.php.error_handling.promise] $promise->otherwise(function ($reason) { var_dump($reason); diff --git a/php/example_code/s3/PutObjectServiceOperations.php b/php/example_code/s3/PutObjectServiceOperations.php index 0afd035e918..49319666234 100644 --- a/php/example_code/s3/PutObjectServiceOperations.php +++ b/php/example_code/s3/PutObjectServiceOperations.php @@ -36,14 +36,14 @@ // Send a PutObject request and get the result object. $result = $s3Client->putObject([ - 'Bucket' => 'my-bucket', + 'Bucket' => 'amzn-s3-demo-bucket', 'Key' => 'my-key', 'Body' => 'this is the body!' ]); // Download the contents of the object. $result = $s3Client->getObject([ - 'Bucket' => 'my-bucket', + 'Bucket' => 'amzn-s3-demo-bucket', 'Key' => 'my-key' ]); diff --git a/php/example_code/s3/s3BucketAcl.php b/php/example_code/s3/s3BucketAcl.php index 539cdd8ff04..cd8f4e4100b 100644 --- a/php/example_code/s3/s3BucketAcl.php +++ b/php/example_code/s3/s3BucketAcl.php @@ -26,7 +26,7 @@ ]); // Gets the access control policy for a bucket -$bucket = 'my-s3-bucket'; +$bucket = 'amzn-s3-demo-bucket'; try { $resp = $s3Client->getBucketAcl([ 'Bucket' => $bucket diff --git a/php/example_code/s3/s3BucketPolicy.php b/php/example_code/s3/s3BucketPolicy.php index 4124cb55ca4..10e81cf7814 100644 --- a/php/example_code/s3/s3BucketPolicy.php +++ b/php/example_code/s3/s3BucketPolicy.php @@ -25,7 +25,7 @@ 'version' => '2006-03-01' ]); -$bucket = 'my-s3-bucket'; +$bucket = 'amzn-s3-demo-bucket'; // Get the policy of a specific bucket try { diff --git a/php/example_code/s3/s3ObjectAcl.php b/php/example_code/s3/s3ObjectAcl.php index 76f62bbbdb0..8f25fc3d2ab 100644 --- a/php/example_code/s3/s3ObjectAcl.php +++ b/php/example_code/s3/s3ObjectAcl.php @@ -19,7 +19,7 @@ ]); // Gets the access control list (ACL) of an object. -$bucket = 'my-s3-bucket'; +$bucket = 'amzn-s3-demo-bucket'; $key = 'my-object'; try { $resp = $s3Client->getObjectAcl([ diff --git a/php/example_code/s3/s3WebHost.php b/php/example_code/s3/s3WebHost.php index 28aa3581891..667e8765d88 100644 --- a/php/example_code/s3/s3WebHost.php +++ b/php/example_code/s3/s3WebHost.php @@ -26,7 +26,7 @@ ]); // Retrieving the Bucket Website Configuration -$bucket = 'my-s3-bucket'; +$bucket = 'amzn-s3-demo-bucket'; try { $resp = $s3Client->getBucketWebsite([ 'Bucket' => $bucket