AWS Security ChangesHomeSearch

AWS AmazonS3 documentation change

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

File: AmazonS3/latest/userguide/batch-ops-legal-hold-off.md

Summary

Replaced detailed Java SDK examples for legal hold operations with a link to API reference documentation

Security assessment

While legal hold management relates to data protection, the change only consolidates documentation location. The removed IAM policy example for s3:PutObjectLegalHold was security-relevant but the documentation now points to maintained API references, which should contain equivalent security guidance. No specific vulnerability is addressed.

Diff

diff --git a/AmazonS3/latest/userguide/batch-ops-legal-hold-off.md b/AmazonS3/latest/userguide/batch-ops-legal-hold-off.md
index a82e65bbe..bfca6c374 100644
--- a//AmazonS3/latest/userguide/batch-ops-legal-hold-off.md
+++ b//AmazonS3/latest/userguide/batch-ops-legal-hold-off.md
@@ -97,89 +97 @@ The following example turns off legal hold.
-The following AWS SDK for Java examples show how to use Batch Operations to turn off S3 Object Lock legal holds across multiple objects.
-
-###### Example — Updates the role to grant `s3:PutObjectLegalHold` permissions
-    
-    
-    public void allowPutObjectLegalHold() {
-        final String roleName = "batch_operations-object-lock";
-    
-        final String legalHoldPermissions = "{" +
-                "    \"Version\": \"2012-10-17\"," +
-                "    \"Statement\": [" +
-                "        {" +
-                "            \"Effect\": \"Allow\"," +
-                "            \"Action\": [" +
-                "                \"s3:PutObjectLegalHold\"" +
-                "            ]," +
-                "            \"Resource\": [" +
-                "                \"arn:aws:s3:::amzn-s3-demo-manifest-bucket/*\"" +
-                "            ]" +
-                "        }" +
-                "    ]" +
-                "}";
-    
-        final AmazonIdentityManagement iam =
-                AmazonIdentityManagementClientBuilder.defaultClient();
-    
-        final PutRolePolicyRequest putRolePolicyRequest = new PutRolePolicyRequest()
-                .withPolicyDocument(legalHoldPermissions)
-                .withPolicyName("legal-hold-permissions")
-                .withRoleName(roleName);
-    
-        final PutRolePolicyResult putRolePolicyResult = iam.putRolePolicy(putRolePolicyRequest);
-    }
-
-###### Example — Turn off legal hold
-
-Use the example below if you want to turn off legal hold.
-    
-    
-    public String createLegalHoldOffJob(final AWSS3ControlClient awss3ControlClient) {
-        final String manifestObjectArn = "arn:aws:s3:::amzn-s3-demo-manifest-bucket/legalhold-object-manifest.csv";
-        final String manifestObjectVersionId = "15ad5ba069e6bbc465c77bf83d541385";
-    
-        final JobManifestLocation manifestLocation = new JobManifestLocation()
-                .withObjectArn(manifestObjectArn)
-                .withETag(manifestObjectVersionId);
-    
-        final JobManifestSpec manifestSpec =
-                new JobManifestSpec()
-                        .withFormat(JobManifestFormat.S3BatchOperations_CSV_20180820)
-                        .withFields("Bucket", "Key");
-    
-        final JobManifest manifestToPublicApi = new JobManifest()
-                .withLocation(manifestLocation)
-                .withSpec(manifestSpec);
-    
-        final String jobReportBucketArn = "arn:aws:s3:::amzn-s3-demo-completion-report-bucket";
-        final String jobReportPrefix = "reports/legalhold-objects-batch_operations";
-    
-        final JobReport jobReport = new JobReport()
-                .withEnabled(true)
-                .withReportScope(JobReportScope.AllTasks)
-                .withBucket(jobReportBucketArn)
-                .withPrefix(jobReportPrefix)
-                .withFormat(JobReportFormat.Report_CSV_20180820);
-    
-        final JobOperation jobOperation = new JobOperation()
-                .withS3PutObjectLegalHold(new S3SetObjectLegalHoldOperation()
-                        .withLegalHold(new S3ObjectLockLegalHold()
-                                .withStatus(S3ObjectLockLegalHoldStatus.OFF)));
-    
-        final String roleArn = "arn:aws:iam::123456789012:role/batch_operations-object-lock";
-        final Boolean requiresConfirmation = true;
-        final int priority = 10;
-    
-        final CreateJobRequest request = new CreateJobRequest()
-                .withAccountId("123456789012")
-                .withDescription("Turn off legal hold")
-                .withManifest(manifestToPublicApi)
-                .withOperation(jobOperation)
-                .withPriority(priority)
-                .withRoleArn(roleArn)
-                .withReport(jobReport)
-                .withConfirmationRequired(requiresConfirmation);
-    
-        final CreateJobResult result = awss3ControlClient.createJob(request);
-    
-        return result.getJobId();
-    } 
+For examples of how to use S3 Batch Operations to turn off S3 Object Lock legal hold with the AWS SDK for Java, see [Use CreateJob with an AWS SDK or CLI](https://docs.aws.amazon.com/AmazonS3/latest/API/s3-control_example_s3-control_CreateJob_section.html) in the _Amazon S3 API Reference_.