Errors after updating SSM params to new variablesResolutionMode

I am trying to resolve the following deprecation warning:

Serverless: Deprecation warning: Syntax for referencing SSM parameters was upgraded with automatic type detection and there's no need to add "~true" or "~split" postfixes to variable references. Drop those postfixes and set "variablesResolutionMode: 20210326" in your service config to adapt to a new behavior. Starting with next major release, this will be communicated with a thrown error.

I have removed the ~true postfix and set the variablesResolutionMode to 20210326. Upon doing so, I get the following error from AWS:

User: arn:aws:iam::500345361576:user/sls is not authorized to perform: ssm:GetParameter on resource: arn:aws:ssm:*********:500345361576:*

I have double checked that this IAM user has the requisite permissions and this all works fine if I revert my changes (to not use the new variablesResolutionMode).

Any ideas on how to resolve this?

2 Likes

I’m getting the same problem… any suggestions? I presume this is a problem updating old configurations.

UPDATE Aha – worked for me after deleting local .serverless directory.

1 Like

This fixed it for me too, thank you!.