Could you please help me understand how to specify the nodejs runtime version of the lambda function that gets automatically created by aws when a new data bucket with parameter autoDeleteObjects: true is created?
I am using the following piece of code:
const autoDeleteBucketProps = { autoDeleteObjects: true, removalPolicy: >cdk.RemovalPolicy.DESTROY };
new Bucket(this, 'store', { ...bucketProps, ...autoDeleteBucketProps });
This code automatically creates a lambda function with runtime version Node.js 12.x for autodeleting objects. However due to the fact that Amazon requires that we upgrade our lambda runtimes (ending support of v12 as described in Lambda runtime support policy), I am trying to a find a way to upgrade the runtime of this automatically created lambda to version 14.
I am using aws-cdk v1.152.0 which supports '@aws-cdk/aws-lambda' Runtime version v14. So why this lambda gets created with runtime v12? And how can it can be changed to v14, programmatically?
Thank you in advance.