I am trying to create a CloudFormation stack via CDK. I am creating a S3 bucket and listening its create notifications to a SNS.
But my CloudfFormation stack is failing with error:
The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions.
BucketNotificationsHandlerXXXXXXX
Resource handler returned message: "The runtime parameter of nodejs10.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs14.x) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: XXXXXX, Extended Request ID: null)" (RequestToken: XXXXXXX, HandlerErrorCode: InvalidRequest)
I am not sure from where this lambda error is coming into picture. And how can change its version, as I am not using lambda in this CDK.
Code part which am using in CDK:
const snsOutput = new sns.Topic(this, 'snsOutput',
{topicName: `snsOutput`}); // sns creation
const S3Output = new Bucket(this, "S3Output", {
bucketName: `S3Output`,
blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,
lifecycleRules: [{ expiration: Duration.days(3) }],
removalPolicy: RemovalPolicy.DESTROY,
}); // s3 creation
// creating event for s3 to sns
S3Output.addObjectCreatedNotification(new s3n.SnsDestination(snsOutput));

