DynamoDb - How to create dynamodb table with Columns(attribute name/type)?
See original GitHub issuevar table = new Table(this, "UniqueTable", new TableProps
{
TableName = "UniqueTableName",
PartitionKey = new Attribute { Name = "EventMessageID", Type = AttributeType.STRING},
});
This construct doesn’t have any way to create columns (name and type). Any idea how to accomplish that, so that I do not have to write the cloudformation manually? I am referring to .NET(C#) CDK. Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
AWS::DynamoDB::Table - AWS CloudFormation
A list of attributes that describe the key schema for the table and indexes. This property is required to create a DynamoDB table....
Read more >Step 1 - Create the DynamoDB table
Step 1 - Create the DynamoDB table. Run the following AWS CLI command to create the first DynamoDB table called logfile : aws...
Read more >Working With DynamoDB Columns/Attributes [incl. Examples]
In order to add attributes, you need to first create a table. You can use AWS Console, AWS CLI, AWS SDK, or the...
Read more >Step 1 - Create the replica table - Amazon DynamoDB Labs
DynamoDB stream with Lambda. Let's create a table ... aws dynamodb create-table --table-name logfile_replica ... Attribute Name (Type), Special Attribute?
Read more >Terraform dynamodb error - all attributes must be indexed
That error message is a bit misleading. You should only define the indexed attributes when you are creating the table. Since DynamoDB is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sacag attributes are only needed for things that are part of either keys (like the hash and sort keys), or indexes. For everything else, there are no attributes (DynamoDB is schemaless).
You define the keys when creating the
Table
. You add indexes with instance methods on the createdtable
.@skinny85 - Thanks for the response. Working as expected. CDK will create the table(schemaless) with indexes and keys. Attributes can be added at runtime.