Cmd 使用CLI创建AWS DynamoDB表时出错

Cmd 使用CLI创建AWS DynamoDB表时出错,cmd,amazon-dynamodb,command-line-interface,aws-cli,dynamodb-queries,Cmd,Amazon Dynamodb,Command Line Interface,Aws Cli,Dynamodb Queries,我正在尝试使用CLI在DynamoDB中创建表 我正在使用以下命令: aws dynamodb创建表\--表名my \--属性定义'AttributeName=Username,AttributeType=S''AttributeName=Timestamp,AttributeType=S'\--密钥模式'AttributeName=Username,KeyType=HASH''AttributeName=Timestamp,KeyType=RANGE'\--配置吞吐量'ReadCapacity

我正在尝试使用CLI在DynamoDB中创建表

我正在使用以下命令:

aws dynamodb创建表\--表名my \--属性定义'AttributeName=Username,AttributeType=S''AttributeName=Timestamp,AttributeType=S'\--密钥模式'AttributeName=Username,KeyType=HASH''AttributeName=Timestamp,KeyType=RANGE'\--配置吞吐量'ReadCapacityInits=5,WriteCapacityUnits=5'\--流规范StreamEnabled=true,StreamViewType=NEW\u和\u OLD\u IMAGES\--区域us-east-1
在上面运行时,我得到以下错误:

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: --attribute-definitions, --key-schema
用法:aws[选项][…][参数]
要查看帮助文本,您可以运行:
aws帮助
aws帮助
aws帮助
aws:错误:需要以下参数:-属性定义,-键架构

我是AWS新手,在我的命令中我声明了属性和键模式,有什么错误吗?

我会尝试对键模式和属性定义使用json文件。有关json语法和示例,请参阅。您不需要表以外的任何其他参数来运行表

您键入的命令上的反斜杠用于在出现换行时通知cmd命令命令继续执行下一行

根据您键入的屏幕截图和命令,您尝试在一行中执行它

作为一种解决方案,您可以从命令中删除反斜杠,或者复制原始命令(教程中的命令)(包括换行符)

没有换行符:

aws dynamodb create-table --table-name my_table --attribute-definitions 'AttributeName=Username, AttributeType=S' 'AttributeName=Timestamp, AttributeType=S' --key-schema 'AttributeName=Username, KeyType=HASH' 'AttributeName=Timestamp, KeyType=RANGE' --provisioned-throughput 'ReadCapacityUnits=5, WriteCapacityUnits=5' --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES --region us-east-1
aws dynamodb create-table \
    --table-name my_table \
    --attribute-definitions AttributeName=Username,AttributeType=S AttributeName=Timestamp,AttributeType=S \
    --key-schema AttributeName=Username,KeyType=HASH  AttributeName=Timestamp,KeyType=RANGE \
    --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
    --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
    --region us-east-1
使用换行符:

aws dynamodb create-table --table-name my_table --attribute-definitions 'AttributeName=Username, AttributeType=S' 'AttributeName=Timestamp, AttributeType=S' --key-schema 'AttributeName=Username, KeyType=HASH' 'AttributeName=Timestamp, KeyType=RANGE' --provisioned-throughput 'ReadCapacityUnits=5, WriteCapacityUnits=5' --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES --region us-east-1
aws dynamodb create-table \
    --table-name my_table \
    --attribute-definitions AttributeName=Username,AttributeType=S AttributeName=Timestamp,AttributeType=S \
    --key-schema AttributeName=Username,KeyType=HASH  AttributeName=Timestamp,KeyType=RANGE \
    --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
    --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
    --region us-east-1

我试图遵循本教程,但无法使用AWS CLI创建表:-如果您复制与中相同的格式,那就太好了。