aws-cli๋ฅผ ์ฌ์ฉํ์ฌ ์คํ์ ์ ๋ฐ์ดํธํ๊ณ ์ธ๋ถ yaml ํ์ผ(dev.yaml)์ ์๋์ ๊ฐ์ด ๋งค๊ฐ๋ณ์ ํ์ผ๋ก ์ฌ์ฉํ๋ ค๊ณ ํฉ๋๋ค.
aws cloudformation update-stack --stack-name test --template-body file://./api-test.yaml --parameters file://./dev.yaml
dev.yaml
์๋ ๋ค์๋ง ์์ต๋๋ค.
---
- ParameterKey: APICacheClusterSize
ParameterValue: '1.6'
๊ทธ๋ฌ๋ ์์ ์ ๋ฐ์ดํธ ๋ช ๋ น์ ์คํํ ๋ ๋ค์ ์ค๋ฅ ๋ฉ์์ง๊ฐ ๋ํ๋ฉ๋๋ค.
Error parsing parameter '--parameters': Expected: '=', received: '-' for input:
---
- ParameterKey: APICacheClusterSize
^
ParameterValue: '1.6'
์๋์ ๊ฐ์ ์ปจํ
์คํธ๋ก JSON ํ์ผ์ ์ฌ์ฉํ๊ณ dev.yaml
๋์ ์ฌ์ฉํ๋ฉด ์ ์๋ํฉ๋๋ค.
[
{
"ParameterKey": "APICacheClusterSize",
"ParameterValue": "1.6"
}
]
๊ทธ๋ ๋ค๋ฉด aws cloudformation์ ์ธ๋ถ ํ๋ผ๋ฏธํฐ ํ์ผ์ YAML ํ์ผ์ด ๋ ์ ์์ต๋๊น? ์๋๋ฉด...?
์๋ ํ์ธ์, ํ์ฌ ๋ช ๋ น์ค ์ธ์์ ์ผ๋ถ๋ก YAML์ ์ง์ํ ๊ณํ์ด ์์ต๋๋ค. ์ผ๋ถ ์ฌ๋๋ค์๊ฒ ์ด๋ป๊ฒ ์ ์ฉํ ์ ์๋์ง ์ ์ ์์ผ๋ฏ๋ก ์ด๊ฒ์ ๊ธฐ๋ฅ ์์ฒญ์ผ๋ก ํ์ํ๊ฒ ์ต๋๋ค.
--parameters์ ์ ๊ณตํ ํ์ผ์ ๋ด์ฉ์ ๋ก๋๋๊ณ ์ธ์๋ก ์ง์ ๋คํ๋๋ฏ๋ก ํ์ผ ๋ด์ฉ์ ๋ ๊ฐ์ง ํ์ ์ค ํ๋๋ก๋ง ๊ฐ์ง ์ ์์ต๋๋ค.
์ฝ์ ๊ตฌ๋ฌธ:
ParameterKey=string,ParameterValue=string,UsePreviousValue=boolean
๋๋ JSON ๊ตฌ๋ฌธ:
[
{
"ParameterKey": "string",
"ParameterValue": "string",
"UsePreviousValue": true|false
}
]
์ด ๊ธฐ๋ฅ ์์ฒญ์ ๋ ๋ฒ์งธ๋ก ํ๊ฒ ์ต๋๋ค.
๋๋ ๋ ๋ฒ์งธ ํ ๊ฑฐ์ผ
+1
์ ๋ฐ. ์ด๊ฒ์ ์ฐ๋ฆฌ์๊ฒ ๋งค์ฐ ์ค์ํฉ๋๋ค.
+1
์ ๋์ ์ผ๋ก +1
--template-body
์๋ YAML ํ์ ๋ฐ์ดํฐ๋ฅผ ํ์ฉํ์ง๋ง --parameters
์๋ ํ์ฉํ์ง ์๋ +1์ ์ด์ํฉ๋๋ค.
๐
+1
+1
+1
yaml์์ ํ
ํ๋ฆฟ์ ์ ๊ณตํ ์ ์์ผ๋ฏ๋ก yaml์์๋ ๋งค๊ฐ๋ณ์๋ฅผ ์ ๊ณตํ ์ ์์ด์ผ ํฉ๋๋ค.
์ด ๊ธฐ๋ฅ์ ํ์๋ผ๊ณ ์๊ฐํฉ๋๋ค
+1
+100
+1
+100
+1
" https://gist.github.com/mbailey/2f7c878eed123cab6fb125117f35aecc
"
" yamlise - vim์์ JSON ํ์ผ์ ํธ์งํ ๋ YAML์ ์ฐธ์กฐํ์ญ์์ค.
"
" JSON ๊ณตํฌ์ฆ์ด ์๋ ์ฌ๋๋ค์ ์ํด ๋ง๋ค์ด์ก์ต๋๋ค.
" ๋ชจ๋ ์๋๊ฐ JSON์ ๋ง์คํฐํ๋ ค๋ ๊ฒฝ์ฐ์๋ง ์ฌ์ฉ๋ฉ๋๋ค.
" ์คํจํ์ต๋๋ค. http://www.json.org/
"
"์ด ์ฌ๋๋ค์๊ฒ ๋๋ฌด ๋ฆ์ง ์์์ผ๋ฉด ์ข๊ฒ ์ต๋๋ค!
" '์ ๋ฐ. ์ด๊ฒ์ ์ฐ๋ฆฌ์๊ฒ ๋งค์ฐ ์ค์ํฉ๋๋ค.'
" https://github.com/aws/aws-cli/issues/2275#issuecomment -277829948
"
" ์ค์น
" =============
" 1. cfn-flip ์ค์น https://github.com/awslabs/aws-cfn-template-flip
" 2. ์ด ํ์ผ์ ~/.vimrc์ ํฌํจํ์ญ์์ค.
" 3. vim cloudformation-params.json
" ์ด์ ๋น์ ์ด ๊ฐ๋งํ๋ ์ฐธ๋ง๋ฅผ ๋ณผ ์ ์์ด์ผ ํฉ๋๋ค.
" 4. :wq
" ์ด์ ํ์ผ์ Amazon CLI๊ฐ ์์ํ๋ JSON์ด ํฌํจ๋์ด์ผ ํฉ๋๋ค.
"
:augroup yamlise
: ์๋ ๋ช
๋ น!
: autocmd BufReadPost,FileReadPost *.json '[,']!cfn-flip
: autocmd BufWritePre,FileWritePre *.json '[,']!cfn-flip
: autocmd FileAppendPre *.json '[,']!cfn-flip
:augroup END
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+999
+1
+1
+1
+1
+2
+1
+1
+1
+1
+1
+1
+1
+10000000
+1
+์ ๋ณด
+1
+1
+1
+1
+1
๋ค์์ Bash ํ๋ก์ธ์ค ๋์ฒด ๋ฐ cfn-flip ์ ์ฌ์ฉํ๋ ๊ฐ๋จํ ํด๊ฒฐ ๋ฐฉ๋ฒ์
๋๋ค.
aws cloudformation ... --parameters file://<(cfn-flip parameters.yml)
+1
+1
++
+0.5
+1
++
+1!
ํ ํ๋ฆฟ์ด YAML์ ์๊ณ ๋งค๊ฐ๋ณ์๊ฐ JSON์ ์๋ ์ด์ ๋ฅผ ์ดํดํ์ง ๋ชปํฉ๋๋ค. ์ด์ํ ๋๋ฝ์ด ์๋ ๊ฒ ๊ฐ์ผ๋ฉฐ AWS์์ ์์ ํ๊ณ ์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค....์ ๋ฐ?
+1
+1
์ข์ ์์นจ!
AWS CLI์ ๊ด๋ จ๋ ๊ธฐ๋ฅ ์์ฒญ์ ์ํด UserVoice ๋ก ๋ง์ด๊ทธ๋ ์ด์ ํ๋ ๊ณผ์ ์ ์ผํ์ผ๋ก GitHub์์ ์ด ๋ฌธ์ ๋ฅผ ์ข ๋ฃํฉ๋๋ค.
์ด๋ ๊ฒ ํ๋ฉด ๋ฒ๊ทธ ๋ณด๊ณ ์๋ก ๋ํ๋ฅผ ํฌ์ํ์ง ์๊ณ ๊ฐ์ฅ ๊ด์ฌ ์๋ ๊ธฐ๋ฅ์ ๋ ์ฝ๊ฒ ๊ฒ์ํ๊ณ ์ง์์ ํ์ํ ์ ์์ผ๋ฏ๋ก ๊ฐ์ฅ ์ค์ํ ๊ธฐ๋ฅ์ ์ป์ ์ ์์ต๋๋ค.
๋น ๋ฅธ UserVoice ์ ๋ฌธ์(์์ง ์ต์ํ์ง ์์ ๊ฒฝ์ฐ): ์์ด๋์ด๊ฐ ๊ฒ์๋ ํ ์ฌ๋๋ค์ ์์ด๋์ด์ ํฌํํ ์ ์์ผ๋ฉฐ ์ ํ ํ์ ๊ฐ์ฅ ์ธ๊ธฐ ์๋ ์ ์์ ์ง์ ์๋ตํฉ๋๋ค.
GitHub์์ ๊ธฐ์กด ๊ธฐ๋ฅ ์์ฒญ์ ๊ฐ์ ธ์์ต๋๋ค. ์ฌ๊ธฐ์์ ์ด ๋ฌธ์ ๋ฅผ ๊ฒ์ํ์ธ์!
๊ทธ๋ฆฌ๊ณ ๊ฑฑ์ ํ์ง ๋ง์ธ์. ์ด ๋ฌธ์ ๋ ํ๋๋ฅผ ์ํด GitHub์ ๊ณ์ ์กด์ฌํฉ๋๋ค. ์๋ณธ ๊ฒ์๋ฌผ์ UserVoice๋ก ํ ์คํธ๋ง ๊ฐ์ ธ์ค๊ธฐ ๋๋ฌธ์ GitHub ๋ฌธ์ ์ ๋ํด ์ด๋ฏธ ์กด์ฌํ๋ ์๊ฒฌ๊ณผ ํ ๋ก ์ ๊ณ์ ์ผ๋์ ๋ ๊ฒ์ ๋๋ค.
GitHub๋ ๋ฒ๊ทธ ๋ณด๊ณ ๋ฅผ ์ํ ์ฑ๋๋ก ๋จ์ ๊ฒ์ ๋๋ค.
๋ค์ ํ ๋ฒ, ์ด ๋ฌธ์ ๋ ์ด์ https://aws.uservoice.com/forums/598381-aws-command-line-interface ์์ ์ ๋ชฉ์ ๊ฒ์ํ์ฌ ์ฐพ์ ์ ์์ต๋๋ค.
-AWS SDK ๋ฐ ๋๊ตฌ ํ
์ด ํญ๋ชฉ์ ํนํ UserVoice( https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168310-cloudformation-external-parameter-file-do-not-supp )์์ ์ฐพ์ ์ ์์ต๋๋ค.
+1
์ปค๋ฎค๋ํฐ ํผ๋๋ฐฑ์ ๊ธฐ๋ฐ์ผ๋ก GitHub ๋ฌธ์ ์ ๊ธฐ๋ฅ ์์ฒญ์ ๋ฐํํ๊ธฐ๋ก ๊ฒฐ์ ํ์ต๋๋ค.
+1
+1
+1
+100
+1
+1
+1
+1
๊ทธ๋ฆฌ๊ณ ์ ๋ฐ์ ์ผ๋ก ์ผ๊ด์ฑ์ ๋ ๋์ด๋ ค๋ฉด +1000์ ์ฃผ์ธ์ ;)
+1
์ด ๋ฌธ์ ๋ 2๋ ์ ๋๋ค ;_;
@matthewflannery ์๋์ , ์ค์ ๋ก๋ 587์ผ์ ๋๋ค.
+1
@Yaowenjie 587/365 = 1.608 ~ 2๋
+1
๋ 11!1!1one!!1!11
:+1:
:heavy_plus_sign: :100:
๐
+1
์ด๋ฒ ํธ์ 2์ฃผ๋ ๊ธฐ๋ ํ์ฌ๊ฐ ๋ ๋ฌ ๋จ์์ต๋๋ค ์ฌ๋ฌ๋ถ! ๐จโ๐ฉโ๐งโ๐ฆ๐๐๐๐๐จโ๐จโ๐งโ๐ฆ
์ฐ๋ฆฌ ํ์ YAML์ ์ต์ํ๊ธฐ ๋๋ฌธ์(๋ชจ๋ ํ ํ๋ฆฟ์ YAML์ ์์) YAML ํ์ผ์ json ํ์ผ๋ก ๋ณํํ ๋ค์ CF์ ์ ๋ฌํ๋ ์ผ๋ถ ์ ธ ์๋ํ๊ฐ ์์ต๋๋ค. ์ด๊ฒ์ (์ ์ด๋ ๋์๊ฒ) ์ด ๊ธฐ๋ฅ์ด ์ผ๋ง๋ ์ํ๋์ง ๋ณด์ฌ์ค๋๋ค. ๊ณ ๊ฐ์ด ์ด์ ๊ฐ์ ๊ธฐ๋ณธ ๊ธฐ๋ฅ์ ์ค์ฌ์ผ๋ก ์์ฒด ์๋ํ๋ฅผ ๊ตฌ์ถํ๋๋ก ํ๋ ๊ฒ์ ๋ต์ด ์๋๋๋ค.
๋ํ CloudFormation์์ ์๋ํ๋ ์ ์ฒด parametersKey/ParamaterValue ๋ฐฉ์์ ์ด๋ฆฌ์์ ๊ฒ์์ ์์์ผ ํฉ๋๋ค.
YAML์์ CloudFormation ํ ํ๋ฆฟ์ ๊ฐ๊ณ JSON์์ ๋งค๊ฐ๋ณ์ ํ์ผ์ ์ ๊ณตํ ์ ์์ต๋๊น?
@Yashswarnkar ์ - YAML์ ํ ํ๋ฆฟ๊ณผ JSON์ ๋งค๊ฐ๋ณ์๋ฅผ ๊ฐ์ง ์ ์์ต๋๋ค. ์ด ๋ฌธ์ ๋ ๋งค๊ฐ๋ณ์๊ฐ JSON์๋ง ์์ ์ ์๊ธฐ ๋๋ฌธ์ ๋๋ค. ํ ํ๋ฆฟ์ด YAML์ ์์์๋ ๋ถ๊ตฌํ๊ณ YAML ํ์ผ์ ์ง์๋์ง ์์ต๋๋ค.
+1 ๋งค๊ฐ๋ณ์ ํ์ผ์ ์ฃผ์์ ์ถ๊ฐํ๊ณ CLI์์ ์คํํ ์ ์๊ธฐ๋ฅผ ์ ๋ง๋ก ์ํฉ๋๋ค. yaml์ ์ง์ํ๊ธฐ ์ํด --parameters์ ํจ๊ป create-stack CLI ๋ช ๋ น์ ๋ํ .yaml ์ง์์ ์ถ๊ฐํ ๊ณํ์ ์์ง ์๋์?
์ด ๊ธฐ๋ฅ์ ๋ํ ETA๊ฐ ์์ต๋๊น?
+1
๊ฑฐ์ 2๋ ๋์ ์ฌ์ ํ ๋งค๊ฐ๋ณ์์ ๋ํ yaml์ด ์์ต๋๋ค... :(
+1
+1
+1
์ด์ ๋ณด์ ๋ฌธ์์ด๊ณผ ๋์ฝ๋ฉ ๋ฐฉ๋ฒ์ ์ฌ์ฉํ ์ ์๋ SSM์ ์ฌ์ฉํ์ฌ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ์ฌ AWS ๊ณ์ ์ ๋ณ์๋ฅผ ๋ฐฐ์นํ ๋ค์ cloudformation ํ ํ๋ฆฟ์์ ๋ณ์๋ฅผ ์ฐธ์กฐํ๋ ์์ด๋์ด๊ฐ ์ฌ๋ฏธ์์ต๋๋ค... ๋๊ตฌ๋ ๋ค์๊ณผ ๊ฐ์ ์์ด๋์ด๋ฅผ ๊ฐ์ง๊ณ ์์ต๋๋ค. ?
์์ ์๊ฒฌ์ ๋ฐ๋ผ cfn-flip ์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
https://github.com/awslabs/aws-cfn-template-flip
pip install cfn_flip
cat <(cfn-flip parameters.yaml)
aws cloudformation update-stack
--stack-name test --template-body file://./api-test.yaml
--parameters file://<(cfn-flip parameters.yaml)
+100
์ด๊ฒ์ ๋ถ๋ช ํ ์์๊ฐ ๋ง์ ๊ธฐ๋ฅ์ ๋๋ค. ์๋ฐฑ ๋ช ์ ์ฌ๋๋ค์ด ์์ฒญํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ด์ง๋ง ์ ์ด์ ๋ํ ์์ง์์ด ์์์ต๋๊น?
+1
์ค์ ์ฌ์ฉ ์ฌ๋ก๋ ๋งค๊ฐ๋ณ์ ๋ด์์ JSON์ ์ง์ ํด์ผ ํ๋ ๊ฒฝ์ฐ์
๋๋ค. ์ด ๊ฒฝ์ฐ JSON์ ๋ฐ์ดํ๋ฅผ ์ด์ค์ผ์ดํํด์ผ ํ๋ ์
๋ชฝ์
๋๋ค...
[
{
"ParameterKey": "DistributionJSON",
"ParameterValue": "{\"Account_ID_1\":\"region_1,region_2\",\"Account_ID_2\":\"region_1\"}"
}
]
๋น๊ต ๋์:
- ParameterKey: DistributionJSON
ParameterValue: '{"Account_ID_1":"region_1,region_2","Account_ID_2":"region_1"}'
์? ๋ ์ด์ ์ ๋ฐ์ดํธ๊ฐ ์์ต๋๊น?
์? ๋ ์ด์ ์ ๋ฐ์ดํธ๊ฐ ์์ต๋๊น?
์ง์ ํด 2019๋ 1์๋ฟ์ด์ผ
์ด๋ด, ์ด ์ฌ๋๋ค์ด PR์ ํฉ๋ฅํ๋ ๋ฐฉ๋ฒ์ ๋ฌด์์ ๋๊น?
ํ์ด ์กฐ์ง ์ธ๋ถ์ ์ฌ๋๋ค๋ก๋ถํฐ ์ ๊ธฐ์ ์ผ๋ก PR์ ๋ณํฉํ๋ค๋ ๊ฒ์ ์๊ณ ์๋ค๋ฉด ์ด ๊ธ์ ์ฐ๋ ๊ฒ์ ๊ณ ๋ คํ ๊ฒ์ ๋๋ค.
๋ชฐ๋ผ. ๋๋ ์ด๊ฒ์ ๋ํ ์ถฉ๋ถํ ์์๊ฐ ์๋ค๊ณ ์๊ฐํ๊ณ ๊ทธ๋ค์ ๊ฒฐ๊ตญ ๊ทธ๊ฒ์ ๊ตฌํํ ๊ฒ์ ๋๋ค.
์ด๊ฒ์ ์์ํ ์ด๋ ค ์์ด์ผ ํ๊ณ ๊ทธ๊ฒ์ ์๋ ๋ชจ๋ ์ฌ๋์ ์น๊ตฌ๊ฐ ๋ ์ ์์ผ๋ฉฐ ๋งค๋ 'Payameter Fam'(yaml ๋งค๊ฐ๋ณ์ fam์์์ ๊ฐ์ด)์ด๋ผ๋ ํ์๋ฅผ ๊ฐ๊ณ ์ฌ๊ธฐ์์ ์ฐ๋ฆฌ ๋ชจ๋๊ฐ ํจ๊ป ๋ชจ์ฌ ์ํฐ yaml ํธ๋ผ์ฐ๋ง์ ๋ํด ๋ ผ์ํฉ๋๋ค.
+1
๐
+1
+1
3๋ , API์ 90%๊ฐ YAML์ ์ฌ์ฉํ๊ณ ์ง์ฆ๋๋ +1์ด ๋ง๊ณ AWS๊ฐ ๊ณต์ ๊ธ๊ณ ์์ต๋๋ค.
yaml์ด ๊ตฌ์ฑ ํ์ผ/ํญ๋ชฉ ์ฃผ์ ํด์ /๊ธฐํ์ ๋ํ ์ฃผ์์ ์ฌ์ฉํ๊ธฐ๋ฅผ ์ ๋ง ์ํฉ๋๋ค.
+1
2019๋ 6์์ธ๋ฐ ์ AWS์์ ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ง ์๋์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ๊ทธ๋ค์ ๋งค๋ ๋ง์ ์ฌ๋๋ค์ ๊ณ ์ฉํ๊ณ ์์ต๋๋ค.
๊ฐ์ ์ ๋ง? ์ด๊ฑธ ์์ง์ด๊ฒ ํด์ค
+1
+1
+1
+1
+1
+1
+1
๊ธฐ๋ค๋ฆฌ๋ค... ๊ธฐ๋ค๋ฆฌ๋ค...
์์ง ๊ธฐ๋ค๋ฆฌ๊ณ ์์ต๋๋ค!
์ฌ์ ํ ๋งค๊ฐ ๋ณ์๋ Json ์ ์ฉ์ ๋๊น?
์ด ๋ฌธ์ ๋ ์ ์น์์ ์์ํ๊ธฐ์ ์ถฉ๋ถํ ์ค๋๋์์ต๋๋ค.
๋๊ตฐ๊ฐ๊ฐ ์ด ๋ฌธ์ ์ ๋ํด ๊ฒฐ์์ ๋ค์ง๊ณ Jeff Barr, et. ํธ์ํฐ์์ ์.
์ด๊ฒ์ ์ฌ๋ ์ค๋ฌ์ธ ๊ฒ์ ๋๋ค
+1
+1
+1
+1
์ด ๋ฐ์์ ๋ถ๋ชํ๋ฉด YAML ๋งค๊ฐ๋ณ์ ์ง์์ ๋ฐ์ ์ ์์ต๋๊น?
๋ด ํ์ฌ ํ๋ก์ ํธ๋ YAML์ ์ข์ํฉ๋๋ค(์ ๋ ์๋๋๋ค:))
XML ์ง์๋ ์ถ๊ฐํ ์ ์์ต๋๊น? SOAP๋ฅผ ํตํด ์ด๊ฒ์ ์ ์ถํ ์ ์์ต๋๋ค. AWS ์ง์์ Windows Forms์์ ํ์์ ์ ๋๋ค.
+1
+1
2019๋
10์ 31์ผ ๋ชฉ์์ผ ์คํ 4:04 Bernie Durfee [email protected]
์ผ๋ค:
+1
โ
๋น์ ์ด ๋๊ธ์ ๋ฌ์๊ธฐ ๋๋ฌธ์ ์ด๊ฒ์ ๋ฐ๋ ๊ฒ์ ๋๋ค.
์ด ์ด๋ฉ์ผ์ ์ง์ ๋ต์ฅํ๊ณ GitHub์์ ํ์ธํ์ธ์.
https://github.com/aws/aws-cli/issues/2275?email_source=notifications&email_token=AHCULG57Z7SJHTRO43JC6LLQRL6ZPA5CNFSM4CVAW4OKYYY3PNVWWK3TUL52HS4DFVEXG43VMVBW63
๋๋ ๊ตฌ๋ ์ทจ์
https://github.com/notifications/unsubscribe-auth/AHCULG3TRJ5FGXG3NOVORBTQRL6ZPANCNFSM4CVAW4OA
.
+1
+1
๋ชจ๋ ์ ๋ฐ์ดํธ :/ ?
+1
+1
id๋ cloudformation ์
๊ทธ๋ ์ด๋ ๊ฐ๋ฅํ ๋งค๊ฐ๋ณ์์ ์
๊ทธ๋ ์ด๋ ๋ถ๊ฐ๋ฅํ ๋งค๊ฐ๋ณ์๋ฅผ ๋ถํ ํ์ฌ ๋งค๊ฐ๋ณ์ ํ์ผ์ ์ฃผ์์ ๋ฌ ์ ์๊ธฐ๋ฅผ ์ํฉ๋๋ค.
์๋ฅผ ๋ค์ด ๋ณผ๋ฅจ์ ์ค๋
์ท ID๋ฅผ ์
๊ทธ๋ ์ด๋ํ๋ ค๊ณ ํ์ต๋๋ค.
-> AutoEnableIO, ์ ํ, ํฌ๊ธฐ ๋ฐ IOPS ์ด์ธ์ ๋ณผ๋ฅจ ์์ฑ์ ์
๋ฐ์ดํธํ ์ ์์ต๋๋ค. ์์ฑ์ ๋ค์ ์ด์ ๊ฐ์ผ๋ก ๋ณ๊ฒฝํ๊ณ ์คํ์ ๋ค์ ์
๋ฐ์ดํธํฉ๋๋ค.
๋ค์ ๋ช
๋ น์ ์ฌ์ฉํ์ฌ ์คํ์ ์์ฑํ๋ ค๊ณ ํ์ต๋๋ค. aws cloudformation create-stack --stack-name myfirsttest --region us-west-2 --template-body file://testcfn.yml
๊ทธ๋ฌ๋ ๋ค์๊ณผ ๊ฐ์ ์ค๋ฅ ๋ฉ์์ง๊ฐ ๋ํ๋ฉ๋๋ค.
๋งค๊ฐ๋ณ์ '--template-body' ๊ตฌ๋ฌธ ๋ถ์ ์ค๋ฅ: paramfile file://testcfn.yml ์ ๋ก๋ํ ์ ์์ต๋๋ค: [Errno 2] ํด๋น ํ์ผ ๋๋ ๋๋ ํฐ๋ฆฌ๊ฐ ์์ต๋๋ค: 'testcfn.yml'
๋ด testcfn.yml ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
Description: >
Vritika / Udacity project
This template deploys a VPC
Resources:
UdacityVPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
โบ aws ssm get-parameters-by-path help
# ...
SYNOPSIS
get-parameters-by-path
--path <value>
[--recursive | --no-recursive]
[--parameter-filters <value>]
[--with-decryption | --no-with-decryption]
[--cli-input-json | --cli-input-yaml]
[--starting-token <value>]
[--page-size <value>]
[--max-items <value>]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]
# ...
--generate-cli-skeleton (string) Prints a JSON skeleton to standard
output without sending an API request. If provided with no value or the
value input, prints a sample input JSON that can be used as an argument
for --cli-input-json. Similarly, if provided yaml-input it will print a
sample input YAML that can be used with --cli-input-yaml. If provided
with the value output, it validates the command inputs and returns a
sample output JSON for that command.
์, yaml ์ง์!!!
โบ aws ssm get-parameters-by-path --path "/foo/bar/" --recursive --generate-cli-skeleton yaml-input
Path: '' # [REQUIRED] The hierarchy for the parameter.
Recursive: true # Retrieve all parameters within a hierarchy.
ParameterFilters: # Filters to limit the request results.
- Key: '' # [REQUIRED] The name of the filter.
Option: '' # For all filters used with DescribeParameters, valid options include Equals and BeginsWith.
Values: # The value you want to search for.
- ''
WithDecryption: true # Retrieve all parameters in a hierarchy with their value decrypted.
MaxResults: 0 # The maximum number of items to return for this call.
NextToken: '' # A token to start the list.
์ด๊ฑฐ ์์ง๋ ์๋๋๊ฑด๊ฐ์?? ์๋๋ฉด ์ด๋๊ฐ์ ์๋ค๋ ๊ฒ์ ๋์ณค์ต๋๊น?
๋งค๊ฐ๋ณ์์ .yaml์ ์ฌ์ฉํ๋ ๋ฐ ๊ด์ฌ์ด ์๋ ์ฌ๋์ ๋ค์์ ์ฐธ์กฐํ์ธ์.
https://github.com/realestate-com-au/stackup
๋๋ AWS๊ฐ ์ด ์ฝ๋๋ฅผ ๊ตฌ๋งคํ๊ณ ๊ทธ๋ค์ IP๋ก ์ฎ๊ธฐ๊ธฐ ์ํด ๋ถ๋์ฐ ๋ฌธ์ ๋๋๋ ค์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค.....
+1
hacky๋ ๊ฝค ๋นจ๋ฆฌ ์ง์ ๋ถํด์ง๊ธฐ ๋๋ฌธ์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ hacky ๋ฐฉ๋ฒ์ ์ด๋ ฌํ ํฌ์ด ์๋๋๋ค.
๊ทธ๋ฌ๋ ํ
์คํธ ํ๊ฒฝ์์ params ํ์ผ๋ก ์ด ์์
์ ์ํํ๋ ๋ฐ ๊ด์ฌ์ด ์๋ ๋ชจ๋ ์ฌ์ฉ์๋ฅผ ์ํด.
s3template.yml
AWSTemplateFormatVersion: '2010-09-09'
Description: create a single S3 bucket
Parameters:
BucketName:
Description: Unique name for bucket.
Type: String
AccessControl:
Description: Access Control of the bucket
Type: String
AllowedValues:
- Private
- PublicRead
Resources:
SampleBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref BucketName
AccessControl: !Ref AccessControl
s3template.params
BucketName=sample-unique-bucket-123456
AccessControl=Private
๋ฌ๋ฆฌ๋ค :
aws cloudformation deploy --template-file ./s3template.yml --stack-name sample-testbucket --region us-east-1 --parameter-overrides $(cat s3template.params)
YAML๊ณผ ๊ฐ์ params ํ์ผ์ ๊ฒฝ์ฐ +1์ ๋๋ค. ์ ๋๊ตฐ๊ฐ๊ฐ ๋งํฌ์ ์ ํผํฉํ๋๋ก ๊ฐ์ํฉ๋๊น?
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์ด ๊ธฐ๋ฅ ์์ฒญ์ ๋ ๋ฒ์งธ๋ก ํ๊ฒ ์ต๋๋ค.