Please let us know what runtime you would like to see in the example snippet. We will collect the feedback and create an example in the requested runtime.
NodeJS 18.x seems like the example using nodejs 18.x was taken off of https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html