Anshul Walia
Anshul Walia

Reputation: 587

How do I add a column in dynamodb using cloudformation

I was going through documentation of cloudformation for creating a dynamodb.I am able to create a table with a key but I can't find any way to create an item in the table using the template.

Can anyone help me out?

Upvotes: 0

Views: 786

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269302

CloudFormation is used to create infrastructure (eg Databases, EC2 instances, networks).

It cannot be used to define data to be loaded into a database. For that, you would need to trigger some code that calls the DynamoDB API and loads data.

If you wish to trigger this action from a CloudFormation template, use a Custom Resource to trigger an AWS Lambda function. Then, code the Lambda function to load the data into the DynamoDB table.

Upvotes: 1

Related Questions