AWS Security ChangesHomeSearch

AWS ec2 documentation change

Service: ec2 · 2026-05-04 · Documentation low

File: ec2/latest/devguide/example_vpc_GettingStartedCLI_section.md

Summary

Added project and tutorial tags to all VPC resources including VPC, subnets, IGW, route tables, EIP, NAT gateway, security groups, key pairs, and EC2 instances.

Security assessment

Exclusively adds resource tagging for organizational purposes. Security configurations (like security group rules) and key material handling remain unchanged. No security vulnerabilities or features are addressed.

Diff

diff --git a/ec2/latest/devguide/example_vpc_GettingStartedCLI_section.md b/ec2/latest/devguide/example_vpc_GettingStartedCLI_section.md
index bf08bd45f..96a8f0e1c 100644
--- a//ec2/latest/devguide/example_vpc_GettingStartedCLI_section.md
+++ b//ec2/latest/devguide/example_vpc_GettingStartedCLI_section.md
@@ -153 +153 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    VPC_ID=$(aws ec2 create-vpc --cidr-block 10.0.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=MyVPC}]' --query 'Vpc.VpcId' --output text)
+    VPC_ID=$(aws ec2 create-vpc --cidr-block 10.0.0.0/16 --tag-specifications 'ResourceType=vpc,Tags=[{Key=Name,Value=MyVPC},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'Vpc.VpcId' --output text)
@@ -184 +184 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ1}]' \
+      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ1},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -200 +200 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ2}]' \
+      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Public-Subnet-AZ2},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -217 +217 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ1}]' \
+      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ1},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -233 +233 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ2}]' \
+      --tag-specifications 'ResourceType=subnet,Tags=[{Key=Name,Value=Private-Subnet-AZ2},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -247 +247 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=MyIGW}]' \
+      --tag-specifications 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=MyIGW},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -266 +266 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Public-RT}]' \
+      --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Public-RT},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -304 +304 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Private-RT}]' \
+      --tag-specifications 'ResourceType=route-table,Tags=[{Key=Name,Value=Private-RT},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -336 +336 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    EIP_ALLOC=$(aws ec2 allocate-address --domain vpc --query 'AllocationId' --output text)
+    EIP_ALLOC=$(aws ec2 allocate-address --domain vpc --tag-specifications 'ResourceType=elastic-ip,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'AllocationId' --output text)
@@ -350 +350 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=natgateway,Tags=[{Key=Name,Value=MyNATGateway}]' \
+      --tag-specifications 'ResourceType=natgateway,Tags=[{Key=Name,Value=MyNATGateway},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -381,0 +382 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+      --tag-specifications 'ResourceType=security-group,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -407,0 +409 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+      --tag-specifications 'ResourceType=security-group,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -466 +468 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-    aws ec2 create-key-pair --key-name "$KEY_NAME" --query 'KeyMaterial' --output text > "${KEY_NAME}.pem" || handle_error "Failed to create key pair"
+    aws ec2 create-key-pair --key-name "$KEY_NAME" --tag-specifications 'ResourceType=key-pair,Tags=[{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' --query 'KeyMaterial' --output text > "${KEY_NAME}.pem" || handle_error "Failed to create key pair"
@@ -494 +496 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=WebServer}]' \
+      --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=WebServer},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \
@@ -524 +526 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-      --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=DBServer}]' \
+      --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=DBServer},{Key=project,Value=doc-smith},{Key=tutorial,Value=vpc-gs}]' \