gifted-gigabyte-5385911/17/2023, 2:05 PM
Node 18 has been supported since 2022 https://aws.amazon.com/blogs/compute/node-js-18-x-runtime-now-available-in-aws-lambda/
aws: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'.
salmon-account-7457211/17/2023, 5:32 PM
little-cartoon-1056911/17/2023, 7:49 PM
salmon-account-7457211/17/2023, 8:11 PM
gifted-gigabyte-5385911/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.
which worked fine. But on doing
pulumi plugin rm resource aws 5.16.2
it seemed to reinstall it and I got the same error about the node version.
I have not specified the provider version anywhere. How do I make it use version 6?
% 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
little-cartoon-1056911/19/2023, 11:07 PM
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
is failing, then removing your local dependency cache should be enough.
gifted-gigabyte-5385911/20/2023, 12:07 AM
and it still wants to download the older provider. I also specified
in the stack config file.
little-cartoon-1056911/20/2023, 12:12 AM
gifted-gigabyte-5385911/20/2023, 12:14 AM
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-1056911/20/2023, 12:17 AM
gifted-gigabyte-5385911/20/2023, 12:19 AM
melodic-tomato-3900511/20/2023, 7:52 AM