AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-05-04 · Documentation low

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

Summary

Added resource tagging to IAM role and Lambda functions in CloudWatch example

Security assessment

Changes add organizational tags without modifying security permissions, addressing vulnerabilities, or documenting security features

Diff

diff --git a/code-library/latest/ug/cloudwatch_example_iam_GettingStarted_032_section.md b/code-library/latest/ug/cloudwatch_example_iam_GettingStarted_032_section.md
index 864a5306e..6a8b27f7e 100644
--- a//code-library/latest/ug/cloudwatch_example_iam_GettingStarted_032_section.md
+++ b//code-library/latest/ug/cloudwatch_example_iam_GettingStarted_032_section.md
@@ -193 +193 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    ROLE_OUTPUT=$(log_cmd "aws iam create-role --role-name '$ROLE_NAME' --assume-role-policy-document file://trust-policy.json --output json")
+    ROLE_OUTPUT=$(log_cmd "aws iam create-role --role-name '$ROLE_NAME' --assume-role-policy-document file://trust-policy.json --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudwatch-streams --output json")
@@ -247 +247 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    LAMBDA1_OUTPUT=$(log_cmd "aws lambda create-function --function-name '$LAMBDA_FUNCTION1' --runtime python3.11 --role '$ROLE_ARN' --handler lambda_function.handler --zip-file fileb://lambda_function.zip --timeout 30 --memory-size 128")
+    LAMBDA1_OUTPUT=$(log_cmd "aws lambda create-function --function-name '$LAMBDA_FUNCTION1' --runtime python3.11 --role '$ROLE_ARN' --handler lambda_function.handler --zip-file fileb://lambda_function.zip --timeout 30 --memory-size 128 --tags project=doc-smith,tutorial=cloudwatch-streams")
@@ -252 +252 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    LAMBDA2_OUTPUT=$(log_cmd "aws lambda create-function --function-name '$LAMBDA_FUNCTION2' --runtime python3.11 --role '$ROLE_ARN' --handler lambda_function.handler --zip-file fileb://lambda_function.zip --timeout 30 --memory-size 128")
+    LAMBDA2_OUTPUT=$(log_cmd "aws lambda create-function --function-name '$LAMBDA_FUNCTION2' --runtime python3.11 --role '$ROLE_ARN' --handler lambda_function.handler --zip-file fileb://lambda_function.zip --timeout 30 --memory-size 128 --tags project=doc-smith,tutorial=cloudwatch-streams")