YML file example with index creation

Can anyone point me to a CRUD example of a Serverless yml file that shows table creation and includes both local and global index file creation (primary and sort keys)?

Starting my first Serverless project (with node) and I’ve literally been searching the web for hours and almost every single example file (including the one in the docs) skips over index creation.

Thanks,

Rick

1 Like

Here is a cloudformation template with GSI’s defined https://gist.github.com/DavidWells/5e47a458b2cee376716bbafa81319675#file-cloudformation-dynamodb-yml-L23

You can modify this and add to the resources block of your serverless.yml file

1 Like

like dis https://gist.github.com/DavidWells/c7df5df9c3e5039ee8c7c888aece2dd5#file-serverless-yml-L17

1 Like

David,

Thanks for the prompt reply. This looks like exactly what I need.

Rick

1 Like