Created
December 9, 2020 01:56
-
-
Save awssimplified/f96437a5a3beed65bf4782eb7b69afa4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: 2010-09-09 | |
Resources: | |
OrdersTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
TableName: AuthorsTable_prod | |
AttributeDefinitions: | |
- AttributeName: "AuthorName" | |
AttributeType: "S" | |
- AttributeName: "BookTitle" | |
AttributeType: "S" | |
KeySchema: | |
- AttributeName: "AuthorName" | |
KeyType: "HASH" | |
- AttributeName: "BookTitle" | |
KeyType: "RANGE" | |
TimeToLiveSpecification: | |
AttributeName: "ExpirationTime" | |
Enabled: true | |
ProvisionedThroughput: | |
ReadCapacityUnits: "10" | |
WriteCapacityUnits: "5" | |
DependsOn: | |
- DynamoDBQueryPolicy | |
DynamoDBQueryPolicy: | |
Type: "AWS::IAM::Policy" | |
Properties: | |
PolicyName: DynamoDBQueryPolicy | |
PolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: "Allow" | |
Action: "dynamodb:Query" | |
Resource: "*" | |
Roles: | |
- Ref: "OrdersTableQueryRole" | |
OrdersTableQueryRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: "Allow" | |
Principal: | |
Service: | |
- "dynamodb.amazonaws.com" | |
Action: | |
- "sts:AssumeRole" | |
Path: "/" | |
thanks
thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good