getlift / lift

Expanding Serverless Framework beyond functions using the AWS CDK
MIT License
912 stars 109 forks source link

Serverless V4: Provider construct is not supported #394

Closed franzs97 closed 1 month ago

franzs97 commented 1 month ago

Description

After updating to serverless v4 it throws an error on deployment/validation:

✖ Provider construct is not supported Error: Provider construct is not supported

How to Reproduce


[...]

provider:
  name: aws
  region: eu-central-1
  [...]
  environment:
    SERVICE_NAME: ${self:service}
    REGION_NAME: ${aws:region}
    TABLE_NAME: ${construct:MyTable.tableName}  # this throws the error

constructs:
  MyTable:
    type: database/dynamodb-single-table
    extensions:
      table:
        Properties:
          TableName: ${self:service}-MyTable

Additional Information

The serverless.yaml still worked in v3.

mnapoli commented 1 month ago

Let's keep discussion in https://github.com/getlift/lift/issues/393#issuecomment-2143057173

Could you please add your comment there? That way it will be visible by the serverless team too.

Thanks!

rj-xy commented 1 month ago

Not ideal for anyone new to using the serverless framework. However v4 has had loads of breaking changes, and this package doesn't work out of the box anymore. We've had to pin serverless to the latest v3.