Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion php/example_code/class_examples/CommandPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/cloudfront/CreateDistributionS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/cloudwatch/DescribeAlarmsForMetric.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function describeTheAlarmsForMetric()
],
[
'Name' => 'BucketName',
'Value' => 'my-bucket'
'Value' => 'amzn-s3-demo-bucket'
]
];

Expand Down
2 changes: 1 addition & 1 deletion php/example_code/cloudwatch/GetMetricStatistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function getTheMetricStatistics()
],
[
'Name' => 'BucketName',
'Value' => 'my-bucket'
'Value' => 'amzn-s3-demo-bucket'
]
];
$startTime = strtotime('-3 days');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testDescribesAlarmsForAMetric()
],
[
'Name' => 'BucketName',
'Value' => 'my-bucket'
'Value' => 'amzn-s3-demo-bucket'
]
];

Expand Down
2 changes: 1 addition & 1 deletion php/example_code/lambda/GettingStartedWithLambda.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/lambda/tests/LambdaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testSingleActionCalls()
}
]
}";
$bucketName = "test-example-bucket-$uniqid";
$bucketName = "amzn-s3-demo-bucket-$uniqid";
$this->s3client->createBucket([
'Bucket' => $bucketName,
]);
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/s3/CreateBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions php/example_code/s3/ErrorHandling.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions php/example_code/s3/PutObjectServiceOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]);

Expand Down
2 changes: 1 addition & 1 deletion php/example_code/s3/s3BucketAcl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/s3/s3BucketPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/s3/s3ObjectAcl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
2 changes: 1 addition & 1 deletion php/example_code/s3/s3WebHost.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]);

// Retrieving the Bucket Website Configuration
$bucket = 'my-s3-bucket';
$bucket = 'amzn-s3-demo-bucket';
try {
$resp = $s3Client->getBucketWebsite([
'Bucket' => $bucket
Expand Down
Loading