Serverless, seed dynamodb only for the testing environment

I have a fixture folder with a nodejs script that seed data to a dynamodb table. I have to execute this file manually once the stack is created.

In my serverless configuration, I would like to be able (only in test environment) to populate a test dynamodb table with fake data. I would like to know if some tool/plugin/sls default features already exists.

I would like that the dynamodb seed only occurs on the stack creation, not on each deploy. However, cool be nice to also be able to have many seed over time which some kind of orchestration to do only the new ones

Not sure if this is what you want…but you can take a look on the serverless-plugin-ifelse

It allows you to exclude a function or resources, if the env !=testing

  myStage: ${opt:stage, self:provider.stage}
        # Deploy dynamoDBTable only in testing env
        - If: '"${self:custom.myStage}" != "testing"'
            - resources.Resources.dynamoDBTable