AWS_PROFILE=example AWS_REGION=ap-northeast-1 TABLE_NAME=example-table aws dynamodb scan \ --table-name $TABLE_NAME \ --projection-expression "id" \ --profile $AWS_PROFILE \ --region $AWS_REGION \ > "${AWS_PROFILE}.${AWS_REGION}.${TABLE_NAME}.id.json"
echo '{"Items":[{"id":{"S":"abc123"}},{"id":{"S":"abc-123"}}]}' | jq -r '.Items[] | select(.id.S | test("[^a-zA-Z0-9]+")) | .id.S' | sort abc-123
例外としてauto scalingはこのmodeでは無効になります。
aws dynamodb update-table --table-name example --billing-mode PAY_PER_REQUEST --profile example --region ap-northeast-1
aws dynamodb describe-table --table-name example --profile example --region ap-northeast-1 ... "ProvisionedThroughput": { "NumberOfDecreasesToday": 0, - "WriteCapacityUnits": 2, - "ReadCapacityUnits": 2 + "WriteCapacityUnits": 0, + "ReadCapacityUnits": 0, + "LastDecreaseDateTime": 1543559458.239 }, ... + "BillingModeSummary": { + "LastUpdateToPayPerRequestDateTime": 1543560129.221 + "BillingMode": "PAY_PER_REQUEST" + },
※On-Demandが発表されたので不用かも。併用はできない