sg

Security Group

NetworkingAWS
General

General information about the service.

Description

A security group acts as a virtual firewall controlling inbound and outbound traffic.

Service Namespace

AWS::EC2::SecurityGroup

ARN Pattern

arn:aws:ec2:{region}:{account}:security-group/{sg-id}

References

Chat

Powered by AI

Talk to this service to learn more about it.

Suggested questions:

Naming

The conventions, rules, and restrictions for naming this service.

Naming Convention

sg-

Length

1-255

Valid Characters

Letters, numbers, hyphens, underscores

Scope

vpc

Code

Deploy your infrastructure as code using your preferred tooling.

Official DocumentationTerraform
terraform
1resource "aws_security_group" "main" {
2 name = "sg-${var.environment}-web"
3 description = "Web security group"
4 vpc_id = aws_vpc.main.id
5 ingress {
6 from_port = 443
7 to_port = 443
8 protocol = "tcp"
9 cidr_blocks = ["0.0.0.0/0"]
10 }
11}
Utilities

Utilities to support app deployment or configuration.