AWS Cloudformation Encountered unsupported property Type

10,576

The problem is not at Resources.devDdbDataTable.Type but instead the problem is at Resources.devDdbDataTable.Properties.AttributeDefinitions.Type.

AttributeDefinitions should be a list like this:

AttributeDefinitions:
  - AttributeName: device_id
    AttributeType: 'N'

So change Type to AttributeType.

Share:
10,576
maranovot
Author by

maranovot

Updated on June 30, 2022

Comments

  • maranovot
    maranovot almost 2 years

    I am trying to create DynamoDB table with AWS Cloudformation and YAML defintions. When I remove the Type from YAML file I get error that Type must be present. So I suppose I am missing something just can't seem to find it.

    Here are the YAML defintions:

    Resources:
        devDdbDataTable:
          Type: 'AWS::DynamoDB::Table'
          Properties:
            Tags:
              - Key: access_key
                Value: '123'
            AttributeDefinitions:
              - AttributeName: device_id
                Type: 'N'
              - AttributeName: device_ip
                Type: S
              - AttributeName: data
                Type: S
              - AttributeName: created_at
                Type: S
              - AttributeName: ttl
                Type: S
            KeySchema:
              - AttributeName: device_id
                Type: HASH
            ProvisionedThroughput:
              ReadCapacityUnits: 1
              WriteCapacityUnits: 1
            TimeToLiveSpecification:
              AttributeName: ttl
              Enabled: true
    
  • cementblocks
    cementblocks about 6 years
    Also note that the AttributeDefinitions section must only contain attributes referenced in the KeySchemas of the table and any indexes.