AWS code-library documentation change
Summary
Code formatting changes and error message type adjustments (E->W). Added role ARN retrieval and usage in Lambda creation.
Security assessment
Changes are primarily code style improvements and error handling adjustments (changing message types from error to warning). While role ARN handling relates to permissions, there's no evidence of addressing a specific security vulnerability or adding new security documentation.
Diff
diff --git a/code-library/latest/ug/sap-abap_1_lambda_code_examples.md b/code-library/latest/ug/sap-abap_1_lambda_code_examples.md index 5b1d1640e..bf7864f0b 100644 --- a/code-library/latest/ug/sap-abap_1_lambda_code_examples.md +++ b/code-library/latest/ug/sap-abap_1_lambda_code_examples.md @@ -75,2 +75,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_description = 'Grant lambda permission to write to logs' - ). + iv_description = 'Grant lambda permission to write to logs' ). + DATA(lv_role_arn) = lo_create_role_output->get_role( )->get_arn( ). @@ -80 +80,2 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - MESSAGE 'IAM role already exists.' TYPE 'E'. + DATA(lo_role) = lo_iam->getrole( iv_rolename = iv_role_name ). + lv_role_arn = lo_role->get_role( )->get_arn( ). @@ -90,2 +91 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_policyarn = 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole' - ). + iv_policyarn = 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole' ). @@ -109 +109 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_role = lo_create_role_output->get_role( )->get_arn( ) + iv_role = lv_role_arn @@ -112,2 +112 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_description = 'AWS Lambda code example' - ). + iv_description = 'AWS Lambda code example' ). @@ -137,2 +136 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - `}` - ). + `}` ). @@ -141,2 +139 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_payload = lv_json - ). + iv_payload = lv_json ). @@ -163,2 +160 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_zipfile = io_updated_zip_file - ). + iv_zipfile = io_updated_zip_file ). @@ -184,2 +180 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - io_environment = NEW /aws1/cl_lmdenvironment( it_variables = lt_variables ) - ). + io_environment = NEW /aws1/cl_lmdenvironment( it_variables = lt_variables ) ). @@ -202,2 +197 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - `}` - ). + `}` ). @@ -206,2 +200 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_payload = lv_json - ). + iv_payload = lv_json ). @@ -239 +232 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - MESSAGE 'The requested resource does not exist.' TYPE 'E'. + MESSAGE 'The requested resource does not exist.' TYPE 'W'. @@ -246,2 +239 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_policyarn = 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole' - ). + iv_policyarn = 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole' ). @@ -252 +244 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - MESSAGE 'The requested resource entity does not exist.' TYPE 'E'. + MESSAGE 'The requested resource entity does not exist.' TYPE 'W'. @@ -264 +256 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - MESSAGE 'The requested resource entity does not exist.' TYPE 'E'. + MESSAGE 'The requested resource entity does not exist.' TYPE 'W'. @@ -314,2 +306 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_description = 'AWS Lambda code example' - ). + iv_description = 'AWS Lambda code example' ). @@ -419,2 +410 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - `}` - ). + `}` ). @@ -423,2 +413 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_payload = lv_json - ). + iv_payload = lv_json ). @@ -495,2 +484 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_zipfile = io_zip_file - ). + iv_zipfile = io_zip_file ). @@ -541,2 +529 @@ There's more on GitHub. Find the complete example and learn how to set up and ru - iv_memorysize = iv_memory_size - ). + iv_memorysize = iv_memory_size ).