AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Added resource tagging to CloudMap namespace, DynamoDB table, services, IAM roles, and Lambda functions

Security assessment

Changes exclusively add cost allocation/organizational tags. No evidence of security fixes in service discovery configuration, IAM policies, or Lambda function security settings.

Diff

diff --git a/code-library/latest/ug/servicediscovery_example_cloudmap_CustomAttributes_section.md b/code-library/latest/ug/servicediscovery_example_cloudmap_CustomAttributes_section.md
index 484c623c1..9f77253a9 100644
--- a//code-library/latest/ug/servicediscovery_example_cloudmap_CustomAttributes_section.md
+++ b//code-library/latest/ug/servicediscovery_example_cloudmap_CustomAttributes_section.md
@@ -223 +223 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      OPERATION_ID=$(aws servicediscovery create-http-namespace --name cloudmap-tutorial --creator-request-id "namespace-request-$(date +%s)" --query 'OperationId' --output text)
+      OPERATION_ID=$(aws servicediscovery create-http-namespace --name cloudmap-tutorial --creator-request-id "namespace-request-$(date +%s)" --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudmap-custom-attributes --query 'OperationId' --output text)
@@ -245 +245 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      log_cmd "aws dynamodb create-table --table-name cloudmap --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST"
+      log_cmd "aws dynamodb create-table --table-name cloudmap --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudmap-custom-attributes"
@@ -278 +278 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      CREATE_OUTPUT=$(aws servicediscovery create-service --name data-service --namespace-id "$NAMESPACE_ID" --creator-request-id "data-service-request-$(date +%s)")
+      CREATE_OUTPUT=$(aws servicediscovery create-service --name data-service --namespace-id "$NAMESPACE_ID" --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudmap-custom-attributes --creator-request-id "data-service-request-$(date +%s)")
@@ -334,0 +335 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+        aws iam tag-role --role-name cloudmap-tutorial-role --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudmap-custom-attributes
@@ -418 +419 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      CREATE_OUTPUT=$(aws servicediscovery create-service --name app-service --namespace-id "$NAMESPACE_ID" --creator-request-id "app-service-request-$(date +%s)")
+      CREATE_OUTPUT=$(aws servicediscovery create-service --name app-service --namespace-id "$NAMESPACE_ID" --tags Key=project,Value=doc-smith Key=tutorial,Value=cloudmap-custom-attributes --creator-request-id "app-service-request-$(date +%s)")
@@ -491 +492 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      log_cmd "aws lambda create-function --function-name writefunction --runtime python3.12 --role $ROLE_ARN --handler writefunction.lambda_handler --zip-file fileb://writefunction.zip --architectures x86_64 --timeout 10"
+      log_cmd "aws lambda create-function --function-name writefunction --runtime python3.12 --role $ROLE_ARN --handler writefunction.lambda_handler --zip-file fileb://writefunction.zip --architectures x86_64 --timeout 10 --tags project=doc-smith,tutorial=cloudmap-custom-attributes"
@@ -580 +581 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      log_cmd "aws lambda create-function --function-name readfunction --runtime python3.12 --role $ROLE_ARN --handler readfunction.lambda_handler --zip-file fileb://readfunction.zip --architectures x86_64 --timeout 10"
+      log_cmd "aws lambda create-function --function-name readfunction --runtime python3.12 --role $ROLE_ARN --handler readfunction.lambda_handler --zip-file fileb://readfunction.zip --architectures x86_64 --timeout 10 --tags project=doc-smith,tutorial=cloudmap-custom-attributes"