AWS Security ChangesHomeSearch

AWS AmazonS3 documentation change

Service: AmazonS3 · 2025-08-22 · Documentation low

File: AmazonS3/latest/userguide/upload-objects.md

Summary

Replaced detailed Java SDK code example with links to external API reference documentation for object upload methods

Security assessment

The change removes implementation details but doesn't address security vulnerabilities or introduce security-related content. It's a documentation restructuring to reference external resources rather than a security-focused update.

Diff

diff --git a/AmazonS3/latest/userguide/upload-objects.md b/AmazonS3/latest/userguide/upload-objects.md
index 12a030819..926d2932b 100644
--- a//AmazonS3/latest/userguide/upload-objects.md
+++ b//AmazonS3/latest/userguide/upload-objects.md
@@ -239,55 +239 @@ Java
-The following example creates two objects. The first object has a text string as data, and the second object is a file. The example creates the first object by specifying the bucket name, object key, and text data directly in a call to `AmazonS3Client.putObject()`. The example creates the second object by using a `PutObjectRequest` that specifies the bucket name, object key, and file path. The `PutObjectRequest` also specifies the `ContentType` header and title metadata.
-
-For instructions on creating and testing a working sample, see [Getting Started](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/getting-started.html) in the AWS SDK for Java Developer Guide.
-    
-    
-    import com.amazonaws.AmazonServiceException;
-    import com.amazonaws.SdkClientException;
-    import com.amazonaws.regions.Regions;
-    import com.amazonaws.services.s3.AmazonS3;
-    import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-    import com.amazonaws.services.s3.model.ObjectMetadata;
-    import com.amazonaws.services.s3.model.PutObjectRequest;
-    
-    import java.io.File;
-    import java.io.IOException;
-    
-    public class UploadObject {
-    
-        public static void main(String[] args) throws IOException {
-            Regions clientRegion = Regions.DEFAULT_REGION;
-            String bucketName = "*** Bucket name ***";
-            String stringObjKeyName = "*** String object key name ***";
-            String fileObjKeyName = "*** File object key name ***";
-            String fileName = "*** Path to file to upload ***";
-    
-            try {
-                // This code expects that you have AWS credentials set up per:
-                // https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html
-                AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
-                        .withRegion(clientRegion)
-                        .build();
-    
-                // Upload a text string as a new object.
-                s3Client.putObject(bucketName, stringObjKeyName, "Uploaded String Object");
-    
-                // Upload a file as a new object with ContentType and title specified.
-                PutObjectRequest request = new PutObjectRequest(bucketName, fileObjKeyName, new File(fileName));
-                ObjectMetadata metadata = new ObjectMetadata();
-                metadata.setContentType("plain/text");
-                metadata.addUserMetadata("title", "someTitle");
-                request.setMetadata(metadata);
-                s3Client.putObject(request);
-            } catch (AmazonServiceException e) {
-                // The call was transmitted successfully, but Amazon S3 couldn't process
-                // it, so it returned an error response.
-                e.printStackTrace();
-            } catch (SdkClientException e) {
-                // Amazon S3 couldn't be contacted for a response, or the client
-                // couldn't parse the response from Amazon S3.
-                e.printStackTrace();
-            }
-        }
-    }
-    
-    
+For information about uploading objects with the AWS SDK for Java, see [Use PutObject with an AWS SDK or CLI](https://docs.aws.amazon.com/AmazonS3/latest/API/s3_example_s3_PutObject_section.html) and [Recursively upload a local directory to an Amazon Simple Storage Service (Amazon S3) bucket](https://docs.aws.amazon.com/AmazonS3/latest/API/s3_example_s3_Scenario_UploadDirToS3_section.html) in the _Amazon S3 API Reference_.