Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

aws dynamodb create-table --table-name Music --attribute-definitions

AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S --
key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE
--provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5

aws dynamodb put-item --table-name CollectionCDs --item file://itemmusic.json

aws dynamodb put-item --endpoint-C:\Users\frfis\Desktop\src --table-name


CollectionCDs --item file://itemalbum.json

aws dynamodb put-item --table-name CollectionCDs --item C:\Program Files\Amazon\


AWSCLIV2\src\itemalbum.json.

aws dynamodb update-table --table-name CollectionCDs --attribute-definitions


AttributeName=RecordCompany,AttributeType=S --global-secondary-index-updates =
"Create":

PESQUISAR PELA GRAVADORA


aws dynamodb query --table-name CollectionCDs --index-name RecordCompany-index --
key-condition-expression "RecordCompany = :name" --expression-attribute-values
file://"C:\Program Files\Amazon\AWSCLIV2\src\queryRecordCompany.json"

criar index de Artist com AlbumTitle


aws dynamodb update-table --table-name CollectionCDs --attribute-definitions
AttributeName=AlbumTitle,AttributeType=S AttributeName=Artist,AttributeType=S --
global-secondary-index-updates "[{\"Create\":{\"IndexName\": \"ArtistAlbumTitle-
index\",\"KeySchema\":[{\"AttributeName\":\"Artist\",\"KeyType\":\"HASH\"},
{\"AttributeName\":\"AlbumTitle\",\"KeyType\":\"RANGE\"}],\"ProvisionedThroughput\"
: {\"ReadCapacityUnits\": 10, \"WriteCapacityUnits\": 5},\"Projection\":
{\"ProjectionType\":\"ALL\"}}}]"

pesquisar pelo album e artista


aws dynamodb query --table-name CollectionCDs --index-name ArtistAlbumTitle-index
--key-condition-expression "Artist = :artist and AlbumTitle = :title" --expression-
attribute-values file://"C:\Program Files\Amazon\AWSCLIV2\src\
queryArtistAlbumTitle.json"

You might also like