How it works...

Security groups control the incoming and outgoing requests to and from resources hosted in the AWS. Inbound rules allow incoming network traffic from source CIDR ranges with the protocol and ports mentioned in a rule. If you want to allow requests only from resources hosted inside your VPC, put an SG associated with those resources in the source. Outbound rules allow outbound requests initiated from resources hosted in the AWS.

Get AWS Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.