Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT SWIFT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING HTML & CSS BASH RUST

AWS Cloud Tutorial

AWS HOME AWS Intro AWS Cloud Certification AWS Get Started AWS Cloud Computing AWS Cloud Benefits AWS Infrastructure Intro AWS EC2 Intro AWS EC2 Instance Types AWS EC2 Pricing AWS EC2 Scaling AWS EC2 Auto Scaling AWS Elastic Load Balancing AWS Messaging AWS EventBridge AWS SNS AWS SQS AWS Messaging Comparison AWS Serverless AWS Lambda AWS Containers AWS ECS AWS EKS AWS Fargate AWS Additional Compute AWS Infrastructure AWS Regions AWS Availability Zones AWS Edge Locations AWS Provision AWS Provision Services AWS Elastic Beanstalk AWS CloudFormation AWS Networking AWS Connectivity AWS Subnet and Access AWS Global Networking AWS Global Architectures AWS Storage AWS Instance Stores AWS EBS AWS S3 AWS Elastic File System AWS Storage Comparison AWS Databases AWS RDS AWS DynamoDB AWS DynamoDB vs RDS AWS Redshift AWS DMS AWS Additional DB Services AWS AI/ML Intro AWS AI/ML on AWS AWS AI/ML Services AWS Generative AI Intro AWS Generative AI Services AWS Data Analytics AWS Data Pipelines AWS Cloud Security AWS Shared Responsibility AWS User Access AWS Network Protection AWS Data Protection AWS Detection and Response AWS Monitoring & Governance AWS Monitoring Intro AWS CloudWatch AWS CloudTrail AWS Compliance AWS Auditing AWS Organizations AWS Governance AWS Health AWS Trusted Advisor AWS Pricing and Support AWS Free Tier AWS Pricing Concepts AWS Billing Services AWS Support Plans AWS Marketplace AWS Cost Optimization AWS Migration AWS CAF AWS Migration Strategies AWS Migration Services AWS Database Migrations AWS Data Transfer Online AWS Data Transfer Offline AWS Well-Architected Solutions AWS Well-Architected Framework AWS Specialized Services AWS Specialized Use Cases AWS Cloud Practitioner Wrap Up AWS Exam Preparation

AWS Examples

AWS Cloud Exercises AWS Cloud Quiz AWS Certificate

More AWS

AWS Machine Learning AWS Serverless AWS GenAI

AWS Cloud Subnet and Access


Subnets and Network Access

Subnets let you organize resources within a VPC, while access control lists and security groups control what traffic can reach them.


Security Groups and Access Control Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our learners.


Subnets

A subnet is a section of a VPC that groups resources with similar security or operational needs. Public and private subnets can communicate with each other through secure channels.

Public Subnets

Contain resources accessible from the internet, such as public websites.

Private Subnets

Contain resources only accessible through the private network, such as databases with customer data.


Network Traffic

Data travels across networks as packets. When a packet enters a VPC through an Internet Gateway, it must pass permission checks before entering a subnet: Who sent it? How will it communicate with the resources?


Access Control

Network Access Control Lists (ACLs)

ACLs are firewalls that control inbound and outbound traffic at the subnet level. Packets on the approved list pass through; others are denied.

ACLs use stateless packet filtering: they check each packet against rules but have no memory of previous requests.

Checking if the traveler is on the list and forgets

Image created by Amazon Web Services

See the AWS documentation on ACLs for more details.



Security Groups

Security Groups are firewalls that control traffic for specific EC2 instances. By default, they deny all inbound traffic and allow all outbound. You add rules to customize this behavior.

Security Groups use stateful packet filtering: they remember previous actions and allow return traffic automatically.

Firewall checks the access list and remembers

Image created by Amazon Web Services

See the AWS documentation on Security Groups for more details.


Configuration Overview

Both ACLs and Security Groups can be configured with custom rules for traffic control.

Overview of network setup

Image created by Amazon Web Services


AWS Cloud Exercises

Test Yourself With Exercises

Exercise:

What is a subnet?

A subnet is a  of a VPC

Start the Exercise


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.