PrimaryKeyObject - AWS Serverless Application Model

PrimaryKeyObject

The object describing the properties of a primary key.

Syntax

To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.

YAML

Name: String Type: String

Properties

Name

Attribute name of the primary key.

Type: String

Required: Yes

AWS CloudFormation compatibility: This property is passed directly to the AttributeName property of the AWS::DynamoDB::Table AttributeDefinition data type.

Additional notes: This property is also passed to the AttributeName property of an AWS::DynamoDB::Table KeySchema data type.

Type

The data type for the primary key.

Valid values: String, Number, Binary

Type: String

Required: Yes

AWS CloudFormation compatibility: This property is passed directly to the AttributeType property of the AWS::DynamoDB::Table AttributeDefinition data type.

Examples

PrimaryKey

Primary key example.

YAML

Properties: PrimaryKey: Name: MyPrimaryKey Type: String