AWS CLI で boolean 値を引数に取るオプションの指定は ture や false を指定するのでななくオプションを指定する。
例えば DynamoDB で整合性レベルの指定はドキュメントに ”--consistent-read | --no-consistent-read (boolean)” と記載されているが、"--consistent-read=ture" ではなく "--consistent-read" と指定する。
例
- ture
$ aws dynamodb scan --table-name Music --consistent-read
- false
$ aws dynamodb scan --table-name Music --no-consistent-read
ドキュメント
--consistent-read | --no-consistent-read (boolean)
A Boolean value that determines the read consistency model during the scan:
- If consistent-read is false , then the data returned from scan might not contain the results from other recently completed write operations (PutItem, update-item or DeleteItem).
- If consistent-read is true , then all of the write operations that completed before the scan began are guaranteed to be contained in the scan response.
The default setting for consistent-read is false .
scan — AWS CLI 1.16.67 Command Reference
The consistent-read parameter is not supported on global secondary indexes. If you scan a global secondary index with consistent-read set to true, you will receive a ValidationException .