serverless-offline-ssm icon indicating copy to clipboard operation
serverless-offline-ssm copied to clipboard

Doesn't seem to be working at all

Open oullah opened this issue 3 years ago • 5 comments

I have the 5.2.0 of serverless-offline-ssm installed. I have defined it as the first plugin:

plugins: 
  - serverless-offline-ssm
  - serverless-offline
  - serverless-plugin-typescript

However, it is still using the AWS cloud SSM no matter what I do. I've tried it in the yml file as well as the .env file. I've tried running sls offline --stage offline as well as changing the default stage in the yml file.

This is the error. If I add the parameter to AWS SSM it uses that parameter, and not the local one.

 Serverless Error ----------------------------------------
 
  Cannot resolve serverless.yml: Variables resolution errored with:
    - Cannot resolve variable at "provider.environment.JWT_SECRET": Value not found at "ssm" source
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              14.15.1
     Framework Version:         2.69.1
     Plugin Version:            5.5.1
     SDK Version:               4.3.0
     Components Version:        3.18.1

oullah avatar Jan 12 '22 15:01 oullah

I'm having the same issue, I don't know whether it's me doing something wrong or the plugin doesn't work with new versions anymore :?

plugins:
  - serverless-offline-ssm # This one needs to be the first of the plugins
  - serverless-webpack
  - serverless-layers
  - serverless-domain-manager
  - serverless-dynamodb-local
custom:
  serverless-offline-ssm:
    stages:
      - local
    ssm:
      'provider.iamRoleStatements[0].Resource': ''
      'provider.vpc.securityGroupIds.0': ''
      'provider.vpc.subnetIds[0]': ''
      'custom.serverless-layers.layersDeploymentBucket': ''

Then the command I use is:

serverless offline start --host localhost --allowCache --stage=local

xposix avatar Jan 13 '22 13:01 xposix

I can confirm this isn't working for me either.

"serverless-offline": "^8.3.1",
"serverless-offline-ssm": "^5.2.0",

reubenporterjisc avatar Apr 11 '22 13:04 reubenporterjisc

Not working for me either.

    "serverless": "^3.19.0",
    "serverless-dynamodb-local": "^0.2.40",
    "serverless-offline": "^8.8.0",
    "serverless-offline-ssm": "^6.2.0",
    "serverless-plugin-typescript": "^2.1.2",

Getting this error:

Cannot resolve serverless.yml: Variables resolution errored with:
  - Cannot resolve variable at "provider.environment.MY_VAR_NAME": Source "ssm" returned not supported result: "undefined",

levinunnink avatar Jul 06 '22 20:07 levinunnink

Hello, have any of you resolved the issue yet? I'm still with this problem

BigsonLvrocha avatar Apr 14 '23 14:04 BigsonLvrocha

By adding console.log in the node_modules, it seems that the key passed in getValue https://github.com/janders223/serverless-offline-ssm/blob/33a5825a41eb872c36353ac1306fc905a2946eb0/src/resolver.ts#L38 still has the sufix ~true, adding it in the values made it work

BigsonLvrocha avatar Apr 14 '23 17:04 BigsonLvrocha