Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration should be possible w/out running local dynamodb #40

Open
bitsofinfo opened this issue Feb 7, 2024 · 1 comment
Open

migration should be possible w/out running local dynamodb #40

bitsofinfo opened this issue Feb 7, 2024 · 1 comment
Labels
enhancement New feature or request needs more info Further information is requested

Comments

@bitsofinfo
Copy link

The following should be teased apart: migrate should be possible against a target host that is not necessarily started by this plugin. This is currently too highly coupled and does not account for the possibility someone may want to leverage the auto migration feature against a separate local dynamodb instance that is not necessarily managed/started by this plugin.

Config should be more like this:

  serverless-dynamodb:
    stages:
      - local
      - dev
      - qa
      - stage
      
    migrate:
      enabled: true
      port: 8000
      host: someOtherLocalDynamodb.local

    start:
      bindPort: 8000
      bindAddress: 127.0.0.1
      docker: false
@domdomegg domdomegg added enhancement New feature or request needs more info Further information is requested labels Feb 7, 2024
@domdomegg
Copy link
Member

For most use cases, the existing noStart option will work here. This allows users to only do the migration and seeding at a separate dynamodb instance.

However, you do rightly point out users currently can't both start a local instance AND migrate/seed a different instance, using a single command (but this is possible with two commands e.g. by swapping the port and noStart option based on a variable).

I'm concerned supporting this might introduce scope creep to being a generic dynamodb migrator / seeder, rather than a way of running dynamodb locally easily as part of the serverless framework. I was actually thinking of trying to decouple the migration and seeding parts completely (maybe keeping them in the plugin for backwards compatibility).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants