AWS Certified Cloud Practitioner CLF-C01 EC2

이성현·2022년 7월 13일
0

EC2

EC2는 Elastic Compute Cloud의 약자로 IAAS이다. EC2는 어떻게 클라우드가 동작하는지 알기 위한 가장 기본적인 서비스이다. 열심히 열심히 알아봐야지.

  • Renting virtual machines (EC2 instances)
  • Storing data on virtual drives (EBS volumes)
  • Distributing load across machines (ELB-Elastic Load Balancer)
  • Scaling the services using an auto-scaling group (ASG)

EC2 sizing & congifuration options

  • 리눅스, 윈도우, Mac OS 에서 모두 사용할 수 있다.
  • How much compute power & cores (CPU)
  • How much random-access memory (RAM)
  • How much storage stace :
    Network-attached (EBS& EFS)
    hardware (EC2 Instance Store)
  • Network card : speed of the card, Public IP address (EC2 instance에 어떤 종류의 네트워크를 붙일지)
  • Firewall rules : security group
  • Bootstrap script (configure at first launch) : EC2 User Data

여기서 bootstrap이란 머신이 시작될 때 커멘드 설치하는 것으로 해당 스크립트는 인스턴스가 처음 시작될때만 실행된다. 업데이트할 것, 소프트웨어, 인터넷으로부터 다운받은 파일 등등 어떤 것도 boot task에 들어갈 수 있다. EC2 User Data Script는 root user에서 돌아간다.

EC2 Instance Types

m5.2xLarge

m : instance class
5 : generation (AWS에서 신규를 낼거다)
2xlarge : size within the instance class

타입을 정할 때는, compute, memory, networking을 균형있게 선택하는 것이 중요하다. 참고로 General Purpose EC2 intance는 프리티어인 t2.micro이다.

Compute Optimized - C로 시작
Memory Optimized - R로 시작
Storage Optimized

Security Groups

EC2의 인스턴스를 security group이 감싼 형태로 존재하고, www와는 inbound traffic, outbound traffic을 만들어 통신한다. 자세히는 port에 대한 접근, ip4, ip6에 대한 접근, inbound, outbound network 통제의 기능을 한다.

Classic Port Number

  • 22=SSH(Secure Shell) - 리눅스 인스턴스에 접근
  • 21=FTP(File Transfer Protocol) - 파일쉐어에 파일을 업로드할 때 접근
  • 22=SFTP(Secure File Transfer Protocol) -SSH를 이용한 파일 업로드
  • 80=HTTP - unsecured websites에 접근
  • 443=HTTPS - secured websites에 접근
  • 3389=RDP (Remote Desktop Protocol) - 윈도우 인스턴스에 접근
profile
삼성전자 C-Lab 21기 Creative Leader SW개발자 (쪼랩)

0개의 댓글