我正在为db模式编写以下内容: resources:
Resources:
DynamoDbTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: EmployeeType
AttributeDefinitions:
- AttributeName: timeoffgroupid
AttributeType: S
- AttributeName: timeOffGroup
AttributeType: S
- AttributeName: timeOffGroupColor
AttributeType: S
KeySchema:
- AttributeName: timeoffgroupid
KeyType: HASH
- AttributeName: timeOffGroup
KeyType: HASH
- AttributeName: timeOffGroupColor
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
DynamoDBIamPolicy:
Type: AWS::IAM::Policy
DependsOn: DynamoDbTable
Properties:
PolicyName: lambda-dynamodb
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: arn:aws:dynamodb:*:*:table/moviesTwo
Roles:
- Ref: IamRoleLambdaExecution但是,我从几个教程中复制了这一点,并想出了如何将其发布到数据库,但我不知道所有选项是什么。例如,KeyType:散列--其他选项是什么,它们是做什么的?我看过一篇教程,告诉我这会创建一个表,并使用所需的键设置属性,但我不知道如何调用一个主属性或如何引用这些属性和keyTypes。我知道S代表字符串,但我不知道其他属性是做什么的?我在文档里看过了,但结果是空的。
提前谢谢。
https://stackoverflow.com/questions/42400269
复制相似问题