99x / 99x/serverless-dynamodb-local

Dynamo db Seed data insertion not working when deploying to aws

Open
#198 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
621
Forks
232
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Research direction

Start with serverless.yml and seed/test.json, then inspect how serverless-dynamodb-local handles the serverless-offline and DynamoDB seed settings during sls offline start versus sls deploy. Determine whether the plugin is intended to seed AWS tables or only local DynamoDB, and document where the seed file is used and what the expected deployed behavior is.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.