Amazon DynamoDB Cloud Area Attribute Type

I am working on a serverless web application and I am trying to create a YAML CloudFormation template for a DynamoDB table. The documentation says that each attribute in the table must match the style below, where AttributeType can be either "S", "N", or "B" for a string, number, or binary code.

Attribute Name: String
AttributeType: String

My table includes attributes that are maps. How to include them in a template?

+6
source share
1 answer

When creating a Dynamodb table, you do not need to mention all the attributes of the table. Only two attributes are required when creating the Ie table partition key and sort key, if available.

As you already mentioned that the attribute is a map, it definitely cannot be a partition key or a sort key, since key attributes can only be scalar data types.

The simple answer is: you do not need to define the map attribute (document data type) in the CloudFormation create table script.

+7
source

Source: https://habr.com/ru/post/1015382/


All Articles