Aws-cli: AWS cliλ₯Ό μ‚¬μš©ν•˜μ—¬ 둜컬 보쑰 μΈλ±μŠ€κ°€ μžˆλŠ” DynamoDB ν…Œμ΄λΈ”μ„ μƒμ„±ν•˜λŠ” 데 도움을 쀄 수 μžˆλŠ” μ‚¬λžŒμ΄ μžˆμŠ΅λ‹ˆκΉŒ?

에 λ§Œλ“  2016λ…„ 06μ›” 16일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: aws/aws-cli

guidance service-api

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

aws dynamodb create-table --table-name XYZ --attribute-definitions AttributeName=Id,AttributeType=N AttributeName=Name,AttributeType=S --key-schema AttributeName=Id,KeyType=HASH AttributeName=Name,KeyType=RANGE - -provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --local-secondary-indexes 'IndexName=idx1,KeySchema=[{AttributeName=Id,KeyType=HASH},{AttributeName=Name,KeyType=RANGE}],Projection={ ν”„λ‘œμ μ…˜ μœ ν˜•=ALL}'

λͺ¨λ“  3 λŒ“κΈ€

LSI의 경우 create-table ν˜ΈμΆœμ— --local-secondary-indexes 'IndexName=string,KeySchema=[{AttributeName=string,KeyType=string},{AttributeName=string,KeyType=string}],Projection={ProjectionType=string,NonKeyAttributes=[string,string]}' λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.

μ—¬μ „νžˆ λ¬Έμ œκ°€ μžˆλŠ” 경우 λΉ„ν„°λ£ΈμœΌλ‘œ μ™€μ„œ μ±„νŒ…ν•˜μ‹­μ‹œμ˜€. gitter에 μ°¬μ„±ν•˜μ—¬ λ§ˆκ°ν•©λ‹ˆλ‹€.

μ•ˆλ…•ν•˜μ„Έμš” μ œμž„μŠ€,

aws dynamodb create-table --table-name XYZ --attribute-definitions AttributeName=Id,AttributeType=N AttributeName=Name,AttributeType=S AttributeName=Gender,AttributeType=S --key-schema AttributeName=Id,KeyType=HASH AttributeName =Name,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --local-secondary-indexes 'IndexName=string,KeySchema=[{AttributeName=Gender,KeyType=RANGE},{AttributName=Id,KeyType= HASH}],Projection={ProjectionType=ALL}'

μœ„μ˜ μ½”λ“œλ₯Ό μ‚¬μš©ν•˜μ—¬ ν…Œμ΄λΈ”μ„ λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€. ν•˜μ§€λ§Œ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

_νŒŒλΌλ―Έν„° '--local-secondary-indexes' ꡬ문 뢄석 였λ₯˜: μ˜ˆμƒ: '=', μˆ˜μ‹ : ''
' μž…λ ₯:
'색인이름=λ¬Έμžμ—΄,ν‚€μŠ€ν‚€λ§ˆ=[{속성이름=성별,ν‚€μœ ν˜•=λ²”μœ„},{속성이름=
Id,KeyType=HASH}],Projection={ProjectionType=ALL}'_

지원해 μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€.

aws dynamodb create-table --table-name XYZ --attribute-definitions AttributeName=Id,AttributeType=N AttributeName=Name,AttributeType=S --key-schema AttributeName=Id,KeyType=HASH AttributeName=Name,KeyType=RANGE - -provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --local-secondary-indexes 'IndexName=idx1,KeySchema=[{AttributeName=Id,KeyType=HASH},{AttributeName=Name,KeyType=RANGE}],Projection={ ν”„λ‘œμ μ…˜ μœ ν˜•=ALL}'

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