serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Dynamo db Seed data insertion not working when deploying to aws
I have a serverless framework and dynamo db in my local. I am trying to seed data . When i do 'sls offline start', seed data is getting inserted into my local dynamo db. but when i deploy it to aws using 'sls deploy'. i don't see the seed data getting inserted on aws dynamo db.
I am very new to serverless and this is my 1st serverless application and deployment . I am using 'serverless-offline' and 'serverless-dynamo db' .
Below is my configuration on serverless.yml
serverless-offline:
host: 0.0.0.0
dynamodb:
start:
port: 8000
inMemory: true
migrate: true
seed: true
convertEmptyValues: true
seed:
domain:
sources:
- table: ${self:custom.test}
sources: [seed/test.json]
Above configuration is working good for local setup. When i run sls offline start, everything is working fine. But when i do 'sls depoly' . I don't see seed data in dynamo db tables on aws . Also wanted to know where can i see the json seed data file (test.json) on aws server. Does it automatically gets deployed to aws somewhere?
I am not the maintainer of this package, but afaik it only seeds in your offline dynamodb.
I was able to seed my online dynamodb instance with:
sls dynamodb seed --online --region us-east-1