# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Description: > Template to create dynamodb tables as part of bootstrap Resources: TenantStackMappingTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: tenantId AttributeType: S KeySchema: - AttributeName: tenantId KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 TableName: MLaaS-TenantStackMapping TenantDetailsTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: tenantId AttributeType: S - AttributeName: tenantEmail AttributeType: S - AttributeName: tenantName AttributeType: S KeySchema: - AttributeName: tenantId KeyType: HASH GlobalSecondaryIndexes: - IndexName: tenantEmail-index KeySchema: - AttributeName: tenantEmail KeyType: HASH Projection: ProjectionType: ALL ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 - IndexName: tenantName-index KeySchema: - AttributeName: tenantName KeyType: HASH Projection: ProjectionType: ALL ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 TableName: MLaaS-TenantDetails TenantUserMappingTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: tenantId AttributeType: S - AttributeName: userName AttributeType: S KeySchema: - AttributeName: tenantId KeyType: HASH - AttributeName: userName KeyType: RANGE ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 TableName: MLaaS-TenantUserMapping SettingsTable: Type: AWS::DynamoDB::Table Properties: AttributeDefinitions: - AttributeName: settingName AttributeType: S KeySchema: - AttributeName: settingName KeyType: HASH ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 TableName: MLaaS-Setting Outputs: TenantStackMappingTableArn: Value: !GetAtt TenantStackMappingTable.Arn TenantStackMappingTableName: Value: !Ref TenantStackMappingTable TenantDetailsTableArn: Value: !GetAtt TenantDetailsTable.Arn TenantDetailsTableName: Value: !Ref TenantDetailsTable TenantUserMappingTableArn: Value: !GetAtt TenantUserMappingTable.Arn TenantUserMappingTableName: Value: !Ref TenantUserMappingTable SettingsTableArn: Value: !GetAtt SettingsTable.Arn SettingsTableName: Value: !Ref SettingsTable