LocalStackのデバッグに良く使うコマンドです。
docker-compose down
docker-compose up -d
aws s3 ls --endpoint-url=http://localhost:4572
$ aws dynamodb list-tables --endpoint-url=http://localhost:4566
$ aws dynamodb create-table \
--table-name user-table3 \
--attribute-definitions AttributeName=userID,AttributeType=S \
--key-schema AttributeName=userID,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb describe-table \
--table-name user-table \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb get-item \
--table-name alarm-table \
--key '{"alarmID": {"S": "fd5fda81-194a-488e-80f1-52b02b0d6cc9"}}' \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb get-item \
--table-name chara-table \
--key '{"charaID": {"S": "com.charalarm.yui"}}' \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb get-item \
--table-name chara-table \
--key '{"charaID": {"S": "com.senpu-ki-soft.momiji"}}' \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb put-item \
--table-name chara-table \
--item '{"charaID":{"S":"com.charalarm.yui"},"charaEnable":{"BOOL":true},"charaName":{"S":"井上結衣"}}' \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb put-item \
--table-name chara-table \
--item '{"charaID":{"S":"com.senpu-ki-soft.momiji"},"charaEnable":{"BOOL":true},"charaName":{"S":"紅葉"}}' \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb query \
--table-name alarm-table \
--index-name user-id-index \
--key-condition-expression "userID = :userID" \
--expression-attribute-values '{ ":userID": { "S": "b87e945d-8912-4276-99f7-e636d7660093" } }' \
--endpoint-url=http://localhost:4566
$ aws dynamodb query \
--table-name alarm-table \
--index-name alarm-time-index \
--key-condition-expression "#time = :time" \
--expression-attribute-names '{"#time":"time"}' \
--expression-attribute-values '{ ":time": { "S": "XXXXX" } }' \
--endpoint-url=http://localhost:4566
$ aws dynamodb scan \
--table-name user-table \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb scan \
--table-name alarm-table \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb scan \
--table-name chara-table \
--endpoint-url=http://localhost:4566 | jq
$ aws dynamodb delete-table \
--table-name user-table \
--endpoint-url=http://localhost:4566
$ aws sns create-platform-application \
--name ios-voip-push-platform-application \
--platform APNS \
--attributes PlatformCredential=DAMMY \
--endpoint-url http://localhost:4566 | jq
$ aws sns list-platform-applications \
--endpoint-url http://localhost:4566 | jq
{
"PlatformApplications": [
{
"PlatformApplicationArn": "arn:aws:sns:ap-northeast-1:000000000000:app/APNS/ios-voip-push-platform-application",
"Attributes": {
"PlatformCredential": "DAMMY"
}
}
]
}
aws sns create-platform-endpoint \
--platform-application-arn arn:aws:sns:ap-northeast-1:000000000000:app/APNS/ios-voip-push-platform-application \
--token MY_TOKEN2 \
--endpoint-url http://localhost:4566 | jq
aws sns list-endpoints-by-platform-application \
--platform-application-arn arn:aws:sns:ap-northeast-1:000000000000:app/APNS/ios-voip-push-platform-application \
--endpoint-url http://localhost:4566
aws sns delete-platform-application \
--platform-application-arn arn:aws:sns:ap-northeast-1:000000000000:app/APNS/my-topic3 \
--endpoint-url http://localhost:4566
aws sns list-topics \
--endpoint-url http://localhost:4566
--platform-application-arn arn:aws:sns:ap-northeast-1:000000000000:app/APNS/ios-push-platform-application
--endpoint-url http://localhost:4566
$ aws sqs list-queues \
--endpoint-url http://localhost:4566 | jq
$ aws sqs get-queue-attributes \
--queue-url http://localhost:4566/000000000000/voip-push-queue.fifo \
--attribute-names ApproximateNumberOfMessages \
--endpoint-url http://localhost:4566 | jq
$ aws sqs get-queue-attributes \
--queue-url http://localhost:4566/000000000000/voip-push-queue.fifo \
--attribute-names ApproximateNumberOfMessagesNotVisible \
--endpoint-url http://localhost:4566 | jq
$ aws sqs receive-message \
--queue-url http://localhost:4566/000000000000/voip-push-queue.fifo \
--max-number-of-messages 10 \
--endpoint-url http://localhost:4566 | jq
$ aws sqs purge-queue \
--queue-url http://localhost:4566/000000000000/voip-push-queue.fifo \
--endpoint-url http://localhost:4566 | jq