You can use the AWS::Serverless::SimpleTable resource to create a DynamoDB table with a single attribute primary key (hence the name SimpleTable). You can additionally provide the name and type of your primary key along with the table's provisioned throughput as parameters, as shown in the following example:

   Type: AWS::Serverless::SimpleTable 
         Name: userId 
         Type: String 
         ReadCapacityUnits: 5 
         WriteCapacityUnits: 5 

You can optionally even use the AWS::DynamoDB::Table resource instead of the SimpleTable if, you require more advanced functionalities for your tables.

Putting it all together, you will end up with a ready to use template that can deploy a simple ...

Get Mastering AWS Lambda now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.