1. EC2 인스턴스 생성
EC2 인스턴스 서비스에 접속하여 리전(Region)을 아시아 태평양 (서울)로 선택
"인스턴스 시작" 버튼 클릭
- 이름 : test-server
- 애플리케이션 및 OS 이미지(Amazon Machine Image) : Ubuntu Server 24.04 LTS (HVM), SSD Volume Type
- 인스턴스 유형 : t3.micro
- 키 페어
키 페어 없이 계속 진행(권장되지 않음)
- 네트워크 설정 - 방화벽(보안 그룹)
보안 그룹 이름 : test-server-security-group
설명 : test-server-security-group created 2026-01-11T02:22:10.647Z
인바운드 보안 그룹 규칙)
보안 그룹 규칙 1 (TCP, 22, 0.0.0.0/0)
유형 : ssh
프로토콜 : TCP
포트 범위 : 22
소스 유형 : 위치 무관
보안 그룹 규칙 2 (TCP, 80, 0.0.0.0/0)
유형 : HTTP
프로토콜 : TCP
포트 범위 : 80
소스 유형 : 위치 무관
- 스토리지 구성
크기(GiB) : 30
볼륨 유형 : gp3
"인스턴스 시작" 버튼 클릭
2. EC2 인스턴스 연결 후 Express 서버를 위한 node.js 설치
- Ubuntu
ubuntu@ip-172-31-34-213:~$ sudo su
root@ip-172-31-34-213:/home/ubuntu# apt-get update && /
apt-get install -y ca-certificates curl gnupg && /
mkdir -p /etc/apt/keyrings && /
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && /
NODE_MAJOR=20 && /
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && /
apt-get update && /
apt-get install nodejs -y
Hit:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/universe amd64 Packages [15.0 MB]
Get:5 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/universe Translation-en [5982 kB]
Get:6 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/universe amd64 Components [3871 kB]
Get:7 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/universe amd64 c-n-f Metadata [301 kB]
Get:8 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [269 kB]
Get:9 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/multiverse Translation-en [118 kB]
Get:10 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:11 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/multiverse amd64 Components [35.0 kB]
Get:12 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble/multiverse amd64 c-n-f Metadata [8328 B]
Get:13 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1690 kB]
Get:14 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [312 kB]
Get:15 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [175 kB]
Get:16 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [15.8 kB]
Get:17 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1510 kB]
Get:18 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [307 kB]
Get:19 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [378 kB]
Get:20 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [31.5 kB]
Get:21 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [2418 kB]
Get:22 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [551 kB]
Get:23 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Components [212 B]
Get:24 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 c-n-f Metadata [516 B]
Get:25 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [30.3 kB]
Get:26 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/multiverse Translation-en [6048 B]
Get:27 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:28 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 c-n-f Metadata [488 B]
Get:29 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [40.4 kB]
Get:30 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/main Translation-en [9208 B]
Get:31 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [7296 B]
Get:32 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/main amd64 c-n-f Metadata [368 B]
Get:33 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [29.5 kB]
Get:34 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/universe Translation-en [17.9 kB]
Get:35 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [10.5 kB]
Get:36 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/universe amd64 c-n-f Metadata [1444 B]
Get:37 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:38 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 c-n-f Metadata [116 B]
Get:39 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B]
Get:40 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 c-n-f Metadata [116 B]
Get:41 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1399 kB]
Get:42 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [227 kB]
Get:43 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [21.5 kB]
Get:44 http://security.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [9716 B]
Get:45 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [920 kB]
Get:46 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [208 kB]
Get:47 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [71.5 kB]
Get:48 http://security.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [19.6 kB]
Get:49 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2290 kB]
Get:50 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [525 kB]
Get:51 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Components [212 B]
Get:52 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [27.4 kB]
Get:53 http://security.ubuntu.com/ubuntu noble-security/multiverse Translation-en [6188 B]
Get:54 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [212 B]
Get:55 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [384 B]
Fetched 39.3 MB in 6s (6515 kB/s)
Reading package lists... Done
bash: /: Is a directory
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20240203).
ca-certificates set to manually installed.
curl is already the newest version (8.5.0-2ubuntu10.6).
curl set to manually installed.
The following additional packages will be installed:
dirmngr gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv keyboxd
Suggested packages:
pinentry-gnome3 tor parcimonie xloadimage gpg-wks-server scdaemon
The following packages will be upgraded:
dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpgconf gpgsm gpgv keyboxd
11 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
Need to get 2293 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpg-wks-client amd64 2.4.4-2ubuntu17.4 [70.8 kB]
Get:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 dirmngr amd64 2.4.4-2ubuntu17.4 [323 kB]
Get:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpgsm amd64 2.4.4-2ubuntu17.4 [232 kB]
Get:4 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg-utils amd64 2.4.4-2ubuntu17.4 [109 kB]
Get:5 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpg-agent amd64 2.4.4-2ubuntu17.4 [227 kB]
Get:6 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpg amd64 2.4.4-2ubuntu17.4 [565 kB]
Get:7 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpgconf amd64 2.4.4-2ubuntu17.4 [104 kB]
Get:8 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg all 2.4.4-2ubuntu17.4 [359 kB]
Get:9 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 keyboxd amd64 2.4.4-2ubuntu17.4 [78.3 kB]
Get:10 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gpgv amd64 2.4.4-2ubuntu17.4 [158 kB]
Get:11 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates/main amd64 gnupg-l10n all 2.4.4-2ubuntu17.4 [66.4 kB]
Fetched 2293 kB in 0s (35.3 MB/s)
(Reading database ... 71735 files and directories currently installed.)
Preparing to unpack .../0-gpg-wks-client_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpg-wks-client (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../1-dirmngr_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking dirmngr (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../2-gpgsm_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpgsm (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../3-gnupg-utils_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gnupg-utils (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../4-gpg-agent_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpg-agent (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../5-gpg_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpg (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../6-gpgconf_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpgconf (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../7-gnupg_2.4.4-2ubuntu17.4_all.deb ...
Unpacking gnupg (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../8-keyboxd_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking keyboxd (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Preparing to unpack .../9-gpgv_2.4.4-2ubuntu17.4_amd64.deb ...
Unpacking gpgv (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Setting up gpgv (2.4.4-2ubuntu17.4) ...
(Reading database ... 71735 files and directories currently installed.)
Preparing to unpack .../gnupg-l10n_2.4.4-2ubuntu17.4_all.deb ...
Unpacking gnupg-l10n (2.4.4-2ubuntu17.4) over (2.4.4-2ubuntu17.3) ...
Setting up gnupg-l10n (2.4.4-2ubuntu17.4) ...
Setting up gpgconf (2.4.4-2ubuntu17.4) ...
Setting up gpg (2.4.4-2ubuntu17.4) ...
Setting up gnupg-utils (2.4.4-2ubuntu17.4) ...
Setting up gpg-agent (2.4.4-2ubuntu17.4) ...
Setting up gpgsm (2.4.4-2ubuntu17.4) ...
Setting up dirmngr (2.4.4-2ubuntu17.4) ...
Setting up keyboxd (2.4.4-2ubuntu17.4) ...
Setting up gnupg (2.4.4-2ubuntu17.4) ...
Setting up gpg-wks-client (2.4.4-2ubuntu17.4) ...
Processing triggers for install-info (7.1-3build2) ...
Processing triggers for man-db (2.12.0-4build2) ...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
bash: /: Is a directory
bash: /: Is a directory
bash: /: Is a directory
bash: /: Is a directory
deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main
bash: /: Is a directory
Hit:1 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:3 http://ap-northeast-2.ec2.archive.ubuntu.com/ubuntu noble-backports InRelease
Get:4 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
Get:5 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [13.2 kB]
Hit:6 http://security.ubuntu.com/ubuntu noble-security InRelease
Fetched 25.3 kB in 1s (40.6 kB/s)
Reading package lists... Done
bash: /: Is a directory
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 70 not upgraded.
Need to get 32.0 MB of archives.
After this operation, 197 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_20.x nodistro/main amd64 nodejs amd64 20.19.6-1nodesource1 [32.0 MB]
Fetched 32.0 MB in 0s (74.9 MB/s)
Selecting previously unselected package nodejs.
(Reading database ... 71735 files and directories currently installed.)
Preparing to unpack .../nodejs_20.19.6-1nodesource1_amd64.deb ...
Unpacking nodejs (20.19.6-1nodesource1) ...
Setting up nodejs (20.19.6-1nodesource1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
root@ip-172-31-34-213:/home/ubuntu# node -v
v20.19.6
3. EC2 인스턴스에서 Express 서버 clone 및 라이브러리 설치
링크 : https://github.com/JSCODE-EDU/s3-express-sample
GitHub - JSCODE-EDU/s3-express-sample: <비전공자도 이해할 수 있는 AWS 입문/실전> 中 예제 프로젝트
<비전공자도 이해할 수 있는 AWS 입문/실전> 中 예제 프로젝트. Contribute to JSCODE-EDU/s3-express-sample development by creating an account on GitHub.
github.com
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu# git clone https://github.com/JSCODE-EDU/s3-express-sample.git
Cloning into 's3-express-sample'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 3), reused 13 (delta 3), pack-reused 0 (from 0)
Receiving objects: 100% (13/13), 21.86 KiB | 7.29 MiB/s, done.
Resolving deltas: 100% (3/3), done.
root@ip-172-31-34-213:/home/ubuntu# ls
s3-express-sample
root@ip-172-31-34-213:/home/ubuntu# cd s3-express-sample
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# npm i
added 197 packages, and audited 198 packages in 7s
18 packages are looking for funding
run `npm fund` for details
16 vulnerabilities (12 low, 4 high)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0
npm notice To update run: npm install -g npm@11.7.0
npm notice
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# ls
app.js index.html node_modules package-lock.json package.json
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# cat app.js
require('dotenv').config();
const { S3Client } = require('@aws-sdk/client-s3')
const express = require('express')
const multer = require('multer')
const multerS3 = require('multer-s3')
const app = express()
const port = 80;
const s3 = new S3Client({
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
},
region: "ap-northeast-2"
})
const upload = multer({
storage: multerS3({
s3: s3,
bucket: process.env.AWS_S3_BUCKET,
key: function (req, file, cb) {
cb(null, file.originalname)
}
}),
})
app.post('/upload', upload.array('photos'), (req, res) => {
res.send(req.files);
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
4. .env 파일 수정
주의) .env 파일은 반드시 .gitignore에 추가해서 Github에 올라가지 않게 해야 한다.
발급받은 액세스 키와 버킷명을 .env 파일에 입력
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# ls -al
total 132
drwxr-xr-x 4 root root 4096 Jan 11 02:42 .
drwxr-x--- 5 ubuntu ubuntu 4096 Jan 11 02:31 ..
-rw-r--r-- 1 root root 66 Jan 11 02:31 .env
drwxr-xr-x 8 root root 4096 Jan 11 02:31 .git
-rw-r--r-- 1 root root 13 Jan 11 02:31 .gitignore
-rw-r--r-- 1 root root 757 Jan 11 02:31 app.js
-rw-r--r-- 1 root root 368 Jan 11 02:31 index.html
drwxr-xr-x 100 root root 4096 Jan 11 02:42 node_modules
-rw-r--r-- 1 root root 95665 Jan 11 02:42 package-lock.json
-rw-r--r-- 1 root root 387 Jan 11 02:31 package.json
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# vi .env
- Ubuntu Vim
AWS_ACCESS_KEY=AKIA6KQAT2A57UIDCVFV
AWS_SECRET_ACCESS_KEY=GK1ebZkHoRf1W1l4wE7ZKubfR7xi8BJDRC5L0DSJ
AWS_S3_BUCKET=jint-static-files
~
~
~
~
:wq
5. S3에 파일 업로드가 잘 되는 지 확인
서버를 실행한 후 Postman으로 이미지를 업로드한다.
링크 : https://www.postman.com/downloads/
Download Postman | Get Started for Free
Try Postman for free! Join 40 million users who rely on Postman, the collaboration platform for API development. Create better APIs—faster.
www.postman.com
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# node app.js
Example app listening on port 80

URL과 Body를 입력하여 Send 버튼 클릭하면 응답이 온다.

- JSON
[
{
"fieldname": "photos",
"originalname": "20260111_upload_file.png",
"encoding": "7bit",
"mimetype": "image/png",
"size": 8817,
"bucket": "jint-static-files",
"key": "20260111_upload_file.png",
"acl": "private",
"contentType": "application/octet-stream",
"contentDisposition": null,
"contentEncoding": null,
"storageClass": "STANDARD",
"serverSideEncryption": null,
"location": "https://jint-static-files.s3.ap-northeast-2.amazonaws.com/20260111_upload_file.png",
"etag": "\"b8e4ef9dd6fe9d7b7ec860319356808f\""
}
]
응답의 location 값을 통해 S3에 저장된 파일 위치를 알 수 있다. 이 주소를 데이터베이스에 저장하는 것이다.
S3 서비스의 버킷 > 범용 버킷 메뉴에서 생성한 버킷을 클릭하여 객체탭을 보면 업로드된 파일을 확인할 수 있다.

업로드된 파일을 클릭하여 속성 탭의 객체 URL을 복사한다.

4. S3에 저장된 URL로 이미지 잘 조회되는 지 확인
1) 브라우저 주소창에 주소 입력

2) HTML에서 확인
HTML 파일 img 태그 src 속성에 S3에 저장된 URL 입력 후, HTML 파일에 접속할 수 있도록 app.js 파일 수정
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# vi index.html
- Ubuntu Vim
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>이미지 테스트</h1>
<img src="https://jint-static-files.s3.ap-northeast-2.amazonaws.com/20260111_upload_file.png"/>
</body>
</html>
~
~
~
~
:wq
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# vi app.js
- Ubuntu Vim
...
const path = require('path') // path 모듈 추가
...
app.get('/uploadFile', (req, res) => {
res.sendFile(path.join(__dirname, 'index.html'));
})
...
- Ubuntu
root@ip-172-31-34-213:/home/ubuntu/s3-express-sample# node app.js
Example app listening on port 80
서버의 HTML URL로 접속

비전공자도 이해할 수 있는 AWS 입문/실전| JSCODE 박재성 - 인프런 강의
현재 평점 4.9점 수강생 2,898명인 강의를 만나보세요. 비전공자 입장에서도 쉽게 이해할 수 있고, 실전에서 바로 적용 가능한 AWS 입문 강의를 만들어봤습니다! EC2를 활용한 백엔드 API 서버 배포, R
www.inflearn.com
'강의 실습 > 비전공자도 이해할 수 있는 AWS 입문 실전' 카테고리의 다른 글
| 비용 나가지 않게 S3 깔끔하게 종료하기 (0) | 2026.01.12 |
|---|---|
| [실습] 3-2. S3를 활용해 Spring Boot 서버에 이미지 업로드 기능 구현하기 (0) | 2026.01.12 |
| [실습] 2. S3에 파일 업로드 할 수 있도록 IAM에서 액세스 키 발급받기 (0) | 2026.01.10 |
| [실습] 1. S3 버킷 생성하기 (1) | 2026.01.09 |
| S3를 활용한 아키텍처 구성 (0) | 2026.01.08 |
댓글