Lambda and S3 Existing bucket error

Hello, I am getting the fallowing error on deploy:

ERROR: CustomDashresourceDashexistingDashs3LambdaFunction - 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: a255f9cb-4db5-4829-b030-e88f6f8ae97a, Extended Request ID: null)

My serverless section related to this error is

provider:
  name: aws
  apiGateway:
    restApiId: ${file(../resources/serverless.yml):custom.myEnvironment.REST_API_ID.${self:custom.stage}}
    restApiRootResourceId: ${file(../resources/serverless.yml):custom.myEnvironment.REST_API_ROOT_RESOURCE_ID.${self:custom.stage}}
  runtime: nodejs12.x
  stage: dev
  region: us-east-1
functions:  
  siteUploadsCreateThumbnailsWorker:
    handler: sites-uploads-create-thumbnails-worker.main    
    events:
      - s3:
          bucket: ${self:provider.environment.SITES_UPLOADS_BUCKET_NAME}
          event: s3:ObjectCreated:*
          existing: true

  siteUploadsDeleteThumbnailsWorker:
    handler: sites-uploads-delete-thumbnails-worker.main    
    events:
      - s3:
          bucket: ${self:provider.environment.SITES_UPLOADS_BUCKET_NAME}
          event: s3:ObjectRemoved:*
          existing: true

It seems that CustomDashresourceDashexistingDashs3LambdaFunction is not working properly when I use an existing bucket in my s3 event. This function is handled by framework and I can not deploy myservice at all.

Thank you in advance

1 Like