AWS::Serverless::SimpleTable - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::Serverless::SimpleTable

Creates a DynamoDB table with a single attribute primary key. It is useful when data only needs to be accessed via a primary key.

To use the more advanced functionality of DynamoDB, use an AWS::DynamoDB::Table resource instead.

Note

When you deploy to Amazon CloudFormation, Amazon SAM transforms your Amazon SAM resources into Amazon CloudFormation resources. For more information, see Generated Amazon CloudFormation resources for Amazon SAM.

Syntax

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

Properties

PointInTimeRecoverySpecification

The settings used to enable point in time recovery.

Type: PointInTimeRecoverySpecification

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the PointInTimeRecoverySpecification property of an AWS::DynamoDB::Table resource.

PrimaryKey

Attribute name and type to be used as the table's primary key. If not provided, the primary key will be a String with a value of id.

Note

The value of this property cannot be modified after this resource is created.

Type: PrimaryKeyObject

Required: No

Amazon CloudFormation compatibility: This property is unique to Amazon SAM and doesn't have an Amazon CloudFormation equivalent.

ProvisionedThroughput

Read and write throughput provisioning information.

If ProvisionedThroughput is not specified BillingMode will be specified as PAY_PER_REQUEST.

Type: ProvisionedThroughput

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the ProvisionedThroughput property of an AWS::DynamoDB::Table resource.

SSESpecification

Specifies the settings to enable server-side encryption.

Type: SSESpecification

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the SSESpecification property of an AWS::DynamoDB::Table resource.

TableName

Name for the DynamoDB Table.

Type: String

Required: No

Amazon CloudFormation compatibility: This property is passed directly to the TableName property of an AWS::DynamoDB::Table resource.

Tags

A map (string to string) that specifies the tags to be added to this SimpleTable. For details about valid keys and values for tags, see Resource tag in the Amazon CloudFormation User Guide.

Type: Map

Required: No

Amazon CloudFormation compatibility: This property is similar to the Tags property of an AWS::DynamoDB::Table resource. The Tags property in SAM consists of Key:Value pairs; in CloudFormation it consists of a list of Tag objects.

Return Values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, it returns the resource name of the underlying DynamoDB table.

For more information about using the Ref function, see Ref in the Amazon CloudFormation User Guide.

Examples

SimpleTableExample

Example of a SimpleTable

YAML

Properties: TableName: my-table Tags: Department: Engineering AppType: Serverless