javav2/example_code/s3/README.md
Shows how to use the AWS SDK for Java 2.x to work with Amazon Simple Storage Service (Amazon S3).
<!--custom.overview.start--> <!--custom.overview.end-->Amazon S3 is storage for the internet. You can use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web.
For prerequisites, see the README in the javav2 folder.
ListBuckets)Code examples that show you how to perform the essential operations within a service.
Code excerpts that show you how to call individual service functions.
Code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
This example shows you how to get started using Amazon S3.
This example shows you how to do the following:
This example shows you how to check if a bucket exists.
<!--custom.scenario_prereqs.s3_Scenario_DoesBucketExist.start--> <!--custom.scenario_prereqs.s3_Scenario_DoesBucketExist.end--> <!--custom.scenarios.s3_Scenario_DoesBucketExist.start--> <!--custom.scenarios.s3_Scenario_DoesBucketExist.end-->This example shows you how to how to delete or stop incomplete Amazon S3 multipart uploads.
<!--custom.scenario_prereqs.s3_Scenario_AbortMultipartUpload.start--> <!--custom.scenario_prereqs.s3_Scenario_AbortMultipartUpload.end--> <!--custom.scenarios.s3_Scenario_AbortMultipartUpload.start--> <!--custom.scenarios.s3_Scenario_AbortMultipartUpload.end-->This example shows you how to download and filter the contents of Amazon S3 bucket 'directories'.
<!--custom.scenario_prereqs.s3_Scenario_DownloadS3Directory.start--> <!--custom.scenario_prereqs.s3_Scenario_DownloadS3Directory.end--> <!--custom.scenarios.s3_Scenario_DownloadS3Directory.start--> <!--custom.scenarios.s3_Scenario_DownloadS3Directory.end-->This example shows you how to download all objects in an Amazon Simple Storage Service (Amazon S3) bucket to a local directory.
<!--custom.scenario_prereqs.s3_DownloadBucketToDirectory.start--> <!--custom.scenario_prereqs.s3_DownloadBucketToDirectory.end--> <!--custom.scenarios.s3_DownloadBucketToDirectory.start--> <!--custom.scenarios.s3_DownloadBucketToDirectory.end-->This example shows you how to work with S3 object lock features.
<!--custom.scenario_prereqs.s3_Scenario_ObjectLock.start--> <!--custom.scenario_prereqs.s3_Scenario_ObjectLock.end--> <!--custom.scenarios.s3_Scenario_ObjectLock.start--> <!--custom.scenarios.s3_Scenario_ObjectLock.end-->This example shows you how to use the Amazon SQS Extended Client Library to work with large Amazon SQS messages.
<!--custom.scenario_prereqs.sqs_Scenario_SqsExtendedClient.start--> <!--custom.scenario_prereqs.sqs_Scenario_SqsExtendedClient.end--> <!--custom.scenarios.sqs_Scenario_SqsExtendedClient.start--> <!--custom.scenarios.sqs_Scenario_SqsExtendedClient.end-->This example shows you how to parse Amazon S3 URIs to extract important components like the bucket name and object key.
<!--custom.scenario_prereqs.s3_Scenario_URIParsing.start--> <!--custom.scenario_prereqs.s3_Scenario_URIParsing.end--> <!--custom.scenarios.s3_Scenario_URIParsing.start--> <!--custom.scenarios.s3_Scenario_URIParsing.end-->This example shows you how to work with S3 event notifications in an object-oriented way.
<!--custom.scenario_prereqs.s3_Scenario_ProcessS3EventNotification.start--> <!--custom.scenario_prereqs.s3_Scenario_ProcessS3EventNotification.end--> <!--custom.scenarios.s3_Scenario_ProcessS3EventNotification.start--> <!--custom.scenarios.s3_Scenario_ProcessS3EventNotification.end-->This example shows you how to enable a bucket to send S3 event notifications to EventBridge and route notifications to an Amazon SNS topic and Amazon SQS queue.
<!--custom.scenario_prereqs.s3_Scenario_PutBucketNotificationConfiguration.start--> <!--custom.scenario_prereqs.s3_Scenario_PutBucketNotificationConfiguration.end--> <!--custom.scenarios.s3_Scenario_PutBucketNotificationConfiguration.start--> <!--custom.scenarios.s3_Scenario_PutBucketNotificationConfiguration.end-->This example shows you how to track an Amazon S3 object upload or download.
<!--custom.scenario_prereqs.s3_Scenario_TrackUploadDownload.start--> <!--custom.scenario_prereqs.s3_Scenario_TrackUploadDownload.end--> <!--custom.scenarios.s3_Scenario_TrackUploadDownload.start--> <!--custom.scenarios.s3_Scenario_TrackUploadDownload.end-->This example shows you how to upload a local directory recursively to an Amazon Simple Storage Service (Amazon S3) bucket.
<!--custom.scenario_prereqs.s3_UploadDirectoryToBucket.start--> <!--custom.scenario_prereqs.s3_UploadDirectoryToBucket.end--> <!--custom.scenarios.s3_UploadDirectoryToBucket.start--> <!--custom.scenarios.s3_UploadDirectoryToBucket.end-->This example shows you how to upload or download large files to and from Amazon S3.
<!--custom.scenario_prereqs.s3_Scenario_UsingLargeFiles.start--> <!--custom.scenario_prereqs.s3_Scenario_UsingLargeFiles.end--> <!--custom.scenarios.s3_Scenario_UsingLargeFiles.start--> <!--custom.scenarios.s3_Scenario_UsingLargeFiles.end-->This example shows you how to upload a stream of unknown size to an Amazon S3 object.
<!--custom.scenario_prereqs.s3_Scenario_UploadStream.start--> <!--custom.scenario_prereqs.s3_Scenario_UploadStream.end--> <!--custom.scenarios.s3_Scenario_UploadStream.start--> <!--custom.scenarios.s3_Scenario_UploadStream.end-->This example shows you how to use checksums to work with an Amazon S3 object.
<!--custom.scenario_prereqs.s3_Scenario_UseChecksums.start--> <!--custom.scenario_prereqs.s3_Scenario_UseChecksums.end--> <!--custom.scenarios.s3_Scenario_UseChecksums.start--> <!--custom.scenarios.s3_Scenario_UseChecksums.end-->⚠ Running tests might result in charges to your AWS account.
To find instructions for running these tests, see the README
in the javav2 folder.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0