Skip to content

Commit 753bb88

Browse files
committed
added S3 Express Scenario
1 parent 5066549 commit 753bb88

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

javav2/example_code/s3/src/main/java/com/example/s3/express/S3DirectoriesScenario.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ private static void cleanUp() {
123123
}
124124
logger.info("Deleted directory bucket " + mdirectoryBucketName);
125125
mdirectoryBucketName = null;
126-
127126
if (mregularBucketName != null) {
128127
s3DirectoriesActions.deleteBucketAndObjectsAsync(mS3RegularClient, mregularBucketName).join();
129128
}
@@ -351,17 +350,6 @@ private static String createSessionAddObjects() {
351350
return bucketObject;
352351
}
353352

354-
/**
355-
* Creates VPC users for the S3 Express One Zone scenario.
356-
* <p>
357-
* This method performs the following steps:
358-
* <ol>
359-
* <li>Optionally creates a new VPC and VPC Endpoint if the application is running in an EC2 instance in the same Availability Zone as the Directory buckets.</li>
360-
* <li>Creates two IAM users: one with S3 Express One Zone permissions and one without.</li>
361-
* </ol>
362-
*
363-
* @return a {@link UserNames} object containing the names of the created IAM users
364-
*/
365353
/**
366354
* Creates VPC users for the S3 Express One Zone scenario.
367355
* <p>
@@ -424,24 +412,6 @@ public static UserNames createVpcUsers() {
424412
return names;
425413
}
426414

427-
/**
428-
* Sets up a Virtual Private Cloud (VPC) in AWS.
429-
* <p>
430-
* This method performs the following steps:
431-
* <ol>
432-
* <li>Creates a VPC with a CIDR block of "10.0.0.0/16".</li>
433-
* <li>Waits for the VPC to become available.</li>
434-
* <li>Retrieves the route table associated with the VPC.</li>
435-
* <li>Creates a VPC endpoint for the S3 service in the VPC.</li>
436-
* </ol>
437-
* <p>
438-
* The method uses the AWS SDK for Java to interact with the EC2 service.
439-
*
440-
* @throws RuntimeException if the VPC wait fails
441-
* @throws Ec2Exception if there is an error creating the VPC endpoint
442-
*/
443-
444-
445415
/**
446416
* Sets up the necessary clients and buckets for the S3 Express service.
447417
*
@@ -482,7 +452,6 @@ public static void setupClientsAndBuckets(String expressUserName, String regular
482452
return;
483453
}
484454

485-
486455
// Create an additional client using the credentials
487456
// with S3 Express permissions.
488457
logger.info("""
@@ -511,7 +480,6 @@ public static void setupClientsAndBuckets(String expressUserName, String regular
511480
(and adhering to least-privilege) is crucial to S3 Express.
512481
""");
513482
waitForInputToContinue(locscanner);
514-
515483
logger.info("""
516484
4. Create two buckets.
517485
Now we will create a Directory bucket which is the linchpin of the S3 Express One Zone service. Directory buckets

0 commit comments

Comments
 (0)