Setting lambdaHashingVersion "20201221" gives version error

Hi,

I have been deploying a stack for a few days and tried to address the deprecation warning:

Deprecation warning: Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release.
            Switch to it now by setting "provider.lambdaHashingVersion" to "20201221"
            More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2

Setting “provider.lambdaHashingVersion” to “20201221” resulted in the following error:

An error occurred: GraphqlLambdaVersion4JK3uRK8i3HCRSxfoFYMqIE5hETyRnSDLTsEduDNwA - A version for this Lambda function exists ( 8 ). Modify the function to create a new version…

Removing the lambdaHashingVersion key resolved the error. Not sure if this indicates a problem with the new hashing function.

Luck,
Jock

Do not apply this to already deployed service.

Refer: https://www.serverless.com/framework/docs/deprecations/

2 Likes

To fix this error you have to make some changes to your code before you deploy.

See: Serverless Framework - Upgrading to v3