Home > Blockchain >  CloudFormation for DynamoDB: "Encountered unsupported property AttributeType"
CloudFormation for DynamoDB: "Encountered unsupported property AttributeType"

Time:12-03

Deployment of DynamoDB stack rollbacks with error:

CREATE_FAILED Encountered unsupported property AttributeType

I tried various modifications of attributes configuration, used quotes, also checked similar question.

My template:

Resources:
checkpointsTable:
Type: AWS::DynamoDB::Table
Properties: 
  AttributeDefinitions:
    - AttributeName: sf_instance_table_key
      AttributeType: S
  BillingMode: PAY_PER_REQUEST
  KeySchema: 
    - AttributeName: sf_instance_table_key
      AttributeType: HASH
  TableName: !Ref tableName
  Tags: 
    - Key: "Division"
      Value: !Ref division

Not many lines here, but cannot figure it out. Thanks for help!

CodePudding user response:

It should be like this:

Resources:
checkpointsTable:
Type: AWS::DynamoDB::Table
Properties: 
  AttributeDefinitions:
    - AttributeName: sf_instance_table_key
      AttributeType: S
  BillingMode: PAY_PER_REQUEST
  KeySchema: 
    - AttributeName: sf_instance_table_key
      KeyType: HASH
  TableName: !Ref tableName
  Tags: 
    - Key: "Division"
      Value: !Ref division
  • Related