콤텍시스템 서비스 지원
메뉴
aws cli 설치
aws ec2 create-vpc --cidr-block 100.100.0.0/16 --tag-specifications "ResourceType=vpc,Tags=[{Key=Service,Value=DEV},{Key=Name,Value=KB-VPC}]"
aws ec2 create-subnet --vpc-id vpc-03140520781c88fdd --cidr-block 100.100.1.0/24 --availability-zone ap-northeast-2a --tag-specifications "ResourceType=subnet,Tags=[{Key=Service,Value=DEV},{Key=Name,Value=DEV-Public-Subnet-a}]"
aws ec2 modify-subnet-attribute --subnet-id subnet-09dee03a175a68fd2 --map-public-ip-on-launch
aws ec2 create-internet-gateway --tag-specifications "ResourceType=internet-gateway,Tags=[{Key=Service,Value=DEV},{Key=Name,Value=DEV-IGW}]"
aws ec2 attach-internet-gateway --vpc-id vpc-0de527d9f64877014 --internet-gateway-id igw-0cb59f511d334897d
aws ec2 describe-route-tables --filter "Name=vpc-id,Values=vpc-0de527d9f64877014"
aws ec2 create-route --route-table-id rtb-06ce8ce99bdeed3e9 --destination-cidr-block 0.0.0.0/0 --gateway-id igw-0cb59f511d334897d
aws ec2 associate-route-table --subnet-id subnet-09dee03a175a68fd2 --route-table-id rtb-06ce8ce99bdeed3e9
aws ec2 create-key-pair --key-name DEV-KB-KeyPair --query "KeyMaterial" --output text > DEV-KB-KeyPair.pem aws ec2 describe-key-pairs --key-name DEV-KB-KeyPair
aws ec2 create-security-group --group-name DEV-Public-SG --description "Security group for SSH access" --vpc-id vpc-0de527d9f64877014 --tag-specifications "ResourceType=security-group,Tags=[{Key=Service,Value=DEV},{Key=Name,Value=DEV-Public-SG}]"
aws ec2 authorize-security-group-ingress --group-id sg-05aa9e09455d719cf --protocol tcp --port 22 --cidr 0.0.0.0/0
aws ec2 run-instances --image-id ami-0a0de518b1fc4524c --count 1 --instance-type t2.micro --key-name DEV-KB-KeyPair --security-group-ids sg-05aa9e09455d719cf --subnet-id subnet-09dee03a175a68fd2 --tag-specifications "ResourceType=instance,Tags=[{Key=Service,Value=DEV},{Key=Name,Value=EC2-CONSOLE}]"
aws ec2 describe-instances --filter "Name=tag:Name,Values=EC2-CONSOLE" 또는 aws ec2 describe-instances --instance-ids i-0c7cedd469c58ebee"
ssh ec2-user@3.36.123.26
축하합니다! Amazone Linux 설치가 완료되었습니다.