๐ก ์ง ๋ ธํธ๋ถ ํฌ๋งทํ๊ณ ํ์ฌ ์ ํ ๊ทธ๋๋ก ์ง์์๋ ์ ํ ํ๊ธฐ
1. ํฌ๋งทํ๊ธฐ
๐ก ํฌ๋งท์ ๋ ธํธ๋ถ์ ๋ค์ ์คํํ ๋ command + R ์ ๊ณ์ ๋๋ฅด๋ค๋ณด๋ฉด ๋์คํฌ ์ ์ฅ๊ณต๊ฐ์ ๋ํ ๋ด์ฉ์ด ๋จ๋๋ฐ, ๋ค ์ญ์ ํ๊ณ OS๋ฅผ ๋ค์ ์ค์นํด ์ฃผ๋ฉด ๋๋ค.
๋๋ ๋ฐฑ์ ๊ฐ์ ๊ฑฐ ์ ํค์ฐ๋๊น ๊ทธ๋ฅ ๋ค ์ญ์ ํด์ค๋ค. (๋ฐฑ์ ํ๋ ๋ฐฉ๋ฒ์ ๋ชจ๋ฆ)
2. .bash_profile
ํ์ฌ ๋ ธํธ๋ถ์ ์๋ .bash_profile์ ๊ทธ๋๋ก ๋ณต์ฌํ์ฌ ํฌ๋งทํ ๋ ธํธ๋ถ์๋ ๋ฃ์ด์ฃผ์
vi .bash_profile
- ๋งจ ์๋ cd /Users/gimsumin/temp/FLo-handler-functions ๋ ํ์ฌ ๋ ธํธ๋ถ์ ์ํ๋ ์์น๋ก ๋ณ๊ฒฝํด์ฃผ์
source ~/.bash_profile
- ์์ ๋ช ๋ น์ด๊น์ง ํด์ฃผ์ด์ผ ์ ์ฉ์ด ๋๋ค.
echo $ํ๊ฒฝ๋ณ์key
- ํ๊ฒฝ๋ณ์key๋ฅผ ๋ญ๋ผ๊ณ ํด์ผํ ์ง ๋ชจ๋ฅด๊ฒ ์ผ๋, ์๋ฅผ ๋ค์ด echo $ํ๊ฒฝ๋ณ์key๋ฅผ ํ์ ๋, ์์ ์ค์ ํด์ค value ๋ก ๋ต๋ณ์ด ์ค๋ฉด ์ฑ๊ณต์ ์ผ๋ก ํ๊ฒฝ๋ณ์๊ฐ ์ ์ฉ๋์๋ค.
3. Node install
- npm install -g serverless@1.44.1 ๋ช
๋ น์ด๋ฅผ ์๋ฌด๋ฆฌ ์
๋ ฅํด ๋ณด์๋ ์๋์ ์ํ๋ค.
- npm: command not found ๋ผ๋ ๋ง๋ง ๊ณ์..
๐ก ๊ตฌ๊ธ๋ง์ ํด๋ณด๋ uninstall ํด๋ณด๊ณ , ๋ค์ install ํด๋ณด๋ ๋ฐฉ๋ฒ์ด ์์๋ค.
๊ทธ๋ฌ๋ ๋๋ installํ npm๋ ์์ผ๋ ์์ฉ์ด ์๋ค.
- ๊ทธ๋์ ๊ทธ๋ฅ ํํ์ด์ง์์ ์ํ๋ ๋ฒ์ ์ ๋ค์ด๋ก๋ ํด์ฃผ์๋ค.
4. Serverless install
npm install -g serverless@1.44.1
- ๋๋์ด serverless๋ฅผ install ํด์ฃผ์๋ค.
npm -v
node -v
serverless -v
- ๋ฒ์ ๋ ํ์ธํด ์ค๋ค.
5. AWS CLI ์ค์น
๐ก aws configure ์ ํ๋ ค๊ณ ํ๋๋, ์ญ์ ํ๋ฒ์ ๋๋ ๊ฒ์ ์๋ค. AWS CLI๋ ์ค์นํด ์ฃผ์
curl "<https://awscli.amazonaws.com/AWSCLIV2.pkg>" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
aws configure
- ์์ ๋ช ๋ น์ด๋ฅผ ์น๊ณ , Access Key ID ์ Secret access key ๋ฅผ ์ ๋ ฅํด์ค๋ค.
6. ๋ค ํ๋๋ฐ deploy๊ฐ ์๋ผ์!
Serverless Error ---------------------------------------
Serverless plugin "serverless-dynamodb-autoscaling" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
OS: darwin
Node Version: 10.24.0
Serverless Version: 1.44.1
- ์ด๋ฌํ ์๋ฌ๊ฐ ๋น์ ์ ๊ดด๋กญํ๋ค๋ฉด.. npm install ์ ๋ค์ ํ๋ฒ ํด์ฃผ์
- ์๋ง plugin๋ค์ด ์ ๋ถ ์ค์น ๋์ง ์์๋ ๊ฒ ๊ฐ๋ค. (์์ง?)
๐ก ์ด๋ ๊ฒ mac terminal์์ ๋ชจ๋ ๋ค์ด๋ก๋ ํ๊ณ , iterm์ผ๋ก ์ฎ๊ฒจ์ ์์ ์ ํ๋ ค๋ ์ค..
iterm ์ ๋ด ๋ง์๋๋ก ๋ฐ๋ผ์ฃผ์ง ์์๊ณ ์๋ฌด๊ฒ๋ ์๊น๋ฆฐ ์ํ์ฒ๋ผ ๊ตด์๋ค. ๋ ์์ด๋ฆฌ ๋์๊ฒ ๊ตฌ๋๊ฑฐ์ผ! ๊ทธ ์ด์ ๋ ์๋์..
homebrew๋ ์ฃ ์์ด์, ์ฃ๋ ๋ด๊ฐ ์์ง
- ๋๋ iterm ์์๋ bash shell์ ์ฌ์ฉํ๊ณ ์ถ์๋ค.
- ๊ทธ๋์ Command๋ฅผ /bin/bash ๋ก ๋ฐ๊พธ์ด bash๋ก ์ ๋ฐ๊พธ์ด ์ฃผ์๋ค.
- ์ด๊ฒ์ด ๋ฌธ์ ์๋๋ฐ, Command๊ฐ ์๋๋ผ Custom Shell๋ก ๋ฐ๊พธ์ด์ ํด์ฃผ์ด์ผ ๋ค๋ฅธ command ์ฐฝ์์ ์ค์ ํ ๊ฒ๋ค๋ ๋ชจ๋ ์ ์ฉ์ด ๋์๋ค.
- ํ 40๋ถ ๋ป์ง ํ๋ค..
'TIL' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
node ๋ฒ์ ์ ๋ฐ์ดํธ ํ๊ธฐ (0) | 2023.01.04 |
---|---|
use strict๋? ์ ์ฐ๋๊ฑฐ์ผ? (2) | 2023.01.04 |
[Git] ๋ด๊ฐ ๋ณด๋ ค๊ณ ์ ๋ฆฌํ๋ git ๋ช ๋ น์ด (0) | 2021.03.15 |
[AWS] CodeCommit ํฐ๋ฏธ๋ ์ฌ์ฉํ์ฌ git clone ํ๊ธฐ (0) | 2021.03.02 |
[Node.js] Node.js๋? (0) | 2021.03.01 |