File: cloudformation.yml

package info (click to toggle)
python-requests-cache 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,024 kB
  • sloc: python: 7,029; makefile: 4
file content (34 lines) | stat: -rw-r--r-- 970 bytes parent folder | download
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
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: key
          AttributeType: S
      KeySchema:
        - AttributeName: key
          KeyType: HASH
      # BillingMode: PAY_PER_REQUEST

      # Optional: Use provisioned throughput instead of on-demand
      BillingMode: PROVISIONED
      ProvisionedThroughput:
        WriteCapacityUnits: 2
        ReadCapacityUnits: 2

      # Optional: Enable DynamoDB's TTL feature
      TimeToLiveSpecification:
        AttributeName: ttl
        Enabled: true