第 9 步:部署数据模型 - AWS 规范性指导

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

第 9 步:部署数据模型

在这个具体示例中,模型是使用 NoSQL Workbench 部署的,NoSQL Workbench 是用于现代数据库开发和操作的应用程序。使用此工具,您可以选择创建数据模型、上传数据并将其直接部署到您的 AWS 账户。如果要实现此示例,则可以使用以下由 NoSQL Workbench 生成的 AWS CloudFormation 模板。

AWSTemplateFormatVersion: 2010-09-09 Resources: Components: Type: 'AWS::DynamoDB::Table' Properties: KeySchema: - AttributeName: ComponentId KeyType: HASH AttributeDefinitions: - AttributeName: ComponentId AttributeType: S - AttributeName: ParentId AttributeType: S - AttributeName: GraphId AttributeType: S - AttributeName: Path AttributeType: S GlobalSecondaryIndexes: - IndexName: GS1 KeySchema: - AttributeName: ParentId KeyType: HASH - AttributeName: ComponentId KeyType: RANGE Projection: ProjectionType: KEYS_ONLY - IndexName: GSI2 KeySchema: - AttributeName: GraphId KeyType: HASH - AttributeName: Path KeyType: RANGE Projection: ProjectionType: INCLUDE NonKeyAttributes: - ComponentId BillingMode: PAY_PER_REQUEST TableName: Components