Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

AWS Tutorials: What is a Prefix List in AWS?

Here’s a complete guide to Prefix List and PREFIX_LIST_ID โ€“ particularly useful in AWS networking contexts such as Route Tables, Security Groups, and Network ACLs.


๐Ÿ”ฐ What is a Prefix List in AWS?

A Prefix List in AWS is a set of CIDR blocks grouped under a logical name, managed by AWS or the user, and assigned a unique ID. It simplifies the management of IP-based rules across multiple AWS services.


โœ… Key Use Cases

Use CaseDescription
โœ… Route TablesUse a Prefix List to define destination CIDR blocks
โœ… Security GroupsAllow or restrict traffic from a known set of IP ranges
โœ… Network ACLsApply consistent rules across VPCs using prefix lists
โœ… Simplified ManagementUpdate a prefix list once to affect all dependent resources

๐Ÿ“ฆ Types of Prefix Lists

TypeDescriptionExample
AWS-ManagedCreated and maintained by AWS for common servicescom.amazonaws.region.s3
Customer-ManagedCreated by the user with specific CIDRspl-0123456789abcdef0

๐Ÿ” AWS-Managed Prefix List Examples

ServicePrefix List NameDescription
S3com.amazonaws.<region>.s3Access to S3 public endpoints
DynamoDBcom.amazonaws.<region>.dynamodbUsed for DynamoDB access
CloudFrontcom.amazonaws.global.cloudfront.origin-facingCloudFront IPs to allow through firewalls

๐Ÿ”ข PREFIX_LIST_ID

  • A PREFIX_LIST_ID is a unique identifier for a Prefix List in AWS.
  • Format: pl-xxxxxxxxxxxxxxxxx
  • Used in Route Tables, Security Groups, and NACLs as a substitute for raw CIDRs.

โœ… Example:

If your S3 Prefix List ID is pl-1234abcd, you can use it in a route table like:

{
  "DestinationPrefixListId": "pl-1234abcd",
  "Target": "igw-0abc123de456"
}
Code language: JSON / JSON with Comments (json)

๐Ÿ› ๏ธ How to Create a Customer-Managed Prefix List

๐Ÿ”ง Via Console

  1. Go to VPC Dashboard โ†’ Prefix Lists
  2. Click Create Prefix List
  3. Enter name, maximum number of entries, and add CIDRs
  4. Create and note the PREFIX_LIST_ID

๐Ÿงฉ Via AWS CLI

aws ec2 create-managed-prefix-list \
  --prefix-list-name my-app-cidrs \
  --max-entries 5 \
  --address-family IPv4 \
  --entries Cidr=192.168.1.0/24,Description="App subnet"
Code language: PHP (php)

๐Ÿ“ How to Use PREFIX_LIST_ID in Terraform

resource "aws_route" "example" {
  route_table_id         = aws_route_table.example.id
  destination_prefix_list_id = "pl-1234abcd"
  gateway_id             = aws_internet_gateway.example.id
}
Code language: JavaScript (javascript)

Or dynamically:

data "aws_prefix_list" "s3" {
  name = "com.amazonaws.us-east-1.s3"
}

resource "aws_security_group_rule" "allow_s3" {
  type                     = "egress"
  security_group_id        = aws_security_group.example.id
  from_port                = 443
  to_port                  = 443
  protocol                 = "tcp"
  prefix_list_ids          = [data.aws_prefix_list.s3.id]
}
Code language: JavaScript (javascript)

๐Ÿ“Œ Benefits of Using Prefix Lists

FeatureBenefit
ConsistencyNo need to update CIDRs manually in multiple places
SimplificationReplace long IP lists with a single identifier
ScalabilityOne change affects all related security or routing rules
SecurityEasier to audit and manage trusted IPs

๐Ÿ”„ Updating a Prefix List

  • AWS-Managed: Automatically updated by AWS
  • Customer-Managed:
    • Use CLI or Console to add/remove CIDRs
    • Affects all associated route/security rules immediately

๐Ÿง  Best Practices

  • Use AWS-managed prefix lists for trusted AWS services.
  • Use customer-managed prefix lists to organize:
    • Office IPs
    • Partner networks
    • Application subnets
  • Tag your prefix lists for visibility and tracking.

โ“ Common Questions

๐Ÿ” How to find a prefix list ID?

aws ec2 describe-managed-prefix-lists

๐Ÿ” Are prefix lists secure?

Yes. They’re only a way to manage IP lists, and your actual resource access is controlled by security groups, NACLs, or route tables.

๐ŸŒ Are prefix lists region-specific?

Yes, prefix lists are region-specific, especially AWS-managed ones like S3 or DynamoDB.


How to Configure the EKS nodes' security group to receive traffic from the VPC Lattice network.

$ PREFIX_LIST_ID=$(aws ec2 describe-managed-prefix-lists --query "PrefixLists[?PrefixListName=="\'com.amazonaws.$AWS_REGION.vpc-lattice\'"].PrefixListId" | jq -r '.[]')

$ echo $PREFIX_LIST_ID

$ aws ec2 authorize-security-group-ingress --group-id $CLUSTER_SG --ip-permissions "PrefixListIds=[{PrefixListId=${PREFIX_LIST_ID}}],IpProtocol=-1"

$ PREFIX_LIST_ID_IPV6=$(aws ec2 describe-managed-prefix-lists --query "PrefixLists[?PrefixListName=="\'com.amazonaws.$AWS_REGION.ipv6.vpc-lattice\'"].PrefixListId" | jq -r '.[]')

$ echo $PREFIX_LIST_ID_IPV6

$ aws ec2 authorize-security-group-ingress --group-id $CLUSTER_SG --ip-permissions "PrefixListIds=[{PrefixListId=${PREFIX_LIST_ID_IPV6}}],IpProtocol=-1"Code language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Terraform Backend Tutorial

Terraform is a popular open-source infrastructure as code tool used to create and manage infrastructure resources. The state of the infrastructure resources managed by Terraform is stored…

Read More

Best Tools for Software Composition Analysis (SCA)

Hereโ€™s a clear and professional explanation of the three related concepts you asked about โ€” all of which are critical parts of secure software development, especially in…

Read More

Top 10 AI Code Review Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI code review tools have become essential for developers aiming to enhance code quality, streamline workflows, and accelerate software delivery. These tools leverage advanced…

Read More

Top 10 Expense Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction Expense management tools are critical for businesses of all sizes in 2026 as they help streamline financial processes, improve budgeting, ensure compliance, and enhance financial visibility….

Read More

Top 10 Web Application Firewall (WAF) Tools in 2026: Features, Pros, Cons & Comparison

Introduction In the rapidly evolving landscape of cybersecurity, Web Application Firewalls (WAFs) have become a critical component in defending web applications from malicious attacks such as SQL…

Read More

Top 10 Endpoint Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, businesses of all sizes are increasingly reliant on a variety of devicesโ€”laptops, desktops, mobile devices, and other endpointsโ€”that connect to their networks. With the…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x