gifted-gigabyte-53859
11/17/2023, 2:05 PMaws:lambda:Function (fn_auth_login_callback):
error: aws:lambda/function:Function resource 'fn_auth_login_callback' has a problem: expected runtime to be one of [nodejs nodejs4.3 nodejs6.10 nodejs8.10 nodejs10.x nodejs12.x nodejs14.x nodejs16.x java8 java8.al2 java11 python2.7 python3.6 python3.7 python3.8 python3.9 dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 dotnetcore3.1 dotnet6 nodejs4.3-edge go1.x ruby2.5 ruby2.7 provided provided.al2], got nodejs18.x. Examine values at 'Function.Runtime'.
Node 18 has been supported since 2022 https://aws.amazon.com/blogs/compute/node-js-18-x-runtime-now-available-in-aws-lambda/salmon-account-74572
11/17/2023, 5:32 PMlittle-cartoon-10569
11/17/2023, 7:49 PMsalmon-account-74572
11/17/2023, 8:11 PMgifted-gigabyte-53859
11/19/2023, 10:49 PM% pulumi plugin ls
NAME KIND VERSION SIZE INSTALLED LAST USED
aws resource 6.0.2 513 MB 1 month ago 1 month ago
aws resource 5.16.2 419 MB 3 weeks ago 3 weeks ago
aws-apigateway resource 1.0.1 92 MB 3 weeks ago 3 weeks ago
str resource 1.0.0 24 MB 1 week ago 1 week ago
time resource 0.0.16 38 MB 4 days ago 4 days ago
TOTAL plugin cache size: 1.1 GB
warning: A new version of Pulumi is available. To upgrade from version '3.94.1' to '3.94.2', run
$ curl -sSL <https://get.pulumi.com> | sh
or visit <https://pulumi.com/docs/install/> for manual instructions and release notes.
pulumi plugin rm resource aws 5.16.2
which worked fine.
But on doing pulumi preview
it seemed to reinstall it and I got the same error about the node version.
% pulumi plugin ls
NAME KIND VERSION SIZE INSTALLED LAST USED
aws resource 6.0.2 513 MB 1 month ago 1 month ago
aws resource 5.16.2 419 MB 7 minutes ago 7 minutes ago
aws-apigateway resource 1.0.1 92 MB 3 weeks ago 3 weeks ago
str resource 1.0.0 24 MB 1 week ago 1 week ago
time resource 0.0.16 38 MB 4 days ago 4 days ago
I have not specified the provider version anywhere. How do I make it use version 6?little-cartoon-10569
11/19/2023, 11:07 PMpulumi up
to destroy just that, then put the code back in and redeploy. That will put the correct dependencies into the lambda zip.
I'm not certain that's actually where the error is, but it's the worst case scenario. If the problem is just that the local run of pulumi up
is failing, then removing your local dependency cache should be enough.gifted-gigabyte-53859
11/20/2023, 12:07 AMpulumi preview
and it still wants to download the older provider. I also specified aws:version: 6.0.2
in the stack config file.little-cartoon-10569
11/20/2023, 12:12 AMgifted-gigabyte-53859
11/20/2023, 12:14 AMpreview
succeeded now without the error about the nodejs version. So although something is still using the older provider, at least the lambda is now previewing with the newer one (it seems). Thanks for talking it through with me.little-cartoon-10569
11/20/2023, 12:17 AMgifted-gigabyte-53859
11/20/2023, 12:19 AMmelodic-tomato-39005
11/20/2023, 7:52 AM