--- AWSTemplateFormatVersion: '2010-09-09' Description: Create DynamoDB table Resources: myDynamoDBTable: Type: AWS::DynamoDB::Table Properties: SSESpecification: KMSMasterKeyId: alias/aws/dynamodb SSEEnabled: true SSEType: KMS AttributeDefinitions: - AttributeName: Album AttributeType: S - AttributeName: Artist AttributeType: S - AttributeName: Sales AttributeType: N - AttributeName: NumberOfSongs AttributeType: N KeySchema: - AttributeName: Album KeyType: HASH - AttributeName: Artist KeyType: RANGE ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 TableName: Ref: AWS::StackName GlobalSecondaryIndexes: - IndexName: myGSI KeySchema: - AttributeName: Sales KeyType: HASH - AttributeName: Artist KeyType: RANGE Projection: NonKeyAttributes: - Album - NumberOfSongs ProjectionType: INCLUDE ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 - IndexName: myGSI2 KeySchema: - AttributeName: NumberOfSongs KeyType: HASH - AttributeName: Sales KeyType: RANGE Projection: NonKeyAttributes: - Album - Artist ProjectionType: INCLUDE ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 LocalSecondaryIndexes: - IndexName: myLSI KeySchema: - AttributeName: Album KeyType: HASH - AttributeName: Sales KeyType: RANGE Projection: NonKeyAttributes: - Artist - NumberOfSongs ProjectionType: INCLUDE