LoginSignup
0
0

More than 1 year has passed since last update.

CloudFormationでDynamoDBを使う

Last updated at Posted at 2022-01-15

はじめに

DynamoDBをCloudFormatinで使うときの留意点をまとめてみました

DynamoDBでのBillingMode

BillingモードはPROVISIONEDPAY_PER_REQUESTのふた通りあります。
PAY_PER_REQUESTは従量課金になります。

Billingモードを指定しない場合はデフォルトのPROVISIONEDが選択されます。

PROVISIONEDが指定された場合はProvisionedThroughputの項目が必須になります。

    DynamoDBUserTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: S
        KeySchema:
          - AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 5
          WriteCapacityUnits: 5
        TableName:
          Fn::Sub: "User"

BillingModeの項目がないためPROVISIONEDが指定され、ProvisionedThroughputReadCapacityUnitsWriteCapacityUnitsを5にしています。

最後に

従量課金はアクセス数が予測できない時に使うと良さそうですが、開発段階では必要なさそうです。

参考文献

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0