diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-19 17:19:50 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-19 18:57:14 -0500 |
commit | e5dec6a209bc685ad9ac93992d8df953d2b420c1 (patch) | |
tree | 0168e87b431bfda7aa20019b032a657e507663d2 /examples | |
parent | d19776ca25db85912529182daca5f03ba38f60a8 (diff) | |
download | requests-cache-e5dec6a209bc685ad9ac93992d8df953d2b420c1.tar.gz |
Add an example CloudFormation template for DynamoDB
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cloudformation.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/cloudformation.yml b/examples/cloudformation.yml new file mode 100644 index 0000000..ef5d749 --- /dev/null +++ b/examples/cloudformation.yml @@ -0,0 +1,32 @@ +AWSTemplateFormatVersion: "2010-09-09" +Description: An example of creating a DynamoDB table to use as a requests-cache backend + +Parameters: + CacheTableName: + Type: String + Default: http_cache + Description: > + An alternate DynamoDB table name to use. If provided, this must match the + table_name parameter for DynamoDbCache. + +Resources: + DynamoDBRequestCache: + Type: AWS::DynamoDB::Table + Properties: + TableName: !Ref CacheTableName + AttributeDefinitions: + - AttributeName: namespace + AttributeType: S + - AttributeName: key + AttributeType: S + KeySchema: + - AttributeName: namespace + KeyType: HASH + - AttributeName: key + KeyType: RANGE + BillingMode: PAY_PER_REQUEST + # Uncomment for provisioned throughput instead of on-demand + # BillingMode: PROVISIONED + # ProvisionedThroughput: + # WriteCapacityUnits: 2 + # ReadCapacityUnits: 2 |