AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added SAP ABAP code example for CreateRole API with error handling

Security assessment

Documentation update for SDK implementation. The malformed policy document check is standard input validation. No security incidents or vulnerabilities are mentioned in the change.

Diff

diff --git a/code-library/latest/ug/iam_example_iam_CreateRole_section.md b/code-library/latest/ug/iam_example_iam_CreateRole_section.md
index e9c1d60c5..2e94ac3eb 100644
--- a//code-library/latest/ug/iam_example_iam_CreateRole_section.md
+++ b//code-library/latest/ug/iam_example_iam_CreateRole_section.md
@@ -825,0 +826,31 @@ 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/iam#code-examples). 
+    
+    
+        TRY.
+            oo_result = lo_iam->createrole(
+              iv_rolename = iv_role_name
+              iv_assumerolepolicydocument = iv_assume_role_policy_document ).
+            MESSAGE 'Role created successfully.' TYPE 'I'.
+          CATCH /aws1/cx_iamentityalrdyexex.
+            MESSAGE 'Role already exists.' TYPE 'E'.
+          CATCH /aws1/cx_iammalformedplydocex.
+            MESSAGE 'Assume role policy document is malformed.' TYPE 'E'.
+          CATCH /aws1/cx_iamlimitexceededex.
+            MESSAGE 'Role limit exceeded.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [CreateRole](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+