AWS Security ChangesHomeSearch

AWS code-library medium security documentation change

Service: code-library · 2025-10-25 · Security-related medium

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

Summary

Updated Java ACM certificate import example to implement argument validation and remove hardcoded values.

Security assessment

Identical to the other ACM code example change, this enforces secure input handling by requiring proper command-line arguments instead of hardcoded sensitive values like bucket names and certificate keys.

Diff

diff --git a/code-library/latest/ug/java_2_acm_code_examples.md b/code-library/latest/ug/java_2_acm_code_examples.md
index f8585ab7f..ec2f17670 100644
--- a//code-library/latest/ug/java_2_acm_code_examples.md
+++ b//code-library/latest/ug/java_2_acm_code_examples.md
@@ -365,8 +365,8 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-            //if (args.length != 3) {
-            //    System.out.println(usage);
-            //    return;
-           // }
-    
-            String bucketName = "certbucket100" ; //args[0];
-            String certificateKey = "certificate.pem" ; // args[1];
-            String privateKeyKey = "private_key.pem" ; //args[2];
+            if (args.length != 3) {
+                System.out.println(usage);
+                return;
+            }
+    
+            String bucketName = args[0];
+            String certificateKey = args[1];
+            String privateKeyKey = args[2];