-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpastebin_ddb.yaml
49 lines (45 loc) · 1.33 KB
/
pastebin_ddb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
PasteTrackingTableName:
Type: String
Description: Name of DynamoDB table to create to track pastes
Resources:
PastebinScraperDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: !Ref PasteTrackingTableName
AttributeDefinitions:
- AttributeName: paste_key
AttributeType: S
KeySchema:
- AttributeName: paste_key
KeyType: HASH
BillingMode: PROVISIONED
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
StreamSpecification:
StreamViewType: NEW_IMAGE
Tags:
- Key: project
Value: pastebin-scraper
DeletionPolicy: Retain
Outputs:
DynamoDBTableName:
Value: !Ref PastebinScraperDynamoDBTable
Description: The name of the DynamoDB table
Export:
Name:
'Fn::Sub': '${AWS::StackName}-DDBTableName'
DynamoDBTableArn:
Value: !GetAtt PastebinScraperDynamoDBTable.Arn
Description: The ARN of the DynamoDB table
Export:
Name:
'Fn::Sub': '${AWS::StackName}-DDBTableARN'
DynamoDBTableStreamArn:
Value: !GetAtt PastebinScraperDynamoDBTable.StreamArn
Description: The streaming ARN of the DynamoDB table
Export:
Name:
'Fn::Sub': '${AWS::StackName}-DDBTableStreamARN'