AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-25 · Documentation low

File: code-library/latest/ug/s3_example_s3_PutBucketPolicy_section.md

Summary

Added SAP ABAP SDK code example for PutBucketPolicy API with policy JSON example

Security assessment

Documents bucket policy configuration which is a security feature for access control, but no evidence of addressing a security vulnerability.

Diff

diff --git a/code-library/latest/ug/s3_example_s3_PutBucketPolicy_section.md b/code-library/latest/ug/s3_example_s3_PutBucketPolicy_section.md
index ffec5f270..667671341 100644
--- a//code-library/latest/ug/s3_example_s3_PutBucketPolicy_section.md
+++ b//code-library/latest/ug/s3_example_s3_PutBucketPolicy_section.md
@@ -426,0 +427,29 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+SAP ABAP
+    
+
+**SDK for SAP ABAP**
+    
+
+###### Note
+
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/s3#code-examples). 
+    
+    
+        TRY.
+            " Example policy JSON string
+            " iv_policy = '{"Version":"2012-10-17",		 	 	 "Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:user/user"},"Action":["s3:GetObject"],"Resource":["arn:aws:s3:::bucketname/*"]}]}'
+            lo_s3->putbucketpolicy(
+              iv_bucket = iv_bucket_name
+              iv_policy = iv_policy ).
+            MESSAGE 'Bucket policy set.' TYPE 'I'.
+          CATCH /aws1/cx_s3_nosuchbucket.
+            MESSAGE 'Bucket does not exist.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [PutBucketPolicy](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+