Web_Service/AWS

EC2 인스턴스 설정 / EC2 Instance setting

옥뀨 2021. 1. 27. 23:31

이번 포스팅에선 EC2 인스턴스 설정에 대해 다뤄보려고 한다.

In this post, I'm going to cover EC2 instance configuration.

 

EC2란 Elastic Compute Cloud의 약자로 아마존 웹 서비스의 핵심 기술이다.

EC2 stands for Elastic Compute Cloud and is the core technology of Amazon web services.

 

쉽게 얘기하면 컴퓨터를 임대해주는 서비스이다.

In simple terms, it is a service that lends a computer.

 

여러 장점이 있지만 필자가 생각하는 제일 큰 장점 3가지만 보고 넘어가도록 하자.

There are many advantages, but let's go over the three biggest ones I think.

 

CPU, 메모리, 용량 등을 탄력적 이용 및 관리가 가능하다.

CPU, memory, capacity, etc. can be effectively used and managed.

 

실제로 사용한 용량만큼만 지불이 가능하다.

We can only pay for the amount of storage we actually use.

 

키 페어를 사용하여 로그인 정보를 보호한다.

We can use a key pair to protect our login information.

 

3가지만 열거했지만 더 많은 장점들도 혹은 단점들도 존재할 수 있다.

Although only three are listed, there may be many more advantages or disadvantages.

 

그건 추후에 차차 알아보도록 하자.
Let's look at that later.

 

EC2에 대해 간략하게 알아보았으니 EC2 서비스를 이용하는 방법으로 넘어가보자.

Now that we have a brief overview of EC2, let's move on to how to use EC2 services.

 

먼저 리젼을 설정해야 한다.

First we need to set up the region.

 

로그인된 이름 오른쪽에 "미국 동부(오하이오)"라고 써있는 부분을 "아시아 태평양(서울)"로 바꿔주자.

Change the part marked "US East (Ohio)" to the right of your logged in name to "Asia Pacific (Seoul)".

 

외국에 계신 분들은 가까운 곳을 리젼으로 설정해주면 된다.

If you are in a foreign country, you can set the nearest place as "region".

 

리젼 설정 변경 / Change region settings

 

아래와 같이 잘 바뀐 것을 확인할 수 있다.

We can see that it has changed well as follows.

 

리젼 설정 변경 확인 /  Confirm region setting change

 

① EC2 서비스를 이용하기 위해 상단에 돋보기 모양을 클릭한 후 "EC2"라고 입력해주자.

① To use the EC2 service, click the magnifying glass at the top and enter "EC2".

 

② 엔터를 치지 않아도 관련된 서비스가 나온다. "EC2"를 누른 후 다음 화면으로 넘어가자.

② Related services are displayed without hitting enter. Press "EC2" and move on to the next screen.

 

EC2 인스턴스 설정 ① /  EC2 instance setting ①

 

왼쪽 메뉴바의 "인스턴스"를 클릭하자.

Click "Instances" in the left menu bar.

 

EC2 인스턴스 설정 ② / EC2 instance setting ②

 

"인스턴스 시작" 버튼을 클릭하자.

Click the "Launch Instance" button.

 

EC2 인스턴스 설정 ③ / EC2 instance setting ③

 

서비스로 사용할 운영체제를 고르는 화면이 등장한다.

A page for selecting an operating system to be serviced appears.

 

여러분들의 취향에 맞게 운영체제를 고르면 된다.

We can choose an operating system that suits our taste.

 

필자는 우분투를 선택하고 진행을 해보겠다.

I will choose Ubuntu and proceed.

 

EC2 인스턴스 설정 ④ / EC2 instance setting ④

 

프리 티어에서 사용할 수 있는 항목은 한 가지 밖에 없다.

There is only one item that can be used in the free tier.

 

항목을 선택하고 "다음: 인스턴스 세부 정보 구성"을 클릭하여 다음으로 넘어가자.

Select this item and click "Next: Configure Instance Details" to move on.

 

EC2 인스턴스 설정 ⑤ / EC2 instance setting ⑤

 

인스턴스 세부 정보 구성에 대한 페이지이다.

This is a page for configuring instance details.

 

여기서 인스턴스 개수는 대여할 컴퓨터의 개수이다.

Here, the number of instances is the number of computers to be rented.

 

기본적인 설정인 상태에서 "다음: 스토리지 추가"를 클릭하자.

Just do the basic setup and click "Next: Add storage".

 

EC2 인스턴스 설정 ⑥ / EC2 instance setting ⑥

 

스토리지의 크기를 확인하고 필요한 만큼 설정한 후 "다음: 태그 추가" 버튼을 눌러 넘어가자.

Check the storage size and set as needed, then click the "Next: Add Tag" button to proceed.

 

EC2 인스턴스 설정 ⑦ / EC2 instance setting ⑦

 

태그를 추가하여 키와 값에 이름을 넣을 수 있다.

We can put names in keys and values ​​by adding tags.

 

