jch254 / discogs-market-monitor

Discogs Wantlist Monitor saves manually searching through your wantlist for local listings
MIT License
10 stars 0 forks source link

Utilise serverless-offline-ssm to fix local development #1

Open jch254 opened 11 months ago

jch254 commented 11 months ago

Currently running locally does not work as expected due to incompatibility with serverless-offline and ssm: variables - https://github.com/dherault/serverless-offline/issues/1647. A suggested solution is to use this package https://www.serverless.com/plugins/serverless-offline-ssm

jch254 commented 11 months ago

Workaround is to comment SSM vars in serverless.yml. E.g.

functions:
  handler:
    handler: src/index.handler
    memorySize: 256
    timeout: 900
    # environment:
    #   DISCOGS_USER_TOKEN: ${ssm:/discogs-market-monitor/discogs_user_token}
    #   SENDGRID_API_KEY: ${ssm:/discogs-market-monitor/sendgrid_api_key}
    #   DISCOGS_USERNAME: ${ssm:/discogs-market-monitor/discogs_username}
    #   SHIPS_FROM: ${ssm:/discogs-market-monitor/ships_from}
    #   DESTINATION_EMAIL: ${ssm:/discogs-market-monitor/destination_email}
    #   SENDER_EMAIL: ${ssm:/discogs-market-monitor/sender_email}
jch254 commented 3 months ago

Using parameter store secrets as done in https://github.com/jch254/market-monitor-api also allows running locally