① "다른 태그 추가" 버튼을 클릭하여 새로운 키 - 값 태그를 추가한다.

 Click the "Add another tag" button to add a new Key-Value tag.

 

② "키" 란에 자신이 사용하고 싶은 키 이름을 쓴다. 필자는 "default" 라고 썼다.

② Write the name of the key you want to use in the "Key" field. I wrote "default".

 

③ "값" 란에 자신이 넣고 싶은 값을 쓴다. 필자는 "web_server" 라고 썼다.

 Write the name of the value you want to use in the "Value" field. I wrote "web_server".

 

④ "다음: 보안 그룹 구성" 버튼을 클릭하여 다음 단계로 진행하자.

④ Click the "Next: Configure Security Group" button to proceed to the next step.

 

EC2 인스턴스 설정 ⑧ / EC2 instance setting ⑧

 

보안 그룹을 구성하는 단계이다.

This is the step of configuring a security group.

 

기존 보안 그룹이 없기 때문에 새로운 보안 그룹을 생성해준다.

Since there is no existing security group, create a new security group.

 

사용할 프로토콜을 추가해줘도 된다. 

We can also add the protocol to be used.

 

필자는 HTTP 프로토콜도 사용하고 싶기에 추가해주었다.

I added HTTP protocol because I also wanted to use it.

 

① "보안 그룹 이름" 을 "web_server"라고 썼다.

① I wrote "web_server" in the "Security group name" field.

 

②, ③ "규칙 추가" 버튼을 눌러 HTTP 프로토콜을 추가하였다.

②, ③ HTTP protocol was added by clicking the "Add Rule" button.

 

④ "검토 및 시작"을 눌러 다음 페이지로 넘어가자.

④ Click "Review and Launch" to move on to the next page.

 

EC2 인스턴스 설정 ⑨ / EC2 instance setting ⑨

 

설정한 내용을 확인하는 페이지이다.

This is the page to check the settings.

 

설정을 잘못한 부분이 있다면 이전 버튼을 눌러 단계를 찾아 수정할 수도 있고 취소 버튼을 눌러 처음부터 다시 설정할 수 있다.

If there is something wrong with the setting, you can click the Previous button to find and correct the step, or click the Cancel button to reset from the beginning.

 

확인을 마쳤다면 "시작하기" 버튼을 누른다.

When finished, click the "Launch" button.

 

인스턴스 설정 확인 /  Check Instance Settings

 

마지막으로 키 페어를 생성해준다.

Finally, let's create a key pair.

 

① 기존에 사용하는 키 페어가 없으므로 "새 키 페어 생성" 항목을 선택한다.

① Since there is no existing key pair, select "Create a new key pair".

 

② 새로 생성할 키 페어의 이름을 입력한다.

② Enter the name of the key pair to be created.

 

③ 사용할 키 페어를 다운로드받는다.

③ Download the key pair to be used.

 

④ 다운로드받은 키 페어를 확인한다. 이 때 다운로드받은 키 페어는 잘 보이는 디렉터리가 아닌 잘 보이지 않는 곳에 보관하는 것을 추천한다.

④ Check the downloaded key pair. At this time, it is recommended to store the downloaded key pair in an invisible directory, not a clearly visible directory.

 

⑤ "인스턴스 시작" 버튼을 눌러 마무리해주도록 하자.
⑤ Let's finish by clicking the "Launch Instances" button.

 

EC2 인스턴스 설정 ⑩ / EC2 instance setting ⑩

 

인스턴스가 잘 작동되는지 확인하는 단계이다.

This is the step to check if the instance works well.

 

인스턴스가 시작 중이지만 시간이 지나면 작동하는 것을 확인할 수 있다.

It says "Instance is starting up", but we can see it working over time.

 

"인스턴스 보기" 버튼을 눌러 잘 동작하는지 확인해보자.

Click the "View Instance" button to see if the instance works.

 

EC2 인스턴스 설정 ⑪ / EC2 instance setting ⑪

 

인스턴스가 "실행 중" 이라는 문구와 함께 잘 동작하고 있음을 확인할 수 있다.

We can see that the instance is working fine with the phrase "running".

 

이로써 인스턴스 추가를 완료하였다.

Instance addition is complete.

 

인스턴스 동작 확인 / Instance operation check

 

사용중인 인스턴스를 삭제하고 싶다면 삭제하고자 하는 인스턴스 위에 마우스 커서를 올려놓고 우클릭을 한 후 "인스턴스 종료" 버튼을 클릭한다.

If you want to delete an instance in use, place the mouse cursor over the instance you want to delete, right-click, click "Instance State", and click "Terminate".

 

인스턴스 삭제 ① / Delete Instance ①

 

"종료" 버튼을 누르면 삭제가 완료된다.

Click the "Yes, Terminate" button to complete the deletion.

 

인스턴스 삭제 ② / Delete Instance ②

 

이상 인스턴스를 추가하는 방법에 대한 설명을 마치도록 하겠다.

This concludes the description of how to add an instance.